Live data from Hacker News

ZFS 2.3 released with ZFS raidz expansion

github.com

31–40 of 331 posts

Re: ZFS 2.3 released with ZFS raidz expansion

#31

Can someone describe why they would use ZFS (or similar) for home usage?

Several reasons, but major ones (for me) are reliability (checksums and self-healing) and portability (no other modern filesystem can be read and written on Linux, FreeBSD, Windows, and macOS).

Snapshots ("boot environments") are also supported by Btrfs (my Linux installations use that so I don't have to worry about having the 3rd party kernel module to read my rootfs). Performance isn't that great either and, assuming Linux, XFS is a better choice if that is your main concern.

Re: ZFS 2.3 released with ZFS raidz expansion

#32
post #29
post #26

Earlier quoted context omitted.

That was added a while ago: https://openzfs.github.io/openzfs-docs/man/master/8/zpool-re... It works by making a readonly copy of the vdev being removed inside the remaining space. The existing vdev is then removed. Data can still be accessed from the copy, but new writes will go to an actual vdev while data no longer needed on the copy is gradually reclaimed as free space as the old data is no longer needed.

Although "Top-level vdevs can only be removed if the primary pool storage does not contain a top-level raidz vdev, all top-level vdevs have the same sector size, and the keys for all encrypted datasets are loaded."

I forgot we still did not have that last bit implemented. However, it is less important now that we have expansion.

Re: ZFS 2.3 released with ZFS raidz expansion

#34
post #16

Earlier quoted context omitted.

> It is possible with windows storage space (remove drive from a pool) and mdadm/lvm (remove disk from a RAID array, remove volume from lvm), which to me are the two major alternatives. Don't know about unraid. Perhaps I am misunderstanding you, but you can offline and remove drives from a ZFS pool. Do you mean WSS and mdadm/lvm will allow an automatic live rebalance and then reconfigure the drive topology?

> Do you mean WSS and mdadm/lvm will allow an automatic live rebalance and then reconfigure of the drive topo? mdadm can convert RAID-5 to a larger or smaller RAID-5, RAID-6 to a larger or smaller RAID-6, RAID-5 to RAID-6 or the other way around, RAID-0 to a degraded RAID-5, and many other fairly reasonable operations, while the array is online, resistant to power loss and the likes. I wrote the first version of this…

Doing this with the on disk data in a merkle tree is much harder than doing it on more conventional forms of storage.

By the way, what does MD do when there is corrupt data on disk that makes it impossible to know what the correct reconstruction is during a reshape operation? ZFS will know what file was damaged and proceed with the undamaged parts. ZFS might even be able to repair the damaged data from ditto blocks. I don’t know what the MD behavior is, but its options for handling this are likely far more limited.

Re: ZFS 2.3 released with ZFS raidz expansion

#36
post #34
post #16

Earlier quoted context omitted.

> Do you mean WSS and mdadm/lvm will allow an automatic live rebalance and then reconfigure of the drive topo? mdadm can convert RAID-5 to a larger or smaller RAID-5, RAID-6 to a larger or smaller RAID-6, RAID-5 to RAID-6 or the other way around, RAID-0 to a degraded RAID-5, and many other fairly reasonable operations, while the array is online, resistant to power loss and the likes. I wrote the first version of this…

Doing this with the on disk data in a merkle tree is much harder than doing it on more conventional forms of storage. By the way, what does MD do when there is corrupt data on disk that makes it impossible to know what the correct reconstruction is during a reshape operation? ZFS will know what file was damaged and proceed with the undamaged parts. ZFS might even be able to repair the damaged data from ditto blocks.…

Well, then they made a design choice in their RAID implementation that made fairly reasonable things hard.

I don't know what md does if the parity doesn't match up, no. (I've never ever had that happen, in more than 25 years of pretty heavy md use on various disks.)

Re: ZFS 2.3 released with ZFS raidz expansion

#37

Would love to use ZFS, but unfortunately Fedora just cant keep up with it...

Not sure if it helps you at all, but I have a simple Ruby script that I use to build kernels on Fedora with a specified ZFS version.

https://github.com/kaspergrubbe/fedora-kernel-compilation/bl...

It builds on top of the exploded fedora kernel tree, adds zfs and spits out a .rpm that you can install with rpm -ivh.

It doesn't play well with dkms because it tries to interfere, so I disable it on my system.

Re: ZFS 2.3 released with ZFS raidz expansion

#38

FINALLY! You can do borderline insane single-vdev setups like RAID-Z3 with 4 disks (3 Disks worth of redundancy) of the most expensive and highest density hard drives money can buy right now, for an initial effective space usage of 25% and then keep buying and expanding Disk by Disk, with the space demand growing, up to something like 12ish disks. Disk prices dropping as time goes on and a spread out failure chance w…

Yes but see my sibling comment.

When you expand your array, your existing data will not be stored any more efficiently.

To get the new parity/data ratios, you would have to force copies of the data and delete the old, inefficient versions, e.g. with something like this [1]

My personal take is that it's a much better idea to buy individual complete raid-z configurations and add new ones / replace old ones (disk by disk!) as you go.

[1] https://github.com/markusressel/zfs-inplace-rebalancing

Re: ZFS 2.3 released with ZFS raidz expansion

#39

Can someone describe why they would use ZFS (or similar) for home usage?

It's relatively easy, and yet powerful. Before that I had MDADM + LVM + dm-crypt + ext4, which also worked but all the layers got me into a headache.

Automated snapshots are super easy and fast. Also easy to access if you deleted a file, you don't have to restore the whole snapshot, you can just cp from the hidden .zfs/ folder.

I run it on 6x 8TB disk for a couple of years now. I run it in a raidz2, which means up to 2 disk can die. Would I use it on a single disk on a Desktop? Probably not.

Re: ZFS 2.3 released with ZFS raidz expansion

#40
post #18
post #14

Earlier quoted context omitted.

I'm not yet familiar with zfs and couldn't find it in the release note: Does expansion only works with disk of the same size? Or is adding are bigger/smaller disks possible or do all disk need to have the same size?

You need to buy the same exact drive with the same capacity and speed. Your raidz vdev be as small and as slow as your smallest and slowest drive. btrfs and the new bcachefs can do RAID with mixed drives, but I can’t trust either of them with my data yet.

It doesn't have to be the same exact drive. Mixing drives from different manufacturers (with the same capacity) is often used to prevent correlated failure. ZFS is not using the whole disk, so different disks can be mixed, because the disk often have varying capacity.
Post reply on HN