Greetings to all,
I have recently encountered a disk (/dev/sdb) failure. I have now replaced the disk, and while the following wiki article https://pve.proxmox.com/wiki/ZFS:_Tips_and_Tricks#Replacing_a_failed_disk_in_the_root_pool, we ran into an issue:
My new disk is slightly smaller than the old one, so when running the following, I have an issue.
I think we need to shrink the size of sda3 slightly so that we can correctly copy the partition table so that we can safely rebuild the ZFS pool. What would be the safest way of doing this without causing any data loss?
Kindest regards
I have recently encountered a disk (/dev/sdb) failure. I have now replaced the disk, and while the following wiki article https://pve.proxmox.com/wiki/ZFS:_Tips_and_Tricks#Replacing_a_failed_disk_in_the_root_pool, we ran into an issue:
My new disk is slightly smaller than the old one, so when running the following, I have an issue.
Code:
sgdisk --replicate=/dev/sdb /dev/sda
Caution! Secondary header was placed beyond the disk's limits! Moving the
header, but other problems may occur!
Warning! Secondary partition table overlaps the last partition by
4688 blocks!
You will need to delete this partition or resize it in another utility.
Problem: partition 3 is too big for the disk.
Aborting write operation!
Aborting write of new partition table.
Code:
zpool status -v
pool: rpool
state: DEGRADED
status: One or more devices could not be used because the label is missing or
invalid. Sufficient replicas exist for the pool to continue
functioning in a degraded state.
action: Replace the device using 'zpool replace'.
see: http://zfsonlinux.org/msg/ZFS-8000-4J
scan: scrub repaired 0B in 0 days 05:02:09 with 0 errors on Sun Aug 11 05:26:11 2019
config:
NAME STATE READ WRITE CKSUM
rpool DEGRADED 0 0 0
mirror-0 DEGRADED 0 0 0
sda3 ONLINE 0 0 0
6945573611984207316 UNAVAIL 0 0 0 was /dev/sdb3
errors: No known data errors
Code:
lsblk /dev/sda
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 1007K 0 part
├─sda2 8:2 0 512M 0 part
└─sda3 8:3 0 931G 0 part
Code:
lsblk /dev/sdb
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb 8:16 0 931.5G 0 disk
Kindest regards