7

I've a ZFS installation in Proxmox, in particular a RAIDZ-1 file system, for testing purposes (before going on production with this setup) I've added a new drive to the machine, but I'm blocked on this point... What's the command to add the new drive to the zpool?

I've tried with zpool add, but I don't achieve to find the correct combination of commands & params.

This is the result of zpool status of my testing environment:

  pool: rpool
 state: ONLINE
  scan: none requested
config:

    NAME                                     STATE     READ WRITE CKSUM
    rpool                                    ONLINE       0     0     0
      raidz1-0                               ONLINE       0     0     0
        pci-0000:00:10.0-scsi-0:0:0:0-part2  ONLINE       0     0     0
        pci-0000:00:10.0-scsi-0:0:1:0-part2  ONLINE       0     0     0
        pci-0000:00:10.0-scsi-0:0:2:0-part2  ONLINE       0     0     0
        pci-0000:00:10.0-scsi-0:0:3:0-part2  ONLINE       0     0     0
        pci-0000:00:10.0-scsi-0:0:4:0-part2  ONLINE       0     0     0

errors: No known data errors

Thanks in advance! :)

2 Answers 2

4

You can't extend the existing raidz1 vdev by adding another disk but you can add another vdev to the pool to increase the pool's capacity. You'll need more than one additional disk if you want to retain redundancy. For example, you could use two disks to add a mirror vdev or 3+ disks for another raidz1 vdev.

3
  • 1
    Thanks for the answer, I didn' know this ZFS limitation (about no ability to extend existing RAIDZ vdev). I need redundancy but I would be glad to not buying all the drives at once... any recomendation? Jun 28, 2015 at 22:30
  • @EmilioGonzálezMontaña: 1) Don't use ZFS or 2) Add groups of drives in multiple RAIDZ VDEVs.
    – qasdfdsaq
    Aug 12, 2015 at 12:45
  • 1
    @EmilioGonzálezMontaña Or 3) initially create the pool with the desired redundancy level (for example, raidz2) but use sparse files (which you delete immediately afterwards, to conserve disk space) for some of the physical devices, up to a maximum of the number of redundant disks. I used that technique to migrate a ZFS pool from a two-way mirror to a 6-way raidz2, without needing any additional disks. The ability to change raidz redundancy levels on the fly comes up on occasion, but gets shot down; ZFS is intended for enterprise storage solutions, which implies a requirement of planning ahead.
    – user
    Oct 19, 2015 at 13:59
5

I know this question is old, but I just came across it. It looks like the ability to extend a RAIDZ one drive at a time is in the works! No ETA that I've seen though.

https://www.freebsdfoundation.org/blog/openzfs-raid-z-online-expansion-project-announcement/

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .