Re: `gpart show` and secondary GPT header

From: Harald Schmalzbauer <h.schmalzbauer_at_omnilan.de>
Date: Wed, 29 Jul 2009 02:14:05 +0200
Marcel Moolenaar schrieb am 16.06.2009 18:28 (localtime):
> 
> On Jun 16, 2009, at 9:00 AM, Harald Schmalzbauer wrote:
> 
>> Marcel Moolenaar schrieb am 2009-06-14 07:23 (localtime):
>> ...
>>>>>> Jun 13 06:31:42 bigback kernel: GEOM: ad12: the secondary GPT 
>>>>>> table is
>>>>>> corrupt or invalid.
>>>>>> Jun 13 06:31:42 bigback kernel: GEOM: ad12: using the primary only --
>>>>>> recovery suggested.
>>
>> I'm curious what the correct way to recover is.
>> I also tried dd, but without success.
>> `gpt` had a recover functionality if I remember corretcly.
> 
> Recovery is not yet implemented in gpart. That would be
> the correct way to recover. And yes, gpt(8) has recovery.
> Thus, gpt(8) is the right way to recover on -STABLE.

Hello, I'd need some help.
I tried to recover the secondary GPT after overwriting on the same disk.
I used 'dd if=/dev/ada0 iseek=1 count=1 oseek=1953525167 of=/dev/ada0'
I thought this must work since the location of the secondary, stored in 
the GPT header, is correct. But it doesn't.
Usually, after replacing a failed hard drive, I duplicate the first 34 
sectors and modify the labels. If the replaced HD is of different size, 
the secondary GPT can't be restored simply by dd, if I'm right.
But why doesn't it work on the same HD?

Thanks,

-Harry

P.S.: Any recovery bits for me to test?


Received on Tue Jul 28 2009 - 22:14:08 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:52 UTC