Removing the RAID metadata

If you see the “Disk contains BIOS metadata, but is not part of any recognized BIOS RAID sets. Ignoring disk sda” error message during OS installation, then you need to remove the raid metadata the “classic” way:

dmraid -r -E /dev/sda
Do you really want to erase "pdc" ondisk metadata on /dev/sda ? [y/n] :
y

If this doesn't help, then you need to nuke the disks with "dd" command. The position of the metadata (a total of 256 bytes in size) depends of the subversion, it can be placed at the BEGINNING or at the END of the device. This means that if you get a drive configured with superblock metadata v0.9 on a system which uses v1.2 and you try to zero out or remove the metadata it will not remove it because it’s looking for it in the wrong location. The solution is to get the disk block information. You may get this from /proc partitions or using fdisk -s:

root@server:~# cat /proc/partitions |grep -i sdb
8 16 125034840 sdb

root@server:~# fdisk -s /dev/sdb
125034840

Erase the first 1024 bytes from the beginning of the disk:

dd if=/dev/zero of=/dev/sda bs=1k count=1

Erase the last 1024 bytes from the end of the disk:

dd if=/dev/zero of=/dev/sda bs=1k seek=125034838

Or you can simply wrap up everything in a one liner which will remove both the first and last 1024 bytes of your disk:

dd if=/dev/zero of=/dev/sda bs=1k count=1; dd if=/dev/zero of=dev/sda bs=1k seek=$((`fdisk -s /dev/sda` - 2))

Add new comment

Filtered HTML

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.