A couple of days ago I had to perform an OS install on a customer’s Dell RX 200 server. It was a spare machine that was previously used for backups.
Everything went fine until at some point during installation I received the following message: “Disk contains BIOS metadata, but is not part of any recognized BIOS RAID sets. Ignoring disk sda”
Ok, this is not an issue, one of the 2 disks was part of a raid before, so I jumped to a different terminal (press ALT +F2) during installation and decided to remove the raid metadata the “classic” way:
WARNING! If you don’t know what you’re doing you may end up deleting all your data! I strongly recommend you to backup everything before you start.
dmraid -r -E /dev/sda Do you really want to erase "pdc" ondisk metadata on /dev/sda ? [y/n] : y
Although no error message was displayed when I restarted the installation process, guess what! “Disk contains BIOS metadata, but is not part of any recognized BIOS RAID sets. Ignoring disk sda” Damn, there was something wrong with this, so one simple solution would be to start the installation without raid support ( add nodmraid in boot options ) but this wasn’t possible in my case because I needed to configure the system with raid support. It was time to see why wasn’t the metadata removed by dmraid -E or dmraid –zero-superblock.
I tried to zero out the first bytes of the disk with dd which DID NOT HELP! At this point it became personal 🙂
After a bit of google search I reached to a kernel.org wiki page which provides details about the RAID superblock formats.
Ok, so it seems that 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.
One can erase 99% of the device and that error message will not vanish, unless you erase the right portion of the device!
1. Get the disk block information. You may get this from /proc partitions or using fdisk -s
[email protected]:~# cat /proc/partitions |grep -i sdb 8 16 125034840 sdb [email protected]:~# fdisk -s /dev/sdb 125034840
2. Erase the first 1024 bytes from the beginning of the disk:
dd if=/dev/zero of=/dev/sda bs=1k count=1
3. 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))