I know there are scripts to rebalance a pool after adding a data vdev (like GitHub - markusressel/zfs-inplace-rebalancing: Simple bash script to rebalance pool data between all mirrors when adding vdevs to a pool.).
Would such a rebalancing also help if one added a special metadata vdev after the creation of a pool?
Okay I think I just didn’t look hard enough before asking:
According to Special VDEV (sVDEV) Planning, Sizing, and Considerations a rebalance does populate special metadata vdevs.
This was written for TrueNAS Core but I have no reason to suspect SCALE could behave differently.
As best as I can tell, rebalancing does populate the small files part of the sVDEV by virtue of summaries showing a certain percentage of files being smaller than the small file cutoff, and said files would naturally wander into the sVDEV once they are copied. (See the pool stats in the resource page)
I do not possess the skills to figure out where ZFS is storing a given file (ie which VDEV or sVDEV) so I cannot verify this for sure, but this seems logical given what the rebalance script does.
As best as I can tell, rebalance basically does a cp to a new file name followed by a delete of the original file, followed by a mv of the copied file to the original file name. Hence the need for file ownership.
Does anyone know how to ascertain the actual disks / VDEVs / sVDEVs that a file is stored in?
1 Like