Score:-1

Is there a file manager that handles smartly when moving folders that correspond to ZFS datasets?

et flag

All my Linux systems (Ubuntu 20.04 and 22.04, server and desktop alike) have root-on-zfs and data on one or more ZFS pools.

Of course data need to be shifted around often, for instance with mc or dolphin or such.

The following use case and question assumes data is moved around within a zpool (not between different zpools).

All filemanagers I tries so far (mc, thunar, dolphin, nemo and some more) you can not differentiate which folder is just a folder, and which one is a zfs dataset.

So if you want to move a folder which in fact is a dataset, all filemanagers start to create a plain folder on the target an copy all files into it.

But if the target folder itself is also a dataset, I expect the filemanager to simply rename the source dataset accordingly - this would be much faster, smarter and for me the more reasonable operation.

Use case example, dataset structure before, mountpoints equal the dataset name:

zp/media/movies/scifi
zp/media/movies/crime
zp/media/movies/classic
zp/media/movies/nature
zp/media/new/anime

Now open mc, select /zp/media/new/anime and move it to /zp/media/movies. I assume the target does not already exist, neither as folder nor as dataset at that position.

Result: mc creates a folder /zp/media/movies/anmime and moves on file after the other to that position. On the end it tells that it could not remove /zp/media/new/anime (because it is a dataset, which can not be removed by rm).

Expected behavior: literally zfs rename zp/media/new/anime zp/media/movies/anime

Let's also assume for now that the filemanager has permissions to modify ZFS datasets.

If the target already exists of course the only option is a mvoperation.

==> Is there a filemanager that is aware of ZFS and able to handle datasets as described above?

I know there is a abandoned and incomplete project named zc "zfs commander" (console app) which also has a GTK+ port named zyggy - but I look for something that is actively maintained.

PS: It does not hurt, if it is aware of snapshots as well.

David avatar
cn flag
What version of Ubuntu are you using?
Artur Meinild avatar
vn flag
I would advice you use official ZFS tools for dataset manipulation. It seems the functionality you want is to rename datasets and their mountpoints.
Hi-Angel avatar
es flag
I am confused. A ZFS dataset is simply a filesystem that is mounted over some directory. Now, let's assume there are datasets `/vol/ds1` and `/vol/ds2`, what exactly do you mean by "both target and source folders are datasets"? Is it something like `mv /vol/ds1 /vol/ds2`? If that's the case, then how do you expect `ds1` to be renamed to `ds2` if `ds2` already exists? Besides, moving a mounted directory should result in `EBUSY` error, do you expect it to be unmounted? What about existing load? What you are asking seems to be some very specific workflow is not "reasonable" for the general case.
freezed avatar
cn flag
What is the purpose you expect in a GUI usage?
datenheim avatar
et flag
If the constraints allow a folder move operation be translated to a dataset rename operation - why not do it that way. Or at least ask: "hey, source is a dataset and we could rename it to get it done, should we?"
Score:2
cn flag

Is there a filemanager that is aware of ZFS and able to handle datasets as described above?

No. Each ZFS is a separate filesystem. mv (or any other tool) can not move block pointers.from one filesystem to another. Filemanagers use the regular commands to move and copy files.

If it was possible we would already be able to do it. I found a topic on openzfs stating that there are 3 big issues that makes this a problem: hard links, snapshots, and it can not be a directory. And that was way back in 2014, 2015.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.