> After the expansion completes, old blocks remain with their old data-to-parity ratio (e.g. 5-wide RAIDZ2, has 3 data to 2 parity), but distributed among the larger set of disks. New blocks will be written with the new data-to-parity ratio (e.g. a 5-wide RAIDZ2 which has been expanded once to 6-wide, has 4 data to 2 parity). Does anyone know why this is the case? When expanding an array which is getting full this wi…
> Does anyone know why this is the case? > Considering the process is already reading and rewriting basically the entire array, why not recalculate the parity as well? IANA expert but my guess is -- because, here, you don't have to modify block pointers, etc. ZFS RAIDZ is not like traditional RAID, as it's not just a sequence of arbitrary bits, data plus parity. RAIDZ stripe width is variable/dynamic, written in bloc…
OpenZFS – add disks to existing RAIDZ
151–160 of 177 posts
Re: OpenZFS – add disks to existing RAIDZ
#152> After the expansion completes, old blocks remain with their old data-to-parity ratio (e.g. 5-wide RAIDZ2, has 3 data to 2 parity), but distributed among the larger set of disks. New blocks will be written with the new data-to-parity ratio (e.g. a 5-wide RAIDZ2 which has been expanded once to 6-wide, has 4 data to 2 parity). Does anyone know why this is the case? When expanding an array which is getting full this wi…
That is not how this will work. The reason the parity ratio stays the same, is that all of the references to the data are by DVA (Data Virtual Address, effectively the LBA within the RAID-Z vdev). So the data will occupy the same amount of space and parity as it did before. All stripes in RAID-Z are dynamic, so if your stripe is 5 wide and your array is 6 wide, the 2nd stripe will start on the last disk and wrap arou…
Regardless, my entire point is that you still lose a significant amount of capacity due to the old data remaining as 3+2 rather than being rewritten to 4+2, which heavily disincentives the expansion of arrays reaching capacity - but that is the only time people would want to expand their array.
It just seems to me like they are spending a lot of effort on a feature which you frankly should not ever want to use.
Re: OpenZFS – add disks to existing RAIDZ
#153> After the expansion completes, old blocks remain with their old data-to-parity ratio (e.g. 5-wide RAIDZ2, has 3 data to 2 parity), but distributed among the larger set of disks. New blocks will be written with the new data-to-parity ratio (e.g. a 5-wide RAIDZ2 which has been expanded once to 6-wide, has 4 data to 2 parity). Does anyone know why this is the case? When expanding an array which is getting full this wi…
> Considering the process is already reading and rewriting basically the entire array, why not recalculate the parity as well? Because snapshots might refer to the old blocks. Sure you could recompute, but then any snapshots would mean those old blocks would have to stay around so now you've taken up ~twice the space.
Re: OpenZFS – add disks to existing RAIDZ
#154Earlier quoted context omitted.
Wouldn't it be better to apply stress over more drives to minimize the chances that you lose a second drive during a rebuild?
I believe this is the article I read when I started: https://jrs-s.net/2015/02/06/zfs-you-should-use-mirror-vdevs...
Listed survival probability of N-disk failure in 8-drive/4-vdev mirror.
1: 1; 2: 0.857; 3: 0.667; 4: 0.400; 5: 0; 6: N/A; 7: N/A; 8: N/A
Proper survival probability:
1: 1; 2: 0.857; 3: 0.571; 4: 0.229; 5: 0; 6: 0; 7: 0; 8: 0
Comparatively, survival probability for 8-drive RAIDz4 with equal amount of usable space:
1: 1; 2: 1; 3: 1; 4: 1; 5: 0; 6: 0; 7: 0; 8: 0
Personally, I'd use multi-vdev mirror pools only for data that is either backed-up or data I can afford to lose completely.
Re: OpenZFS – add disks to existing RAIDZ
#155Earlier quoted context omitted.
If you follow Qnap you may be aware of their security nightmare in recent years. And HERO OS is only available on the Enterprise range of NAS, not even Prosumer class NAS.
Something like TVS-h474 seems quite nice for a wide range of uses. I have TVS-h1288X and I am really happy with it, maybe it's a bit overkill for most. That said, I could not use zfs send from my prev fbsd server, there are some compat checks in QNAP's version. Used nfs to migrate from my decade++ old pool. Using Tailscale for access, they have QNAP builds on GH.
So it's not just a check for check's sake, I would suspect in practice their send/recv is just completely incompatible at this point.
Re: OpenZFS – add disks to existing RAIDZ
#156Earlier quoted context omitted.
Could you force a complete rewrite if you wanted to? That would be handy. Without copying all the data elsewhere of course. I don't have another 90TB of spare disks :P Edit: I suppose I could cover this with a shell script needing only the spare space of the largest file. Nice!
> Could you force a complete rewrite if you wanted to? On btrfs that's a rebalance, and part of how one expands an array (btrfs add + btrs balance) (Not sure if ZFS has a similar operation, but from my understanding resilvering would not be it) Not that it matters much though as RAID5 and RAID6 aren't dependable upon, and the array failure modes are weird in practice, so in context of expanding storage it really only…
Re: OpenZFS – add disks to existing RAIDZ
#157Earlier quoted context omitted.
That is not how this will work. The reason the parity ratio stays the same, is that all of the references to the data are by DVA (Data Virtual Address, effectively the LBA within the RAID-Z vdev). So the data will occupy the same amount of space and parity as it did before. All stripes in RAID-Z are dynamic, so if your stripe is 5 wide and your array is 6 wide, the 2nd stripe will start on the last disk and wrap arou…
The linked pull request says "After the expansion completes, old blocks remain with their old data-to-parity ratio (e.g. 5-wide RAIDZ2, has 3 data to 2 parity), but distributed among the larger set of disks". That'd mean that the disks do not contain the same data, but it is getting moved around? Regardless, my entire point is that you still lose a significant amount of capacity due to the old data remaining as 3+2 r…
I don't use raidz for my personal pools because it has the wrong set of tradeoffs for my usage, but if I did, I'd absolutely use this.
Yes, your data has the old data:parity ratio for older data, but you now have more total storage available, which is the entire goal. Sure, it'd be more space-efficient to go rewrite your data, piecemeal or entirely, afterward, but you now have more storage to work with, rather than having to remake the pool or replace every disk in the vdev with a larger one.
Re: OpenZFS – add disks to existing RAIDZ
#158Earlier quoted context omitted.
I imagine there would eventually be a way / option to automatically rewrite old blocks. Or at least I would hope so because usually when your adding new disks the array is going to be near full
IIRC one of the developers was asked about this and said it would be about as much additional effort as the whole expansion feature so far. There is of course the user-level workaround of (roughly) `for file in *; do cp $file $file.new && mv $file.new $file && done`, but if I understand correctly you'd need to do this with no snapshots, otherwise the space from $file wouldn't be freed so you'd need an array that's at…
I cannot stress how expensive and invasive that would be enough.
Re: OpenZFS – add disks to existing RAIDZ
#159Earlier quoted context omitted.
Eh, it can kinda work. If you have 1, 2,3,4TB drives you can make RAID10 out of first GB, then stitch 2TB RAID0 from second and third and RAID1 it with 2TB out of 4th drive. then raid1 out of remaining GB on 3rd and 4th. Then glue it together with LVM and hope for best.
Or you can just put all those devices into one BTRFS RAID 1 filesystem and not have to worry about it.
Re: OpenZFS – add disks to existing RAIDZ
#160Earlier quoted context omitted.
Or you can just put all those devices into one BTRFS RAID 1 filesystem and not have to worry about it.
Until the BTRS filesystem gets to some indeterminate threshold of “almost full”, at which point you typically need to reformat and restore from backups…