Extend Proxmox Install Created Zpool

May 18, 2019
231
15
38
Varies
got 4 disks. when I installed proxmox i set it to use the first 2:

1666550207739.png

now I want to add disks 3 and 4 to stripe the mirror. i re-created (fdisk) the same partitions, in the same size, on 3 and 4. I believe I can just

Code:
zpool add rpool mirror /dev/disk/by-id/ata-WDC_...-part3 /dev/disk/by-id/ata-WDC_...-part3
?

but then I'm stuck on how to get proxmox to write the BIOS boot and EFI partitions on partitions 1 and 2 of the third and fourth disk. is it `proxmox-boot-tool init` or ??
 
got 4 disks. when I installed proxmox i set it to use the first 2:

View attachment 42502

now I want to add disks 3 and 4 to stripe the mirror. i re-created (fdisk) the same partitions, in the same size, on 3 and 4. I believe I can just

Code:
zpool add rpool mirror /dev/disk/by-id/ata-WDC_...-part3 /dev/disk/by-id/ata-WDC_...-part3
?
Jup.
but then I'm stuck on how to get proxmox to write the BIOS boot and EFI partitions on partitions 1 and 2 of the third and fourth disk. is it `proxmox-boot-tool init` or ??
Should be similar to the commands in chapter "Changing a failed bootable device": https://pve.proxmox.com/wiki/ZFS_on_Linux#_zfs_administration
There you also clone the partitions and write the bootloaders to the cloned partitions on the new disks.
 
  • Like
Reactions: Proxygen
following instructions, looking at doing this

Code:
sgdisk /dev/disk/by-id/ata-disk1-part3 /dev/disk/by-id/ata-disk3-part3
sgdisk /dev/disk/by-id/ata-disk2-part3 /dev/disk/by-id/ata-disk4-part3

sgdisk -G /dev/disk/by-id/ata-disk3-part3
sgdisk -G /dev/disk/by-id/ata-disk4-part3

zpool replace -f rpool /dev/disk/by-id/disk1-part3 /dev/disk/by-id/ata-disk3-part3
zpool replace -f rpool /dev/disk/by-id/disk2-part3 /dev/disk/by-id/ata-disk4-part3

am i supposed to do disk1>disk3 and disk2>4?
 
Last edited:
No the...
# sgdisk <healthy bootable device> -R <new device>
# sgdisk -G <new device>
...part to copy the partition table & partition layout from the old 2 disks to the new 2 disks. But instead of the...
zpool replace -f <pool> <old zfs partition> <new zfs partition>
...to replace a failed disk you use the...
zpool add rpool mirror /dev/disk/by-id/ata-WDC_...-part3 /dev/disk/by-id/ata-WDC_...-part3
...you already mentioned to add those two new ZFS partitions as a second vdev.

Then the...
# proxmox-boot-tool format <new disk's ESP>
# proxmox-boot-tool init <new disk's ESP>
..or..
# grub-install <new disk>
...to write the bootloader to the new 2 disks.
 
Last edited:
  • Like
Reactions: Proxygen
No the...

...part to copy the partition table & partition layout from the old 2 disks to the new 2 disks. But instead of the...

...to replace a failed disk you use the...

...you already mentioned to add those two new ZFS partitions as a second vdev.

Then the...

..or..

...to write the bootloader to the new 2 disks.

now I have (after partprobe)

Code:
        NAME                                                STATE     READ WRITE CKSUM
        rpool                                               ONLINE       0     0     0
          mirror-0                                          ONLINE       0     0     0
            ata-WDC_WD20EFRX-68EUZN0_WD-disk4-part3  ONLINE       0     0     0
            ata-WDC_WD20EFRX-68EUZN0_WD-disk2-part3  ONLINE       0     0     0
          mirror-3                                          ONLINE       0     0     0
            ata-WDC_WD20EFRX-68EUZN0_WD-disk1-part3  ONLINE       0     0     0
            ata-WDC_WD20EFRX-68EUZN0_WD-disk3-part3  ONLINE       0     0     0

A) mirror-0 used to be disk1+disk2, now it is disk4+disk2. i guess this is fine, just have to be kept in mind for the future.

B) i'm getting mirror-3 instead of mirror-1 bc I've done and undone this a couple of times. Is this also ok?
 
Last edited: