How to add new device to ZFS mirror?

Whattteva

New Member
Feb 16, 2023
21
9
3
Hi, I'm trying to add a new device to a mirror vdev.

I did this command zpool attach rpool <existing_disk_id> /dev/sdc and this works fine, but when I look at the partition table, it seems like it only replicates the ZFS data, but not the BIOS and EFI boot partitions that the other two disks in the vdev has. How do I make sure these partition tables also get replicated?
 
Thanks. So I actually asked because I wasn't sure how to modify that replacement into just a simple addition, and I was worried I was going to overwrite or just done something horribly wrong and render the system unbootable/unrecoverable.

Here are the steps I took for reference to whomever wants a straight-shot process. The following code assumes that /dev/sda and /dev/sdb are the two existing disks in the mirror vdev and /dev/sdc is the new disk to be added. I also used fdisk -l to figure out the currently attached disks and their partition tables. Also, the id's for the last attach command can be obtained by using ls -lh /dev/disk/by-id

Bash:
sgdisk /dev/sda -R /dev/sdc
sgdisk -G /dev/sdc
zpool attach rpool ata-INTEL_SSD-part3 ata-MZ7KM960-part3
 
  • Like
Reactions: Scuro

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!