To all who replied to my distress signal,
The repair turned out to be pretty painless. In two ways:
First, getting quality advice from all of you sans the roasting I deserved
;), and
Second, gdisk fixed the gpt header and partition table easily (details
below). After that, I rebooted, zfs recognized the disk, and then it
started a resilver automatically. It was done a few minutes later, and now
everything’s back to normal.
Gdisk noted that both the main gpt header and main partition table were
damaged, but the backups were ok. I bypassed gdisk’s offer to use either
the current gpt or to create a blank gpt, because I didn’t understand
exactly what “current” or “blank” meant.
Instead, I invoked the recovery & transformation menu with “r”. Then I
used “b” to rebuild the damaged main gpt header with the good backup,
followed by “c” to restore the partition table from the good backup. I
then printed the partition table. It looked exactly like the partition
tables on the other disks of the same make and model in the zfs pool
(modulo what looked like a unique zfs partition name). That made me
comfortable, so I wrote the changes to disk, rebooted, and found everything
back to normal after the resilver.
Appreciate all the help. Thanks!
John
The repair turned out to be pretty painless. In two ways:
First, getting quality advice from all of you sans the roasting I deserved
;), and
Second, gdisk fixed the gpt header and partition table easily (details
below). After that, I rebooted, zfs recognized the disk, and then it
started a resilver automatically. It was done a few minutes later, and now
everything’s back to normal.
Gdisk noted that both the main gpt header and main partition table were
damaged, but the backups were ok. I bypassed gdisk’s offer to use either
the current gpt or to create a blank gpt, because I didn’t understand
exactly what “current” or “blank” meant.
Instead, I invoked the recovery & transformation menu with “r”. Then I
used “b” to rebuild the damaged main gpt header with the good backup,
followed by “c” to restore the partition table from the good backup. I
then printed the partition table. It looked exactly like the partition
tables on the other disks of the same make and model in the zfs pool
(modulo what looked like a unique zfs partition name). That made me
comfortable, so I wrote the changes to disk, rebooted, and found everything
back to normal after the resilver.
Appreciate all the help. Thanks!
John