trapexit / mergerfs-tools

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

mergerfs.balance Or mergerfs.EVACUATE ?! #139

Open wbrione opened 1 year ago

wbrione commented 1 year ago

I would like the tool, in fact, to balance the data between all the disks in my pool, but what it is doing is distributing/moving all the contents of the disk that had more space allocated, to the rest of the pool, at the end, leaving the original disk, where all the data was, practically empty. I understand that: If I have, for example, 3 disks, disk 1 has 3 tb of data, and disk 2 and 3 empty, at the end of the process, should have 1 tb allocated to each disk, totaling 3 tb... Shouldn't that be the behavior ?!

I have a process now underway, and this is the result...

~# du -sh /srv/dev-disk-by-uuid-/ISO 70G /srv/dev-disk-by-uuid-/ISO 271G /srv/dev-disk-by-uuid-/ISO 272G /srv/dev-disk-by-uuid-/ISO 311G /srv/dev-disk-by-uuid-*/ISO

As I said, the disk currently with 70gb, was the disk where all the files were stored, the process is, in fact, "evacuating" its contents to the other disks :-(

Note(1) Command => mergerfs.balance /srv/mergerfs/DATA/ISO/

Note(2) MergerFS options => cache.files=partial,dropcacheonclose=true,category.create=mfs

Note(3) Before balancing, I changed the pool behavior from "epmfs" to "mfs" followed by the pool restart

wbrione commented 1 year ago

So, I realized that the term "balancing" is the balancing of free space, not data, so when I pointed to a specific folder, with the idea of balancing/distributing that data among the disks in the pool, as the disk in question was the one that contained all the data, its collateral action was to move all the data from that folder to the other disks, that were empty :-(