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] :

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

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))


Post new comment

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. PHP source code can also be enclosed in <?php ... ?> or <% ... %>.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

This question is for testing whether you are a human visitor and to prevent automated spam submissions.
To prevent automated spam submissions leave this field empty.