https://freebsdfoundation.org/blog/raid-z-expansion-feature-for-zfs-goes-live/ [logo] * Our Work + Events + Projects + Grants + Research + Education & Advocacy + Infrastructure Support + Latest Updates + FreeBSD Journal + Newsletter * FreeBSD Project + What is FreeBSD? + Get FreeBSD + FreeBSD Resources + Testimonials + FreeBSD Case Studies + Presentation Library * Get Involved + Attend an Event + Propose a Project + Apply for a Grant + Use the Logo + Volunteer * About Us + About the Foundation + Our Team + Board of Directors + Open Positions + Contact Us * Our Donors + Donor Roster + Partnership Program * Donate * Search Goal: $1,250,000 Current Donations: $1,276,535 Donors:824 DONATE NOW [big-arrow-] [big-arrow-] RAID-Z Expansion Feature for ZFS Goes Live February 7, 2022 How it works The feature reflows existing data, essentially rewriting it onto a new arrangement of disks - meaning the original group plus a newly added disk. In so doing, a new adjacent chunk of free space is created at the end of the logical RAID-Z group and thus at the end of each physical disk. The reflowed data retains the original logical stripe width, meaning the ratio of data to parity will remain the same. Newly written data will use the new logical stripe width with an improved data to parity ratio. The reflow happens online, while other zfs and zpool operations are also in progress. Expansions can be made multiple times. However, pools must be healthy and if a disk were to die, the process will pause to allow for it to be reconstructed. It works with RAIDZ-1/2/3. Below are two figures illustrating the difference in how traditional expansion of RAID 4/5/6 works (Fig 1) versus how this new RAID-Z Expansion Feature works (Fig2). Figure 1: [y7OwejZNQA] Reflowing data doesn't change or read block pointers. Reads and writes are performed sequentially. Spacemaps reveal what data needs to be copied. Last but not least, each logical stripe is independent making it unnecessary to know where parity is. Segments are still stored on different disks which preserves redundancy. Figure 2: [UDEC2zM7E1] How to use it: Start with the command: + zpool attach test raidz2-0 /var/tmp/6 In this command example "zpool attach" means attach a disk to the pool and "test" is the name of the pool. The name of the existing raidz vdev is "raidz2-0" and "/var/tmp/6" is the name of the new disk. That looks a little different than disk names in production. The point here is to show placement in the command line for the actual name of the disk. Figure 3 [Azyb0HEIpr9qpH1pFhCTOdgDkULYIo-7E7EVnr0J3EpdCfw452YEjR0kAuPI0ddkwDp2x5LH2plkyv0A4kuocdF] Expect it to take a while as it has to move the data around on the disks. This line will report the progress it is making for you: "raidz expand: Expansion of vdev 0 in progress since Wed Jun 9 16:36:19 2021 444M copied out of 4.29G at 22.2M/s, 10.12% done, 0h2m to go" It will also tell you when the action is completed: "raidz expand: Expansion of vdev 0 copied 4.27G in 0h3m, completed on Wed Jun 9 16:39:31 2021" Now more space is available: Figure 4 [SQ4_NjAO0x] The status report While all capabilities of this feature have been implemented and all tests so far have been passed, there are still a few loose ends to tie up. Specifically, there is some code cleanup to do, some verbose logging to remove, some code documentation to write, and similar relatively minor tasks. We aim for this to be integrated by Q3. But the biggest need for additional help is in testing the feature further and in doing a code review before this feature can be integrated. Previous FreeBSD Foundation Logo 3980 Broadway Street STE #103-107 Boulder CO 80304 1-720-207-5142 info@freebsdfoundation.org * Forms * Finances * Legal * Privacy Policy * Advocacy Facebook Twitter LinkedIn (c)2001-2022 The FreeBSD Foundation. Website designed and built by Giant Rabbit. Join Our Mailing List [ ] [Sign Up] [1]