-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: moving datasets #13393
Comments
How's this different from |
Or I suspect the functionality desired here could be implemented with purely userland work, since it seems like they'd like a readonly version at the old mountpoint and a readwrite at the new, and since we allowed multiple mounting of a dataset, we could probably do it... Well, most of it. I don't know that there's anything short of horrific reaching around in the kernel that's going to let you go tell old FDs that their paths changed unless something like |
So, when I created this, I for some reason had no idea that At some point I'll reword the OP to make this issue specifically about moving online datasets, rather than offline ones, since that's the thing that doesn't exist right now. I was under the impression that something along these lines existed in some other filesystem, but I could have been mistaken. I guess that everything right now is flexible in terms of the actual data moving on disk (for example, via replication or devices being added/removed from a pool) but not the data moving between physical mounts. I'm not actually sure how file handlers are done in ZFS on Linux, and whether they're forced to be linked to the specific dataset or can actually be moved within a zpool. Because most of my use cases are things like moving |
Quick footnote - zfs rename was part of ZFS from the initial "add ZFS
support" commit onward to Solaris in 2005 or so.
"File handlers"? I'm not sure what you're looking to describe here, but
cross-filesystem mv on ZFS of any sort is a cp-then-rm (for now -
#13392 ).
…On Tue, May 3, 2022 at 1:05 PM Clar Fon ***@***.***> wrote:
So, when I created this, I for some reason had no idea that zfs rename
existed. I guess that I had been relying on knowledge since before it did,
and then just for some reason never found out when it was implemented.
At some point I'll reword the OP to make this issue specifically about
moving online datasets, rather than offline ones, since that's the thing
that doesn't exist right now.
I was under the impression that something along these lines existed in
some other filesystem, but I could have been mistaken. I guess that
everything right now is flexible in terms of the actual data moving on disk
(for example, via replication or devices being added/removed from a pool)
but not the data moving between physical mounts. I'm not actually sure how
file handlers are done in ZFS on Linux, and whether they're forced to be
linked to the specific dataset or can actually be moved within a zpool.
Because most of my use cases are things like moving pool/log to
pool/data/log, etc., with the dataset being mounted at /var/log.
—
Reply to this email directly, view it on GitHub
<#13393 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABUI7KY5RYLOOWI7PI7JRTVIFMD7ANCNFSM5UYEKRZQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Yeah, I must have just been compounding misunderstandings when I didn't know that Anyway, updated the original description to reference |
I would be happy if |
Is |
Apart from having missed that this option exists by now (thanks for the info): An operation (or a part of it) that is an effective NOP should IMHO not have side effects. |
Oh huh, glad to know that This is a bit of an awkward side effect though, since can't ZFS perform some kind of |
It unmounts/remounts, AFAIK. |
I don't have the time to look into this right now, but if that's the case it may make more sense to close this issue and open an issue specifically on using |
Seems reasonable to me. |
Describe the feature would like to see added to OpenZFS
I would like to see the ability to live move datasets. In other words
zfs rename
should be able to work for mounted datasets, andzfs set mountpoint=...
should be able perform some kind ofmount --move
operation.Presumably, this would work recursively, transferring snapshots and child datasets.
How will this feature improve OpenZFS?
It would be extremely desirable to be able to rename or move datasets that are currently in use, for example, moving
/var/log
from one physical drive to another. Since it's difficult to configure an existing system to unmount these filesystems without booting into another system (it can be done, since it's done at shutdown, but it's a huge pain), letting the user simply move these datasets over would be incredibly useful. Obviously, this substantially increases the complexity of the implementation, but it could be very useful for administering systems.Additional context
For cross-pool moves:
For same-pool moves, probably several of the above steps are redundant, but I'm not 100% sure how many of them are.
I think I've seen discussions of this before, but did a quick search and saw no open features here on it. Apologies if there is some existing discussion somewhere else that I didn't find.
The text was updated successfully, but these errors were encountered: