08 Feb 2010

Clearing a GUID Partition Table (GPT) in Linux

This is more of a note for future reference rather than a blog post.

I recently had to replace a RAID-10 member disk as the original disk had developed bad sectors and was causing mostly read related problems in the array. (That’s a whole other story it it’s won right and I don’t have time to get into that now). However, when I tried adding the replacement disk to the server, I found that the disk had a GPT table and not an msdos partition table, unlike the other 3 members in the RAID array. I was therefore unable to add the disk “as-is” to the RAID array as all disks are required to have the same partition table type. I therefore needed to remove the GUID Partition Table and replace it with an msdos partition table.

 

My initial though was to use fdisk. However, fdisk does not understand GUID Partition Tables and therefore cannot remove such tables. The other tool that does understand GPT is a tool called “parted”.

So to replace the GPT table with msdos, I did:

parted /dev/sdc
mklabel msdos
quit

If you are running Windows and would like to clear a GPT table, you may use the "clean" command in diskpart (Diskpart can be accessed from the command prompt)

Comments (2)

  1. Navruzbek

"If you are running Windows and would like to clear a GPT table, you may use the "clean" command in diskpart (Diskpart can be accessed from the command prompt)" Great !!!!!!!!!!!!!!!!! it works fine just for me. thanks

  Attachments
 
There are no comments posted here yet

Leave your comments

Posting comment as a guest. Sign up or login to your account.
0 Characters
Attachments (0 / 3)
Share Your Location

RT @KingsGatePBO: WE'VE GOT SNOW! Due to the weather, we are not holding our 11:30am service at KingsGate Peterborough. You can watch a liv…
Follow Rynardt Spies on Twitter