mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
5caeef02fa
This feature allows disks to be added one at a time to a RAID-Z group, expanding its capacity incrementally. This feature is especially useful for small pools (typically with only one RAID-Z group), where there isn't sufficient hardware to add capacity by adding a whole new RAID-Z group (typically doubling the number of disks). == Initiating expansion == A new device (disk) can be attached to an existing RAIDZ vdev, by running `zpool attach POOL raidzP-N NEW_DEVICE`, e.g. `zpool attach tank raidz2-0 sda`. The new device will become part of the RAIDZ group. A "raidz expansion" will be initiated, and the new device will contribute additional space to the RAIDZ group once the expansion completes. The `feature@raidz_expansion` on-disk feature flag must be `enabled` to initiate an expansion, and it remains `active` for the life of the pool. In other words, pools with expanded RAIDZ vdevs can not be imported by older releases of the ZFS software. == During expansion == The expansion entails reading all allocated space from existing disks in the RAIDZ group, and rewriting it to the new disks in the RAIDZ group (including the newly added device). The expansion progress can be monitored with `zpool status`. Data redundancy is maintained during (and after) the expansion. If a disk fails while the expansion is in progress, the expansion pauses until the health of the RAIDZ vdev is restored (e.g. by replacing the failed disk and waiting for reconstruction to complete). The pool remains accessible during expansion. Following a reboot or export/import, the expansion resumes where it left off. == After expansion == When the expansion completes, the additional space is available for use, and is reflected in the `available` zfs property (as seen in `zfs list`, `df`, etc). Expansion does not change the number of failures that can be tolerated without data loss (e.g. a RAIDZ2 is still a RAIDZ2 even after expansion). A RAIDZ vdev can be expanded multiple times. 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). However, the RAIDZ vdev's "assumed parity ratio" does not change, so slightly less space than is expected may be reported for newly-written blocks, according to `zfs list`, `df`, `ls -s`, and similar tools. Sponsored-by: The FreeBSD Foundation Sponsored-by: iXsystems, Inc. Sponsored-by: vStack Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Mark Maybee <mark.maybee@delphix.com> Authored-by: Matthew Ahrens <mahrens@delphix.com> Contributions-by: Fedor Uporov <fuporov.vstack@gmail.com> Contributions-by: Stuart Maybee <stuart.maybee@comcast.net> Contributions-by: Thorsten Behrens <tbehrens@outlook.com> Contributions-by: Fmstrat <nospam@nowsci.com> Contributions-by: Don Brady <dev.fs.zfs@gmail.com> Signed-off-by: Don Brady <dev.fs.zfs@gmail.com> Closes #15022 |
||
---|---|---|
.. | ||
.gitignore | ||
fsck.zfs.8 | ||
mount.zfs.8 | ||
vdev_id.8 | ||
zdb.8 | ||
zed.8.in | ||
zfs_ids_to_path.8 | ||
zfs_prepare_disk.8.in | ||
zfs-allow.8 | ||
zfs-bookmark.8 | ||
zfs-change-key.8 | ||
zfs-clone.8 | ||
zfs-create.8 | ||
zfs-destroy.8 | ||
zfs-diff.8 | ||
zfs-get.8 | ||
zfs-groupspace.8 | ||
zfs-hold.8 | ||
zfs-inherit.8 | ||
zfs-jail.8 | ||
zfs-list.8 | ||
zfs-load-key.8 | ||
zfs-mount-generator.8.in | ||
zfs-mount.8 | ||
zfs-program.8 | ||
zfs-project.8 | ||
zfs-projectspace.8 | ||
zfs-promote.8 | ||
zfs-receive.8 | ||
zfs-recv.8 | ||
zfs-redact.8 | ||
zfs-release.8 | ||
zfs-rename.8 | ||
zfs-rollback.8 | ||
zfs-send.8 | ||
zfs-set.8 | ||
zfs-share.8 | ||
zfs-snapshot.8 | ||
zfs-unallow.8 | ||
zfs-unjail.8 | ||
zfs-unload-key.8 | ||
zfs-unmount.8 | ||
zfs-unzone.8 | ||
zfs-upgrade.8 | ||
zfs-userspace.8 | ||
zfs-wait.8 | ||
zfs-zone.8 | ||
zfs.8 | ||
zgenhostid.8 | ||
zinject.8 | ||
zpool_influxdb.8 | ||
zpool-add.8 | ||
zpool-attach.8 | ||
zpool-checkpoint.8 | ||
zpool-clear.8 | ||
zpool-create.8 | ||
zpool-destroy.8 | ||
zpool-detach.8 | ||
zpool-events.8 | ||
zpool-export.8 | ||
zpool-get.8 | ||
zpool-history.8 | ||
zpool-import.8 | ||
zpool-initialize.8 | ||
zpool-iostat.8 | ||
zpool-labelclear.8 | ||
zpool-list.8 | ||
zpool-offline.8 | ||
zpool-online.8 | ||
zpool-reguid.8 | ||
zpool-remove.8 | ||
zpool-reopen.8 | ||
zpool-replace.8 | ||
zpool-resilver.8 | ||
zpool-scrub.8 | ||
zpool-set.8 | ||
zpool-split.8 | ||
zpool-status.8 | ||
zpool-sync.8 | ||
zpool-trim.8 | ||
zpool-upgrade.8 | ||
zpool-wait.8 | ||
zpool.8 | ||
zstream.8 | ||
zstreamdump.8 |