mergerfs-tools icon indicating copy to clipboard operation
mergerfs-tools copied to clipboard

Extend mergerfs.dedup to folders

Open vejnar opened this issue 8 years ago • 5 comments

Hi,

mergerfs.dedup is very useful for files. But it doesn't take care of folders.

When a folder is created on multiple volumes, for instance to split the content of a folder among these volumes, and some of this content is removed, empty folders on some volume(s) remain(s). It would be great to remove these unnecessary empty folders.

Thanks. And thanks to develop mergerfs, it's great!

vejnar avatar Sep 10 '16 02:09 vejnar

You want to clean up directories on one drive that have data on others? The problem is that with path preserving those empty directories matter.

It can be done but it would have an effect on placement for path preserving.

Can also do a find -type d -empty -delete in the source paths.

trapexit avatar Sep 11 '16 03:09 trapexit

You want to clean up directories on one drive that have data on others?

Yes

The problem is that with path preserving those empty directories matter.

Could you please explain why? The folder exists with data on another drive. If it exists empty on another drive, is that not redundant?

Can also do a find -type d -empty -delete in the source paths.

No. That would remove also actual empty folder, not just redundant folder.

vejnar avatar Sep 13 '16 15:09 vejnar

Path preserving policies (generally) only consider drives with the path in question.

https://github.com/trapexit/mergerfs#policy-descriptions

If the directory is removed that drive would now not be considered and could break the intentions of the user given the policy.

I'm not saying that the feature isn't useful in so much that in a targeted way it can help clean up. Just that it could lead to issues if used without understanding that impact.

trapexit avatar Sep 13 '16 15:09 trapexit

Thanks for the explanation.

As an option to clean up, this would still be very useful IMHO.

If you plan to implement it, that would be appreciated. Otherwise please close this issue.

vejnar avatar Sep 22 '16 20:09 vejnar