Replacing a failed drive in ZFS root pool.

kleggat

Member
Nov 1, 2020
1
0
6
39
I followed these steps for replacing a failed bootable drive https://pve.proxmox.com/wiki/ZFS_on_Linux#sysadmin_zfs_change_failed_dev

Code:
sgdisk <healthy bootable device> -R <new device>
sgdisk -G <new device>
zpool replace -f <pool> <old zfs partition> <new zfs partition>


But I entered the wrong drive in when I was running sgdisk and mistakenly ran

Code:
sgdisk <device with errors that I'm replacing> -R <new device>

I've replaced the disk in the root pool, the pool is showing online but I get an error when running the grub-install command. This error is what lead me to retrace my steps and realize I ran the sgdisk command incorrectly. Can I run the sgdisk command again or will that cause a problem with my root pool? Do I need to take the drive offline in the pool before I run sgdisk something like what I have below?

Code:
zpool offline rpool <new device>
sgdisk <healthy bootable device> -R <new device>
zpool online rpool <new device>
 
Last edited:
I don't think it should cause any issues. But i would offline the disk first.
Just don't do something to the healthy drive.

And i hope we're talking about Raid1 here.
 

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!