Corrupt GPT on ZFS full-disks that shouldn't be using GPT

Warren Block wblock at
Sun Jun 28 23:06:22 UTC 2015

On Sun, 28 Jun 2015, Chris Stankevitz wrote:

> On Sat, Jun 27, 2015 at 11:26 PM, Warren Block <wblock at> wrote:
>> Erasing just the last block would probably be enough.  Still, the only
>> reason to be afraid of it is if you do not have a full backup.  And if you
>> don't have a full backup, that is the first thing to do.
> Warren,
> Thank you.  I do indeed have backups so perhaps I shouldn't be afraid
> to just experiment... especially if I experiment only on one of my
> raidz3 drives.  Do I need to export the pool before using dd on the
> raw device?

It depends on how confident you are in those backups.  Remember, ZFS 
leaves space unused at the end of a disk to allow for variations in 
nominal disk size.

Overwriting even just the last block will destroy the backup GPT header 
without touching any ZFS data.  In theory, anyway, which is why you have 
backups.  ZFS ought to notice if there was any problem during the next 
zpool scrub.  So do one drive, do a scrub, and if red lights don't start 
flashing and an urgent resilver does not start... it's good.  But still, 
keep good backups.

More information about the freebsd-questions mailing list