7

Normally when I have a drive which contains raid metadata e.g. from fakeraid or a hardware raid card I can get rid of it with:

dmraid -r -E /dev/sdX

Or if that doesnt work, doing a simple dd if=/dev/zero of=/dev/sdX normally works

But I have four WD RE4 drives here and neither option seems to work. dmraid just gives me a CRC error when it reads the drive. I know the drives are fine and they've been checked with smart + WD diagnostics anyway

The actual error on dmraid is:

ddf1: physical drives with CRC 5CD0C0DB, expected FFFFFFFF on /dev/sda
ERROR: ddf1: Cannot find physical drive description on /dev/sda!
ERROR ddf1: setting up RAID device /dev/sad
nor aid disks and with names: "/dev/sda"

Gives the same CRC error for all disks so clearly something strange the raid controller did

I've even formatted them with mdadm through rescuemode to see if that would overwrite it but no difference.

kenlukas
  • 2,886
  • 2
  • 14
  • 25
Tiffany Walker
  • 6,541
  • 13
  • 53
  • 77

2 Answers2

7

same problem here today.

Solved using the following:

You need your wrong mapper like => /dev/mapper/ddf1XXXXXXXX

Get it using :

fdisk -l 

Then (this is just to be sure)

dd if=/dev/zero of=/dev/mapper/ddf1xxxxxxxxxxxxx bs=512 count=200000

Finally clean it up:

 dmsetup remove /dev/mapper/ddf1xxxxxxxxxxxxx

And check it that it just disappeared from fdisk -l

guntbert
  • 553
  • 7
  • 21
Marc Riera
  • 1,587
  • 4
  • 21
  • 38
5

In this case wipefs utility should work.
wipefs -a /dev/sdb for example - delete all magic strings (metadata).
But afaik there is some hardware raids, that wipefs doesn't know about.

alexander.polomodov
  • 1,060
  • 3
  • 10
  • 14
PUST
  • 51
  • 1
  • 1
  • Very simple. This worked for `ddf_raid_member` and `linux_raid_member`. – hashwagon Apr 21 '20 at 22:18
  • 1
    Also, without the `-a` option, it shows what it found: " When used without any options, wipefs lists all visible filesystems and the offsets of their basic signatures". – mivk Jul 11 '21 at 11:05