TrueNAS SCALE VDEV Rebalancing

Hi All,

My datasets have grown to the point where doing send/receive is no longer a viable option for me to easily rebalance the data on my pool.

Several others have recommended this script

https://github.com/markusressel/zfs-inplace-rebalancing

But it seems a missing prerequisite breaks it in Scale:

root@prod[/mnt/pool]# pacman -S bc

zsh: command not found: pacman

1667964413248.png

Is there another way to accomplish what my goal of rebalancing my VDEVs? They are pretty whacked out right now, as I’ve added two new VDEVs in the past year or so.

I commented out lines 60 and 61 so I don’t have progress tracking, but it seems to be working fine. Just wondering if I could accomplish the same result a better way.

1 Like

Pacman is the package manager for Arch linux, so that won’t work on Truenas.

The bc command is a simple calculator. If you want to install it you’ll need to do this through whatever package manager truenas has.

Also TBH I wouldn’t worry about rebalancing your pool. Only workloads with lots of random reads like databases would really benefit from it. Large media files are sequential and generally buffered, so they can be read easily with large sequential reads.

It doesn’t have one :stuck_out_tongue:
That’s why I was sad.

But in any case, I hear you. What’s also nice, is that it should also work such that metadata that is current stored only on the spinning disks will get “moved” to my SPECIAL VDEV. So, really, it’s usefulness is twofold.

Also, not ALL of this data is large media files :rofl:

You could also replace those two lines with:

color_echo "${Cyan}" "Progress -- files: ${current_index}/${file_count}"

Then use brain-maths to track progress, though that’s getting rare these days :wink: .

Edit: Or use bash maths;

echo $((100*16/72))
22
1 Like

after installing bc with the truenas scale package manager did the rebalancing work?