gpart does not see disk

I was trying to convert a disk from mbr to gpt and then the disk stopped responding. After a reboot gpart does not see it at all.
camcontrol devlist:-
<TOSHIBA MK5061GSYB MH000C> at scbus1 target 0 lun 0 (pass1, ada1)

How do I make it visible to GPART?
 
The man page for gpart(8) provides a blow by blow example for creating a GPT scheme partition on FreeBSD.

Note: Requires the GEOM_PART_GPT kernel option.
 
I was trying to convert a disk from mbr to gpt and then the disk stopped responding. After a reboot gpart does not see it at all.
I'm guessing the partition table got corrupted so much it's not even recognized anymore. At least I can imagine this happening when you're writing a new partition table and something happens during this write action. The disk stopped responding and you rebooted so this write action may never have finished. The partition table may be gone, the actual data on the disk is probably still there. I hope you made a backup of the partition table before you started changing it?
 
The previous contents of the disk were obsolete. so it didn't really matter.

Just out of interest what is the recommended way of backing up the partition table and where would you keep it?
 
For example:
gpart backup ada0 > partitiontable-ada0.txt
Make sure you keep that partitiontable-ada0.txt file somewhere safe. Preferably not on the disk you're about to screw up ;)
You can restore it with cat partitiontable-ada0.txt | gpart restore ada0.
 
Back
Top