Replaced failed nvme boot raid, one(old) is by id, new is /dev/nvme1n1

FuriousRage

Renowned Member
Oct 17, 2014
119
4
83
Hi, i just replaced a DOA-ish nvme, old drive(s) was zfs mirrored by id, now the new drive is by /dev/nvme1n1.
zpool replace -f rpool nvme-eui.00000000000000000026b728344e7335-part3 /dev/nvme1n1
Any way to turn this nvme1n1 into by-id now when its reslivered back into the zfs pool?
 
Are you looking for?

Code:
ls -l /dev/disk/by-id/ | grep nvme1n1

Generally, however, I prefer PARTLABELs which are easy to assign with e.g. sgdisk -c and displayed with lsblk -o+PARTLABEL
 
Are you looking for?

Code:
ls -l /dev/disk/by-id/ | grep nvme1n1

Generally, however, I prefer PARTLABELs which are easy to assign with e.g. sgdisk -c and displayed with lsblk -o+PARTLABEL
Yes. but i have already attached the new nvme per /dev/nvme1n1. I guess i have to remove it from the raid, and reattach with the by id? Or does it not matter now (not going to add more drives to this raid, only replace when/if one fails)
 
Yes. but i have already attached the new nvme per /dev/nvme1n1. I guess i have to remove it from the raid, and reattach with the by id? Or does it not matter now (not going to add more drives to this raid, only replace when/if one fails)

If you can export the pool and re-import (with -d - the option can be used multiple times) as referenced in the link above, that would do (without resilvering). This of course has to be a pool that the system you are doing it on is not running from.

EDIT: See also: https://openzfs.github.io/openzfs-docs/man/master/8/zpool-import.8.html#d~2
 
Last edited: