I have a running freenas zfs on raid-z1. For safety i though of increasing parity. Enough spare space is available.
Is it possible to upgrade a zfs raid-z1 to raid-z2 or raid-z3?
thx for your help
Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.Visit Stack Exchange
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
As explained by Shane, you have to determine the RAID-Z level on creation. the RAID level cannot be changed at any time later. It may be changed by recreating the raid, however. Adding drives to a RAID-Z is also limited and should be avoided.
NEVER, ever add a single drive to a RAID-Z.
Adding a single HDD to a RAID-Z is a really bad idea. Assuming the first RAID-Z is full and ZFS stripes data, all data is written to the single drive. The single drive does not have any mirror and thus may get lost on a failure. Thus, it does not provide any integrity or parity correction!
This is possible, but probably not recommended either. Adding drives to an existing RAID-Z will create an additional RAID-Z and stripe the data over both RAID-Zs. If the first RAID-Z is full, all data will be written to the newly-added RAID-Z. ZFS does not rebalance the data. If you'd like to get a performance increase by adding new drives, you are probably better off fully recreating the RAID.
A really good explanation why can be found in the blog post ZFS: You should use mirror vdevs, not RAIDZ.
Simplified, there are several reasons:
This is just for completeness. I'm not affiliated with Rockstor or FreeNAS, just evaluating both for myself.
In the future, butterfs or btrfs may solve these problems. An alternative to FreeNAS may become Rockstor. Synology and other NAS systems have integrated it lately in their solutions.
ATTENTION: As of Aug. 2016, btrfs has bugs in the raid code and is not stable. As I understand it, consider only using it with stripped mirrors.
Unfortunately, no; you cannot re-shape a RAID-Z group to a different level of RAID-Z, you'd need to move the data elsewhere and add the disks to the pool with the desired level at the time of creation.