During a reformat of my server I found that two of my hard drives had metadata on them. This data made the new operating system (Fedora 12) think that they were in a raid preventing them from being loaded as they were missing thier .ddf1_disks information file being that they weren’t in a raid. On the old OS I could confirm this fault by running
# /sbin/dmraid -ay -vvv -d
WARN: locking /var/lock/dmraid/.lock
NOTICE: /dev/sdf: asr discovering
NOTICE: /dev/sdf: ddf1 discovering
NOTICE: /dev/sdf: hpt37x discovering
NOTICE: /dev/sdf: hpt45x discovering
NOTICE: /dev/sdf: isw discovering
NOTICE: /dev/sdf: jmicron discovering
NOTICE: /dev/sdf: lsi discovering
NOTICE: /dev/sdf: nvidia discovering
NOTICE: /dev/sdf: pdc discovering
NOTICE: /dev/sdf: sil discovering
NOTICE: /dev/sdf: via discovering
NOTICE: /dev/sde: asr discovering
NOTICE: /dev/sde: ddf1 discovering
NOTICE: /dev/sde: hpt37x discovering
NOTICE: /dev/sde: hpt45x discovering
NOTICE: /dev/sde: isw discovering
NOTICE: /dev/sde: jmicron discovering
NOTICE: /dev/sde: lsi discovering
NOTICE: /dev/sde: nvidia discovering
NOTICE: /dev/sde: pdc discovering
NOTICE: /dev/sde: sil discovering
NOTICE: /dev/sde: via discovering
NOTICE: /dev/sdd: asr discovering
NOTICE: /dev/sdd: ddf1 discovering
NOTICE: /dev/sdd: hpt37x discovering
NOTICE: /dev/sdd: hpt45x discovering
NOTICE: /dev/sdd: isw discovering
NOTICE: /dev/sdd: jmicron discovering
NOTICE: /dev/sdd: lsi discovering
NOTICE: /dev/sdd: nvidia discovering
NOTICE: /dev/sdd: pdc discovering
NOTICE: /dev/sdd: sil discovering
NOTICE: /dev/sdd: via discovering
NOTICE: /dev/sdc: asr discovering
NOTICE: /dev/sdc: ddf1 discovering
NOTICE: /dev/sdc: ddf1 metadata discovered
NOTICE: /dev/sdc: hpt37x discovering
NOTICE: /dev/sdc: hpt45x discovering
NOTICE: /dev/sdc: isw discovering
NOTICE: /dev/sdc: jmicron discovering
NOTICE: /dev/sdc: lsi discovering
NOTICE: /dev/sdc: nvidia discovering
NOTICE: /dev/sdc: pdc discovering
NOTICE: /dev/sdc: sil discovering
NOTICE: /dev/sdc: via discovering
NOTICE: /dev/sdb: asr discovering
NOTICE: /dev/sdb: ddf1 discovering
NOTICE: /dev/sdb: ddf1 metadata discovered
NOTICE: /dev/sdb: hpt37x discovering
NOTICE: /dev/sdb: hpt45x discovering
NOTICE: /dev/sdb: isw discovering
NOTICE: /dev/sdb: jmicron discovering
NOTICE: /dev/sdb: lsi discovering
NOTICE: /dev/sdb: nvidia discovering
NOTICE: /dev/sdb: pdc discovering
NOTICE: /dev/sdb: sil discovering
NOTICE: /dev/sdb: via discovering
NOTICE: /dev/sda: asr discovering
NOTICE: /dev/sda: ddf1 discovering
NOTICE: /dev/sda: hpt37x discovering
NOTICE: /dev/sda: hpt45x discovering
NOTICE: /dev/sda: isw discovering
NOTICE: /dev/sda: jmicron discovering
NOTICE: /dev/sda: lsi discovering
NOTICE: /dev/sda: nvidia discovering
NOTICE: /dev/sda: pdc discovering
NOTICE: /dev/sda: sil discovering
NOTICE: /dev/sda: via discovering
DEBUG: _find_set: searching .ddf1_disks
DEBUG: _find_set: not found .ddf1_disks
ERROR: ddf1: cannot find virtual drive record on /dev/sdc
NOTICE: added /dev/sdc to RAID set ".ddf1_disks"
DEBUG: _find_set: searching .ddf1_disks
DEBUG: _find_set: found .ddf1_disks
ERROR: ddf1: cannot find virtual drive record on /dev/sdb
NOTICE: added /dev/sdb to RAID set ".ddf1_disks"
DEBUG: set status of set ".ddf1_disks" to 16
INFO: Activating GROUP RAID set ".ddf1_disks"
WARN: unlocking /var/lock/dmraid/.lock
DEBUG: freeing devices of RAID set ".ddf1_disks"
DEBUG: freeing device ".ddf1_disks", path "/dev/sdc"
DEBUG: freeing device ".ddf1_disks", path "/dev/sdb"
I did find a command that would delete this raid setup but it failed to run because of the same fault
# /sbin/dmraid -E -r /dev/sdb
Do you really want to erase "ddf1" ondisk metadata on /dev/sdb ? [y/n] :y
ERROR: ddf1: seeking device "/dev/sdb" to 256055225090048
ERROR: writing metadata to /dev/sdb, offset 500107861504 sectors, size 0 bytes returned 0
ERROR: erasing ondisk metadata on /dev/sdb
Which brought me to low level formating the first 50MB of the drive. WARNING this erases everything on the drive. You will lose data please backup or move your data. The other thing to note is the /dev/sd? if you have multiple hard drives like me the wrong letter here can kill all data on the drive. Check yours by using df -h
# umount /dev/sdb1
# dd if=/dev/zero of=/dev/sdb bs=1M
It’s only the beginning and end we need to blank but I’ve been googling and trying for half a day and can’t find it. In that time it could have blanked the whole thing. After that you need to fdisk it
# /sbin/fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xa99048f4.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
The number of cylinders for this disk is set to 60801.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): p
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xa99048f4
Device Boot Start End Blocks Id System
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-60801, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-60801, default 60801):
Using default value 60801
Command (m for help): p
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xa99048f4
Device Boot Start End Blocks Id System
/dev/sdb1 1 60801 488384001 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
And create the filesystem
# /sbin/mkfs.ext3 /dev/sdb1
mke2fs 1.40.4 (31-Dec-2007)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
61063168 inodes, 122096000 blocks
6104800 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
3727 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 29 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
Don’t forget the label for easier mounting and remount
# /sbin/e2label /dev/sdb1 LABEL=switch
# mount LABEL=switch /media/switch/
From that it stopped listing that drive as a raid, Yay!
# /sbin/dmraid -ay -vvv -d
WARN: locking /var/lock/dmraid/.lock
NOTICE: /dev/sdf: asr discovering
NOTICE: /dev/sdf: ddf1 discovering
NOTICE: /dev/sdf: hpt37x discovering
NOTICE: /dev/sdf: hpt45x discovering
NOTICE: /dev/sdf: isw discovering
NOTICE: /dev/sdf: jmicron discovering
NOTICE: /dev/sdf: lsi discovering
NOTICE: /dev/sdf: nvidia discovering
NOTICE: /dev/sdf: pdc discovering
NOTICE: /dev/sdf: sil discovering
NOTICE: /dev/sdf: via discovering
NOTICE: /dev/sde: asr discovering
NOTICE: /dev/sde: ddf1 discovering
NOTICE: /dev/sde: hpt37x discovering
NOTICE: /dev/sde: hpt45x discovering
NOTICE: /dev/sde: isw discovering
NOTICE: /dev/sde: jmicron discovering
NOTICE: /dev/sde: lsi discovering
NOTICE: /dev/sde: nvidia discovering
NOTICE: /dev/sde: pdc discovering
NOTICE: /dev/sde: sil discovering
NOTICE: /dev/sde: via discovering
NOTICE: /dev/sdd: asr discovering
NOTICE: /dev/sdd: ddf1 discovering
NOTICE: /dev/sdd: hpt37x discovering
NOTICE: /dev/sdd: hpt45x discovering
NOTICE: /dev/sdd: isw discovering
NOTICE: /dev/sdd: jmicron discovering
NOTICE: /dev/sdd: lsi discovering
NOTICE: /dev/sdd: nvidia discovering
NOTICE: /dev/sdd: pdc discovering
NOTICE: /dev/sdd: sil discovering
NOTICE: /dev/sdd: via discovering
NOTICE: /dev/sdc: asr discovering
NOTICE: /dev/sdc: ddf1 discovering
NOTICE: /dev/sdc: ddf1 metadata discovered
NOTICE: /dev/sdc: hpt37x discovering
NOTICE: /dev/sdc: hpt45x discovering
NOTICE: /dev/sdc: isw discovering
NOTICE: /dev/sdc: jmicron discovering
NOTICE: /dev/sdc: lsi discovering
NOTICE: /dev/sdc: nvidia discovering
NOTICE: /dev/sdc: pdc discovering
NOTICE: /dev/sdc: sil discovering
NOTICE: /dev/sdc: via discovering
NOTICE: /dev/sdb: asr discovering
NOTICE: /dev/sdb: ddf1 discovering
NOTICE: /dev/sdb: hpt37x discovering
NOTICE: /dev/sdb: hpt45x discovering
NOTICE: /dev/sdb: isw discovering
NOTICE: /dev/sdb: jmicron discovering
NOTICE: /dev/sdb: lsi discovering
NOTICE: /dev/sdb: nvidia discovering
NOTICE: /dev/sdb: pdc discovering
NOTICE: /dev/sdb: sil discovering
NOTICE: /dev/sdb: via discovering
NOTICE: /dev/sda: asr discovering
NOTICE: /dev/sda: ddf1 discovering
NOTICE: /dev/sda: hpt37x discovering
NOTICE: /dev/sda: hpt45x discovering
NOTICE: /dev/sda: isw discovering
NOTICE: /dev/sda: jmicron discovering
NOTICE: /dev/sda: lsi discovering
NOTICE: /dev/sda: nvidia discovering
NOTICE: /dev/sda: pdc discovering
NOTICE: /dev/sda: sil discovering
NOTICE: /dev/sda: via discovering
DEBUG: _find_set: searching .ddf1_disks
DEBUG: _find_set: not found .ddf1_disks
ERROR: ddf1: cannot find virtual drive record on /dev/sdc
NOTICE: added /dev/sdc to RAID set ".ddf1_disks"
DEBUG: set status of set ".ddf1_disks" to 16
INFO: Activating GROUP RAID set ".ddf1_disks"
WARN: unlocking /var/lock/dmraid/.lock
DEBUG: freeing devices of RAID set ".ddf1_disks"
DEBUG: freeing device ".ddf1_disks", path "/dev/sdc"
On to the second drive, hope this has been a help to you too. As it could me two days of googling to get all of this.