trapexit / mergerfs-tools

Optional tools to help manage data in a mergerfs pool
ISC License
372 stars 42 forks source link

Adding tool mergerfs.consolidate-dirs #121

Open magma1447 opened 2 years ago

magma1447 commented 2 years ago

Not sure if this is of interest, but I have been missing such tool several times myself. For different reasons I have directories that has been split up that shouldn't be, and I figure this is the solution. It seems like more than me have thought that the existing consolidate tool does this. If you don't want to accept the pull request because you don't think the tool belongs, that's more than fine. I will then just keep it in my fork, primarily for myself, but also for others who look hard enough.

The tool takes the size per source device into consideration instead of just moving the data onto a random device, or the one with the most disk space available.

Pardon my Python. It's not my language and I use it about once per year only. I tried my best to follow your code standards and write as similar code as I could. Also, since I copy pasted quite a lot from the existing tools most of the code should be recognizable. I think I have cleaned out all unused functions.

Things it doesn't do that potentially would be wise:

trapexit commented 2 years ago

Can you explain what is different with this tool vs the existing one?