Data distribution "normalization" when adding vdevs?

gsrcrxsi

Explorer
Joined
Apr 15, 2018
Messages
86
maybe normalization isnt the right word, since that might refer to something else in the context of ZFS/truenas. But what I mean is how evenly the data is spread across each disk or vdev.

my current pool consists of 8x 12TB disks arranged as 4x mirror vdevs. this originally started as a 4-disk array with 2x mirror vdevs. and I noticed at the time that when I added the other 4 disks and vdevs, new data was written to all disks, but reading back older, I could see that it was only getting activity on the first 4 drives. I didnt really bother with it then since the amount of data on only the first 4 drives was quite small.

now, I'm about 66% pool filled, so I'm getting to the point of expanding the array. I could maintain the 8-disk 4x-vdev setup and swap out to larger disks, or I could throw in a 5th mirror vdev. but I would like to maintain the performance benefits of having all data striped across the whole array.

is there some command or function in ZFS to do this? I hope I've explained this well enough.
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
Hello,

ZFS will not relocate or redistribute existing data onto newly added vdevs unless the file is overwritten. That's why you see the "new data using new disks" and "old data" reading from the old ones. You can find some reports from other users here by searching for terms like "rebalancing" or "rewriting":


Several users have made use of an "in-place rebalancing script" from Github that's been linked in some other places - this basically copies each file with a new extension, and then renames it to the old name - but you'd have to be cautious about the space overhead with an approach such as this, especially if you make use of snapshots for data protection, as ZFS will consider each of these files as a brand new copy, while retaining the old file in your snapshots.
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
From memory it doesn't work under Scale - at least last time I tried. Might work as a container.

run at the command line - command not found - bc
Also I suspect that using NFS ACL's is also a problem
 
Last edited:
Top