Live data from Hacker News

OpenZFS – add disks to existing RAIDZ

github.com

81–90 of 177 posts

Re: OpenZFS – add disks to existing RAIDZ

#81
post #29

> 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…

> To do what you want, you can do what one could always do -- zfs send/recv between a filesystem between and old and new filesystem.

Sure, but that involves having enough spare disks, enough places to put them, and enough places to connect them.

This way, while the initial expansion is not ideal, it works. If you really need the space gains from a wider distribution, you can do this expansion and then do the make a new copy, then replace old copy with a new copy dance... although that's counter productive if you have snapshots.

Re: OpenZFS – add disks to existing RAIDZ

#82
post #76
post #70

Earlier quoted context omitted.

Raid 1 does not work with heterogenous disk arrays.

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

#83
post #30

I wish Apple and Oracle would have just sorted things out and made ZFS the main filesystem for the Mac. Way back in the day when they first designed Time Machine, it was supposed to just be a GUI for ZFS snapshots. How cool would it be if we had a great GUI for ZFS (snapshots, volume management, etc.). I could buy a new external disk, add it to a pool, have seamless storage expansion. It would be great. Ah, what coul…

Yeah I wonder if it was really caused by Jonathan Schwartz bragging to the media about it and pissing Steve Jobs off, as was rumoured at the time. Or if there was more behind it.

I would certainly not put it past Jobs. While he had some genius qualities, his personality was pretty deeply flawed. But on the other hand I wonder if his sense for business would not have prevailed.

If only Apple had absorbed sun instead of oracle, their legacy would have been better off. Of course it couldn't have been worse.

Which also made me wonder, of course Jobs and Ellison were big friends so perhaps Jobs just left it for him to take? Oracle always wanted to get their hands on java obviously.

Ps the whole ZFS on Mac adventure came a little after time machine was already in production.

ZFS is indeed an amazing desktop filesystem. I'm using it now on FreeBSD, I moved away from Mac because it became ever more closed down. I wanted more control, not less.

Re: OpenZFS – add disks to existing RAIDZ

#84
post #30

I wish Apple and Oracle would have just sorted things out and made ZFS the main filesystem for the Mac. Way back in the day when they first designed Time Machine, it was supposed to just be a GUI for ZFS snapshots. How cool would it be if we had a great GUI for ZFS (snapshots, volume management, etc.). I could buy a new external disk, add it to a pool, have seamless storage expansion. It would be great. Ah, what coul…

> I could buy a new external disk, add it to a pool, have seamless storage expansion.

You still can't do that with ZFS though, that's what this PR is for.

Re: OpenZFS – add disks to existing RAIDZ

#85
post #8

Earlier quoted context omitted.

We may get a successor filesystem before that particular situation is sorted out.. By all accounts mainline is at best not interested, if not actively against ZFS on Linux. The last few kerfuffles around symbols used by the out-of-tree module laid out the position rather unambiguously.

> The last few kerfuffles around symbols used by the out-of-tree module laid out the position rather unambiguously. Source, for someone who isn't following kernel mailing lists?

https://lwn.net/Articles/939842/ was the most recent one (August 2023). The article focuses on the NVIDIA proprietary driver but the bulk of the comments are about the impact on ZFS.

ZFS is already a very awkward citizen on Linux (e.g. can't use the page cache so it has to duplicate all that in the ARC; won't be able to take advantage of multi-page folios because of the lowest-common-denominator SPL; ...) and it will get worse, not better.

Re: OpenZFS – add disks to existing RAIDZ

#87
post #29

> 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…

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!

Re: OpenZFS – add disks to existing RAIDZ

#88
post #30

I wish Apple and Oracle would have just sorted things out and made ZFS the main filesystem for the Mac. Way back in the day when they first designed Time Machine, it was supposed to just be a GUI for ZFS snapshots. How cool would it be if we had a great GUI for ZFS (snapshots, volume management, etc.). I could buy a new external disk, add it to a pool, have seamless storage expansion. It would be great. Ah, what coul…

> I could buy a new external disk, add it to a pool, have seamless storage expansion. You still can't do that with ZFS though, that's what this PR is for.

You can add devices as vdevs to a pool, though. You can't add disks to a vdev. (IIRC) It's no different to LVM in that aspect.

Re: OpenZFS – add disks to existing RAIDZ

#89
post #47

Earlier quoted context omitted.

> I’m a developer, I can afford it. None of my friends can. Mom definitely can’t. The only thing that can work for your mom and your friend is, in my opinion, a pair of disks in mirror. When the space finished, buy another box with two other disk in mirror. Anything more than this is not only too complex for the average user but also too expensive.

I think I would advise against a direct mirroring -- instead, I'd do sync-every-24-hours or something similar. Both schemes are vulnerable to the (admittedly rarer) errors where both drives fail simultaneously (e.g. mobo fried them) or are just ... destroyed by a fire or whatever. A periodic sync (while harder to set up) will occasionally save you from the deleting the wrong files which mirroring doesn't. Either way:…

> A periodic sync (while harder to set up) will occasionally save you from the deleting the wrong files which mirroring doesn't

Which ever solution for disks you end up with, you should definitely always be using something that keeps around periodic snapshots.

Re: OpenZFS – add disks to existing RAIDZ

#90
post #30

I wish Apple and Oracle would have just sorted things out and made ZFS the main filesystem for the Mac. Way back in the day when they first designed Time Machine, it was supposed to just be a GUI for ZFS snapshots. How cool would it be if we had a great GUI for ZFS (snapshots, volume management, etc.). I could buy a new external disk, add it to a pool, have seamless storage expansion. It would be great. Ah, what coul…

Apple wanted one FS across all devices and ZFS's ARC makes that less than useful in memory-starved phones (and base model Airs amirite?)

ZFS's separate cache meant that the better choice was APFS. Once they got around to writing it.

And on drives at least, TM backups ARE APFS snapshots.

Post reply on HN