How to add an additional drive to an existing ZFS RAIDZ-1 in Proxmox?

17,037

Solution 1

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.

Solution 2

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/

Share:
17,037

Related videos on Youtube

Emilio González Montaña
Author by

Emilio González Montaña

Passion for SW development and IT stuff. Take a look to my projects at: http://ociotec.com https://redmine.ociotec.com

Updated on September 18, 2022

Comments

  • Emilio González Montaña
    Emilio González Montaña over 1 year

    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! :)

  • Emilio González Montaña
    Emilio González Montaña almost 9 years
    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?
  • qasdfdsaq
    qasdfdsaq over 8 years
    @EmilioGonzálezMontaña: 1) Don't use ZFS or 2) Add groups of drives in multiple RAIDZ VDEVs.
  • user
    user over 8 years
    @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.
  • lapo
    lapo over 3 years
    GitHub PR to follow: github.com/openzfs/zfs/pull/8853