by gregmac · 9y ago · 0 comments
This is what eliminates it from home use for me.
It means to expand the pool the only way is to copy everything off (so you need enough spare storage to hold your entire pool), rebuild, then copy it back. The alternative is don't expand, and just add additional pools, but that starts losing benefits quickly (not having to think about where there's free space when adding something, not having to look in multiple locations to find something).
Can anyone who has been using ZFS long-term at home comment? How do you add more space?
It works pretty well - by the time I'm buying disks that are 4x as large I don't mind throwing the old disks away. I've definitely avoided data loss in scenarios where I'd previously lost data under linux md (which lacks checksums and handles disks with isolated UREs very poorly).
zpool attach <poolname> <first existing small vdev> <first larger new vdev>
zpool attach <poolname> <second existing small vdev> <second larger new vdev>
[...wait for the resilvering of the new vdevs...] You now have a 4-way mirror with 2 small and 2 large vdevs. Detach the small ones:
zpool detach <poolname> <first old vdev>
zpool detach <poolname> <second old vdev>
Now you have a pool made only of large vdevs. You just give the pool the permission to expand and occupy all this new space:
zpool set autoexpand=on <poolname>
Done. Did it oodles of times on Solaris with SAN storage, but did it at home too, and in the weirdest ways (no SATA ports available? No problem, attach the new drive via USB3, then when finished take it out of the enclosure and install it inside displacing the old drive), sometimes even rather unsafely (creating a pre-broken raidz with 4 good disks plus a sparse file, migrating data off a different pool, then decommissioning that old pool and using one of its disk to replace the sparse file).
If you want, though, you can add capacity by attaching a second raidz2 to an existing pool - this forces you to add 4 new drives instead of one, but it works:
zpool add <poolname> raidz2 <first new vdev> <second new vdev> <third new vdev> <fourth new vdev>
You now have a concat of 2 raidz2's, in a single pool.
Nowhere as elegant as merging a new slice in an existing z2, I concur. Does the job though. Oh and if you are insane you could probably even add a single device, resulting in a concat of a z2 + unmirrored single device. I don't think it will stop you from doing that.
Nope.
It will result in very uneven utilization which leads to poor performance. Not recommended. Is also extremely wasteful. The whole point of the sought feature is to minimize waste and cost. So no, I'd strongly disagree that it does the job.
For example, you can start with 1 mirrored vdev, then add another mirrored vdev. You can upgrade vdevs separately, so you'll need to replace just 2 disks to grow your pool.
The only thing you have to keep in mind is that data is striped across vdevs only when written, so if you add another vdev, you won't get performance gains for data which was written just to one vdev.
A mirror can resilver much faster, and it doesn't significantly affect the vdev performance while doing so. A RAIDZ resilver after a disc replacement can take a significant amount of time, and degrade performance seriously as it thrashes every single disc in the vdev.
Allan Jude and Michael Lucas' books on ZFS have tables describing the tradeoffs of the different possible vdev layouts, and they are worth a read for anyone setting up ZFS storage.
A 6x8TB RAID6 has a 0.0002% chance of a URE.
(Assuming URE rate of 10^-14, in reality this rate is lower)
But yeah, sizing your pool very generously when first building it is a good idea. I found that 6x 4TB drives in a raidz2 pool was within my budget, and it will take me a long time to fill 16TB.
On BTRFS you simply use the new space or rebalance the pool to use the new disk properly.
On SnapRAID the next scan will add the disk to the parity drive contents.
For low-cost home usage, it is much much more cost effective to only buy single disks and start with small pools over buying large pools or even replacing entire pools.
My solution is to use RAID1 exclusively. That means that I can keep attaching pairs of devices if I run out of diskspace. I can never get them out again, however :-)
Once I get it, I hot swap a drive, and start searching for sales on more drives.
Rinse, repeat, all 5 disks swapped, more space appears \o/
The problem is having a 6x3TB pool and turning it into a 7x3TB pool, which is arguably much much cheaper than buying 6x4TB.