[SOLVED] Detach Disk from RaidZ1

adminkc

Member
Sep 28, 2020
91
0
11
29
Hi,

does somebody have experience with detaching the disk from an rpool with RaidZ1?

Best
 
I found this already with zpool offline but can i put the disk now out and replace it with a new disk.
Can I after that put the new disk in and set it online again?
 
but how the system check the hdd name.
if the broken disk is sdb for example how the system check when i put the new disk in, that the new disk is again sdb or does he give the hdd a new name?
 
You can check the newly attached disk with "dmesg".

It should show you the old disk disconnecting and the new one connecting and show you the new device name.

But you shouldn't use /dev/sd* names. Better is to go with the disks uuid.
Another methode is to execute:
ls -l /dev/disk/by-uuid/

after removing the disk. Then inserting the new one, run the command again and see which entry is new.

Then run zpool replace OLDDISK /dev/disk/by-uuid/NEWDISKUUID POOLNAME

But be careful not to replace it with another active disk or you will actively destroy your ZPOOL
 
Just do:

ls -l /dev/disk/by-uuid/ | grep sdd

and you will see the UUID of the disk.

then run

zpool replace OLDDISK /dev/disk/by-uuid/NEWDISKUUID POOLNAME

like i said.