Expand boot zfs raid1 with a third disk?

fips

Renowned Member
May 5, 2014
175
7
83
Hi,

my proxmox hosts have zfs raid1 with 2 disks as root file system.
Now I got few more disks and want to expand that raid1 with an additional disk.
Or if its unrisky even migrate it to zraid2.

Is that possible or do I have to reinstall proxmox ?
 
Since you have a mirrored vdev, you'd have to add another mirrored vdev (2 disks) to expand the pool and stripe over them all.
 
Additional to @trystan's answer:

Now I got few more disks and want to expand that raid1 with an additional disk.

Yes, it is possible to add a third disk to a two disk mirror

Here an example:

Code:
root@proxmox:/tmp# dd if=/dev/zero of=zdisk1 bs=1M count=128
root@proxmox:/tmp# dd if=/dev/zero of=zdisk2 bs=1M count=128
root@proxmox:/tmp# dd if=/dev/zero of=zdisk3 bs=1M count=128

root@proxmox:/tmp# zpool create zpooltest mirror /tmp/zdisk1 /tmp/zdisk2

root@proxmox:/tmp# zpool status -v zpooltest
  pool: zpooltest
 state: ONLINE
  scan: none requested
config:

    NAME             STATE     READ WRITE CKSUM
    zpooltest        ONLINE       0     0     0
      mirror-0       ONLINE       0     0     0
        /tmp/zdisk1  ONLINE       0     0     0
        /tmp/zdisk2  ONLINE       0     0     0

errors: No known data errors

root@proxmox:/tmp# zpool attach zpooltest /tmp/zdisk1 /tmp/zdisk3

root@proxmox:/tmp# zpool status zpooltest
  pool: zpooltest
 state: ONLINE
  scan: resilvered 82,5K in 0h0m with 0 errors on Mon Apr  9 18:54:48 2018
config:

    NAME             STATE     READ WRITE CKSUM
    zpooltest        ONLINE       0     0     0
      mirror-0       ONLINE       0     0     0
        /tmp/zdisk1  ONLINE       0     0     0
        /tmp/zdisk2  ONLINE       0     0     0
        /tmp/zdisk3  ONLINE       0     0     0

errors: No known data errors

root@proxmox:/tmp# zpool list zpooltest
NAME        SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
zpooltest   112M   104K   112M         -     0%     0%  1.00x  ONLINE  -

Now you have a three disk mirror with the size of one disk.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!