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

mergerfs.balance Or mergerfs.EVACUATE ?!

Open wbrione opened this issue 2 years ago • 1 comments

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 avatar Jun 27 '23 23:06 wbrione

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 :-(

wbrione avatar Jun 29 '23 13:06 wbrione

This just happened to me also, same misunderstanding

abbekeff avatar Apr 09 '25 22:04 abbekeff

The description of the tool is:

Will move files from the most filled drive (percentage wise) to the least filled drive. Will do so till the most and least filled drives come within a user defined percentage range (defaults to 2%).

What else would "balance" across a pool of filesystems mean?

trapexit avatar Apr 09 '25 22:04 trapexit

Yeah it's on me for not reading the docs. I added 2 new disks in my array and wanted to "balance" the data I already had over these new drives =

  • disk1 0%
  • disk2 0%
  • disk3 100%
  • disk4 100%

and what I wanted mergerfs.balance /mnt/mergerfs/ todo =

  • disk1 50%
  • disk2 50%
  • disk3 50%
  • disk4 50%

abbekeff avatar Apr 10 '25 10:04 abbekeff

I'm not following. That's what it effectively does. Move file from filesystem with least free space % wise to the most. Repeat till difference between all filesystems is < 2% or whatever configured.

trapexit avatar Apr 10 '25 12:04 trapexit