23

I have an OpenSolaris server with a zpool backupz comprised of four SCSI drives:

-bash-3.2# zpool status backupz
  pool: backupz
 state: ONLINE
 scrub: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        backupz     ONLINE       0     0     0
          raidz1    ONLINE       0     0     0
            c7t0d0  ONLINE       0     0     0
            c7t1d0  ONLINE       0     0     0
            c7t2d0  ONLINE       0     0     0
            c7t3d0  ONLINE       0     0     0

errors: No known data errors

I want to add a fifth drive... but zpool add backupz raidz c7t4d0 isn't working...

-bash-3.2# zpool add backupz raidz c7t4d0
invalid vdev specification: raidz requires at least 2 devices

Can I not have a raidz config with 5 devices? Do I have to add two devices at once? or am I doing something incorrect altogether here?

Josh
  • 9,398

2 Answers2

33

See this thread from one of the FreeBSD lists: http://lists.freebsd.org/pipermail/freebsd-fs/2009-June/006327.html

To quote Dan Naumov,

To reiterate, you cant just add a single disk drive to a raidz1 or raidz2 pool. This is a known limitation (you can check with SUN ZFS docs). If you have an existing raidz and you MUST increase that particular pool's storage capabilities, you have 3 options:

1) Add a raidz of the same configuration to the pool (think 3 disk raidz + 3 disk raidz or 5 + 5, for example)

2) Replace each (and every) disk in your raidz pool one by one, letting it resilver after inserting each upgraded disk

3) Backup your data, destroy your pool and create a new raidz pool with a bigger amount of disks.

brent
  • 3,521
14

You can't expand an existing raidz vdev, you have to blow it away and create it again with the new drive(s). See the other answer for better details.

Side note: Someone actually worked out that it's technically possibly to add drives to a raidz, but the functionality hasn't been implemented. The same is true of removing a disk.

Chris S
  • 78,455