Both GPT tables are corrupt

Status
Not open for further replies.

PaddyNo

Cadet
Joined
Nov 5, 2013
Messages
7
I had to replace the boot disk (SSD) because I noticed more and more command timeouts. My server is starting up with the new (cloned) disk and all is up and running.

However, I noticed an error message in the logs:
GEOM: ada4: the secondary GPT table is corrupt or invalid.
GEOM: ada4: using the primary only -- recovery suggested.

However, the status of the GPT tables shows this:
[root~]# gpart status
Name Status Components
ada4p1 CORRUPT ada4
ada4p2 CORRUPT ada4

In my understanding, since primary as well as secondary GPT tables seems to be corrupt, I don't know if it's useful to recover the 2nd GPT from 1st.

Does anybody know how to bring both GPTs to a proper state?
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
My server is starting up with the new (cloned) disk and all is up and running.
How did you 'clone' the disk? There is a right way and a wrong way.
Do you still have the original one where you can put it back in?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
How did you 'clone' the disk?
More to the point, why did you clone the disk? There's a very simple process to address boot device failure:
  • Have a backup of your config file--which you will in your .system dataset, if nothing else
  • Do a clean installation of an appropriate version of FreeNAS to a fresh boot device
  • Upload your saved config file to the new installation
That's it. Doesn't matter what the new device is, or how it differs from the old. Trying to clone the boot volume is just asking for trouble, and complicating things more than necessary.
 

wblock

Documentation Engineer
Joined
Nov 14, 2014
Messages
1,506
However, I noticed an error message in the logs:


However, the status of the GPT tables shows this:
Code:
[root~]# gpart status											
  Name   Status  Components													
ada4p1  CORRUPT  ada4
ada4p2  CORRUPT  ada4

In my understanding, since primary as well as secondary GPT tables seems to be corrupt, I don't know if it's useful to recover the 2nd GPT from 1st.

Does anybody know how to bring both GPTs to a proper state?

Those are not the two tables, those are two partitions, p1 and p2. I suspect it will show corrupt for both, possibly due to the end of the partition being past the end of the new device. You can attempt a gpart recover to repair the primary partition table, but the contents of the partitions might still be a problem. Others have already mentioned the far easier way to use a new boot device with FreeNAS.

Please don't binary-clone disks any more. It is no longer a good way to do almost anything. Even if the original and copy are the same capacity, there are GUIDs that are supposed to be unique and other issues.
 

PaddyNo

Cadet
Joined
Nov 5, 2013
Messages
7
How did you 'clone' the disk? There is a right way and a wrong way.
Do you still have the original one where you can put it back in?
I used hardware box raw cloning. It copies any harddrives 1:1 and was used for other purpose without problems.
I checked the original which has the same issue, so I highly assume that issue was before replacement too.

More to the point, why did you clone the disk? There's a very simple process to address boot device failure:
  • Have a backup of your config file--which you will in your .system dataset, if nothing else
  • Do a clean installation of an appropriate version of FreeNAS to a fresh boot device
  • Upload your saved config file to the new installation
That's it. Doesn't matter what the new device is, or how it differs from the old. Trying to clone the boot volume is just asking for trouble, and complicating things more than necessary.
Thanks for the hint. If I can't solve it by tools, it will be the best other option.

Those are not the two tables, those are two partitions, p1 and p2. I suspect it will show corrupt for both, possibly due to the end of the partition being past the end of the new device. You can attempt a gpart recover to repair the primary partition table, but the contents of the partitions might still be a problem. Others have already mentioned the far easier way to use a new boot device with FreeNAS.

Please don't binary-clone disks any more. It is no longer a good way to do almost anything. Even if the original and copy are the same capacity, there are GUIDs that are supposed to be unique and other issues.
Got it. Thanks.
 

PaddyNo

Cadet
Joined
Nov 5, 2013
Messages
7
gpart recover ada4 solved the problem so far. Partitions and GPT are now ok.
However, for next time, I'll proceed with clean installation / saved config instead of cloning.

Thanks, guys, for your great support.
 
Status
Not open for further replies.
Top