nas:zfs:replace_drive
Raplce a device in a ZFS pool
Example config before:
config:
NAME STATE READ WRITE CKSUM
storage ONLINE 0 0 0
raidz1-0 ONLINE 0 0 0
ata-ST12000NM0008-2H3101_ZHZ4LWL0 ONLINE 0 0 0
ata-ST12000NM0008-2H3101_ZHZ5HTAQ ONLINE 0 0 0
ata-ST12000NM0008-2H3101_ZHZ6H0PS ONLINE 0 0 0
ata-ST12000NM001G-2MV103_ZL21YC1S ONLINE 0 0 0
ata-ST12000NM001G-2MV103_ZL25ZSXG ONLINE 0 0 0
ata-ST12000NM001G-2MV103_ZL26VRV0 ONLINE 0 0 0
logs
nvme0n1p2 ONLINE 0 0 0
zpool replace storage /dev/disk/by-id/ata-ST12000NM001G-2MV103_ZL21YC1S /dev/disk/by-id/ata-ST12000NM001G-2MV103_ZS806SKT
Example status output
scan: resilver in progress since Sun Feb 5 19:28:46 2023
19.6G scanned at 1.51G/s, 7.15G issued at 563M/s, 41.6T total
0B resilvered, 0.02% done, 21:30:34 to go
config:
NAME STATE READ WRITE CKSUM
storage ONLINE 0 0 0
raidz1-0 ONLINE 0 0 0
ata-ST12000NM0008-2H3101_ZHZ4LWL0 ONLINE 0 0 0
ata-ST12000NM0008-2H3101_ZHZ5HTAQ ONLINE 0 0 0
ata-ST12000NM0008-2H3101_ZHZ6H0PS ONLINE 0 0 0
replacing-3 ONLINE 0 0 0
ata-ST12000NM001G-2MV103_ZL21YC1S ONLINE 0 0 0
ata-ST12000NM001G-2MV103_ZS806SKT ONLINE 0 0 0
ata-ST12000NM001G-2MV103_ZL25ZSXG ONLINE 0 0 0
ata-ST12000NM001G-2MV103_ZL26VRV0 ONLINE 0 0 0
logs
nvme0n1p2 ONLINE 0 0 0
The time in scan: is only a rough estimate and depends on how much work is already done. E. g. after over 24h in can look something like:
scan: resilver in progress since Sun Feb 5 19:28:46 2023 31.6T scanned at 558M/s, 27.7T issued at 489M/s, 41.6T total 4.48T resilvered, 66.66% done, 08:15:18 to
nas/zfs/replace_drive.txt · Last modified: by admin