When provisioning a Linux server (Dell rack), an administrator may install previously-used hard drives that were formally part of a RAID configuration. Such drives cannot boot into Linux until the RAID metadata partition is cleared, even if zeroing out the bits using the dd utility. To properly clear the RAID metadata, do the following:

  1. Install an alternate bootable hard drive with a Linux operating system on the same server with the RAID metadata partition (typically in the primary or "A" drive slot).
  2. Boot into the alternate drive, go into the Linux terminal and check that the RAID drive can be seen using fdisk:

    # fdisk -l

  3. Run the dmraid command to remove the RAID metadata from the drive.

    For example, if primary partition is mounted on /dev/sda, and RAID partition is mounted to /dev/sdb:

    # dmraid -r -E /dev/sdb

  4. Power down the server, remove the non-RAIDed drive and move the RAID drive (which should now be clear of RAID metadata) to the primary slot, and perform a PXE boot to install a fresh Linux OS.
  5. Once the OS has been installed, restart the server to confirm that the drive is now bootable.


If you get ERRORs:

[root@test-rhel7 ~]# dmraid -r -E /dev/sdc
Do you really want to erase "ddf1" ondisk metadata on /dev/sdc ? [y/n] :y

ERROR: ddf1: seeking device "/dev/sdc" to 153599999737856
ERROR: writing metadata to /dev/sdc, offset 299999999488 sectors, size 0 bytes returned 0
ERROR: erasing ondisk metadata on /dev/sdc


Try:       dd if=/dev/zero of=/dev/sdc bs=512 seek=$(( $(blockdev --getsz /dev/sdc) - 1024 )) count=1024

[root@test-rhel7 ~]# dmraid -r
/dev/sdc: ddf1, ".ddf1_disks", GROUP, ok, 584843264 sectors, data@ 0

[root@test-rhel7 ~]# dd if=/dev/zero of=/dev/sdc bs=512 seek=$(( $(blockdev --getsz /dev/sdc) - 1024 )) count=1024
1024+0 records in
1024+0 records out
524288 bytes (524 kB) copied, 0.0500932 s, 10.5 MB/s

[root@test-rhel7 ~]# dmraid -r
no raid disks