Hi,
I have proxmox running on ZFS RAID1 on 2 disks.
I would like to replace both disks (with higher quality disks of equivilant size)
Please advise which is the best method of these - or if i should use an alternate method.
A. zpool replace
1. Partition new disks
2. Replace disk 1
3. Replace disk 2
4. Chroot into new root and install GRUB on each new disk’s ESP
5. Reboot
B. Force repair
Pull one disk, use the new one as a replacement, repeat.
C. Clonezilla or other options
Essentially, shut down the system and just clone each disk. My much preferred option, but apparently not good with ZFS due to GUID's.
Thanks in advance,
Sam
I have proxmox running on ZFS RAID1 on 2 disks.
I would like to replace both disks (with higher quality disks of equivilant size)
Please advise which is the best method of these - or if i should use an alternate method.
A. zpool replace
1. Partition new disks
Bash:
sgdisk --replicate=/dev/sdc /dev/sda
sgdisk --randomize-guids /dev/sdc
sgdisk --replicate=/dev/sdd /dev/sdb
sgdisk --randomize-guids /dev/sdd
partprobe /dev/sdc
partprobe /dev/sdd
2. Replace disk 1
Bash:
OLD1=$(blkid -s PARTUUID -o value /dev/disk/by-id/…-sda2)
zpool replace rpool \
/dev/disk/by-partuuid/$OLD1 \
/dev/disk/by-partuuid/$OLD1
3. Replace disk 2
Bash:
OLD2=$(blkid -s PARTUUID -o value /dev/disk/by-id/…-sdb2)
zpool replace rpool \
/dev/disk/by-partuuid/$OLD2 \
/dev/disk/by-partuuid/$OLD2
4. Chroot into new root and install GRUB on each new disk’s ESP
Bash:
mount --bind /dev /mnt/new/dev
mount --bind /proc /mnt/new/proc
mount --bind /sys /mnt/new/sys
chroot /mnt/new /bin/bash -l
for disk in /dev/disk/by-id/…-sdc /dev/disk/by-id/…-sdd; do
grub-install --target=x86_64-efi \
--efi-directory=/boot/efi \
--bootloader-id="proxmox" \
--recheck "$disk"
done
update-grub
5. Reboot
B. Force repair
Pull one disk, use the new one as a replacement, repeat.
C. Clonezilla or other options
Essentially, shut down the system and just clone each disk. My much preferred option, but apparently not good with ZFS due to GUID's.
Thanks in advance,
Sam