# zpool list
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
rpool 7.27T 13.0G 7.25T – – 0% 0% 1.00x DEGRADED –
# zpool status -v
pool: rpool
state: DEGRADED
status: One or more devices are faulted in response to persistent errors.
Sufficient replicas exist for the pool to continue functioning in a
degraded state.
action: Replace the faulted device, or use ‚zpool clear’ to mark the device
repaired.
scan: scrub repaired 704K in 0 days 00:07:18 with 0 errors on Sun Mar 8 00:31:47 2020
config:
NAME STATE READ WRITE CKSUM
rpool DEGRADED 0 0 0
raidz1-0 DEGRADED 0 0 0
ata-ST2000DM001-1ER164_W4Z0E981-part3 ONLINE 0 0 0
ata-WDC_WD20EARS-00MVWB0_WD-WCAZA3946000-part3 FAULTED 178 0 0 too many errors
ata-ST2000DM001-9YN164_Z1E1DQEV-part3 ONLINE 0 0 0
ata-ST2000DM001-9YN164_W24055XV-part3 ONLINE 0 0 0
Po włożeniu nowego dysku kopiujemy tablicę partycji:
sgdisk --replicate=/dev/sdb /dev/sda
(z sda do sdb)
Randomizujemy UIDy:
# sgdisk --randomize-guids /dev/sdb
#zpool replace rpool ata-WDC_WD20EARS-00MVWB0_WD-WCAZA3946000-part3 sdb3
i już:
zpool status -v
pool: rpool
state: ONLINE
scan: resilvered 2.42G in 0 days 00:01:58 with 0 errors on Wed Mar 18 16:09:50 2020
config:
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
raidz1-0 ONLINE 0 0 0
ata-ST2000DM001-1ER164_W4Z0E981-part3 ONLINE 0 0 0
sdb3 ONLINE 0 0 0
ata-ST2000DM001-9YN164_Z1E1DQEV-part3 ONLINE 0 0 0
ata-ST2000DM001-9YN164_W24055XV-part3 ONLINE 0 0 0
errors: No known data errors
Jeśli nie da się z jakiegoś powodu zrobić replace (np. busy), można zrobić zpool detach (usunięcie) i zpool attach (dodanie jako mirror).
Na koniec jeszcze (dopiero gdy zakończy się synchronizacja i dysk będzie ONLINE) :
grub-install /dev/sdb
W proxmox od 6.4:
# proxmox-boot-tool status
# proxmox-boot-tool format /dev/sda2
# proxmox-boot-tool init /dev/sda2
# proxmox-boot-tool refresh