Score:3

Unable to format drives previously used in RAID array - weird 15bit mode

co flag

I am clearing out a load of old hard disks, and reformatting them to ensure they are blank. I previously had an x86 PC with BIOS RAID running Fedora and several sets of 4 drives which IIRC were RAID 0+1 arrays, in various sizes inc 40Gb and 500Gb. That machine is dead and I cannot boot it.

All of these drives, and none of the others cannot be formatted.

I have disposed of most of my old PCs and all I have to work with is a USB IDE adaptor which I use to mount drives on my Mac, and an old x86 PC (which does not have a RAID bios) on which I have CentOS 7 minimal installed.

When mounted on the Mac the 500Gb drives show up as 1.6Tb volumes (yellow icons) with a single partition of a more reasonable size.

enter image description here

diskutil list returns this for the drive:

/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *1.6 TB     disk2
   1:                      Linux ⁨⁩                        500.1 GB   disk2s1

Neither the drive or the partition can be formatted (erase menu option), in either case the error

Wiping volume data to prevent future accidental probing failed. : (-69825)

is reported. I tried all the options for partition scheme and filesystem type (I can't see how that would make a difference but a question elsewhere suggested it might).

enter image description here

After googling similar questions I mounted the drive on the x86 machine, with one good boot drive containing CentOS 7 minimal and one bad drive. The boot drive shows up as /dev/sda and the failed drive as /dev/sdb.

Fdisk seems to run successfully, but a subsequent fdisk -l shows nothing.

I used dd if=/dev/zero of=/dev/sdb to write zeros over the whole of a 40Gb drive and the start and end of a 500Gb drive. When I dd the first block back it contains all zeros.

Again Fdisk seems to run successfully to create whatever type of super block and 1 partition I like, but the disk is still blank afterwards.

Then the weirdest thing happened. I decided to dd a copy of the superblock from the good drive onto the failed drive, it should look like there is a filesystem there even if it won't actually read, right?

No it did not. So I dd the superblock back from the failed drive and do a cmp -l of that against the original and I notice that every difference is on an even address and in every case the original has the top bit set and the copy via the failed disk does not.

So I created a file with all FF's and verified that this is happening on every 16bit word:

[root@localhost ~]# hexdump dels
0000000 ffff ffff ffff ffff ffff ffff ffff ffff
*
0000200
[root@localhost ~]# dd if=/dev/zero of=/dev/sdb bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.0225038 s, 22.8 kB/s
[root@localhost ~]# dd if=/dev/sdb of=foo count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.0150744 s, 34.0 kB/s
[root@localhost ~]# hexdump foo
0000000 0000 0000 0000 0000 0000 0000 0000 0000
*
0000200
[root@localhost ~]# dd if=dels of=/dev/sdb
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.0283328 s, 18.1 kB/s
[root@localhost ~]# dd if=/dev/sdb of=foo count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.0141502 s, 36.2 kB/s
[root@localhost ~]# hexdump foo
0000000 7fff 7fff 7fff 7fff 7fff 7fff 7fff 7fff
*
0000200
[root@localhost ~]# exit

I get the same result with multiple drives.

I wondered if it was a faulty IDE cable or interface so I disconnected the CD which was on its own on the secondary IDE channel and put the failed drive there, and got exactly the same results.

I am curious to know where OSX Diskutil is getting the 1.6Tb from, I guess it's reading some old RAID metadata from somewhere but not the very start or end of the drive, is that possible?

Once the drive has been zeroed entirely the Mac does not see it at all, so it seems like of the Mac was all I had there would be nowhere to go.

So it seems I have a set of drives which cannot write a 1 in the MSB of each 16 bit word, how is that even possible?

If anyone can explain what's happening (including why the Mac can't see the drive after it has been totally zeroed) I would love to understand it, or if anyone can suggest a way to reset the drives so they can be formatted I would appreciate it. I would prefer to put them on eBay for a nominal sum or give them away than see then go to landfill, but I seem to be approaching the point where mechanical erasure is the only option.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.