Hello,
I have configured RAID-1 while replacing the new disk with old disk not able to boot the OS after selecting the new disk as boot priority, Below is the process that we have tried from our end --
root@host250:~# zpool status
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 0B in 0 days 00:00:37 with 0 errors on Thu Jun 25 11:57:25 2020
config:
NAME STATE READ WRITE CKSUM
rpool DEGRADED 0 0 0
mirror-0 DEGRADED 0 0 0
scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-part3 ONLINE 0 0 0
scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part3 FAULTED 0 0 0 external device fault
root@host250:~# zpool offline -f -t rpool scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part3
root@host250:~# sgdisk --replicate=/dev/sda /dev/sdb
Creating new GPT entries.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
The operation has completed successfully.
root@host250:~# sgdisk --randomize-guids /dev/sdb
Creating new GPT entries.
The operation has completed successfully.
root@host250:~# grub-install /dev/sdb
Installing for i386-pc platform.
grub-install: error: cannot find a GRUB drive for /dev/sda3. Check your device.map.
root@host250:~# zpool replace -f rpool scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part3 /dev/sdb
Make sure to wait until resilver is done before rebooting.
root@host250:~# watch -n1 zpool status
root@host250:~#
root@host250:~# zpool status
pool: rpool
state: ONLINE
scan: resilvered 970M in 0 days 00:00:24 with 0 errors on Thu Jun 25 12:06:12 2020
config:
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-part3 ONLINE 0 0 0
sdb ONLINE 0 0 0
errors: No known data errors
I have configured RAID-1 while replacing the new disk with old disk not able to boot the OS after selecting the new disk as boot priority, Below is the process that we have tried from our end --
root@host250:~# zpool status
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 0B in 0 days 00:00:37 with 0 errors on Thu Jun 25 11:57:25 2020
config:
NAME STATE READ WRITE CKSUM
rpool DEGRADED 0 0 0
mirror-0 DEGRADED 0 0 0
scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-part3 ONLINE 0 0 0
scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part3 FAULTED 0 0 0 external device fault
root@host250:~# zpool offline -f -t rpool scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part3
root@host250:~# sgdisk --replicate=/dev/sda /dev/sdb
Creating new GPT entries.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
The operation has completed successfully.
root@host250:~# sgdisk --randomize-guids /dev/sdb
Creating new GPT entries.
The operation has completed successfully.
root@host250:~# grub-install /dev/sdb
Installing for i386-pc platform.
grub-install: error: cannot find a GRUB drive for /dev/sda3. Check your device.map.
root@host250:~# zpool replace -f rpool scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part3 /dev/sdb
Make sure to wait until resilver is done before rebooting.
root@host250:~# watch -n1 zpool status
root@host250:~#
root@host250:~# zpool status
pool: rpool
state: ONLINE
scan: resilvered 970M in 0 days 00:00:24 with 0 errors on Thu Jun 25 12:06:12 2020
config:
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-part3 ONLINE 0 0 0
sdb ONLINE 0 0 0
errors: No known data errors