{"id":53,"date":"2010-02-21T19:36:27","date_gmt":"2010-02-21T11:36:27","guid":{"rendered":"http:\/\/www.lanchbury.id.au\/wp\/?p=53"},"modified":"2010-09-03T19:44:50","modified_gmt":"2010-09-03T11:44:50","slug":"raid-metadata-on-hdd","status":"publish","type":"post","link":"https:\/\/www.lanchbury.au\/?p=53","title":{"rendered":"RAID metadata on HDD"},"content":{"rendered":"<p>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&#8217;t  in a raid. On the old OS I could confirm this fault by running<br \/>\n<code># \/sbin\/dmraid -ay -vvv -d<br \/>\nWARN: locking \/var\/lock\/dmraid\/.lock<br \/>\nNOTICE: \/dev\/sdf: asr discovering<br \/>\nNOTICE: \/dev\/sdf: ddf1 discovering<br \/>\nNOTICE: \/dev\/sdf: hpt37x discovering<br \/>\nNOTICE: \/dev\/sdf: hpt45x discovering<br \/>\nNOTICE: \/dev\/sdf: isw discovering<br \/>\nNOTICE: \/dev\/sdf: jmicron discovering<br \/>\nNOTICE: \/dev\/sdf: lsi discovering<br \/>\nNOTICE: \/dev\/sdf: nvidia discovering<br \/>\nNOTICE: \/dev\/sdf: pdc discovering<br \/>\nNOTICE: \/dev\/sdf: sil discovering<br \/>\nNOTICE: \/dev\/sdf: via discovering<br \/>\nNOTICE: \/dev\/sde: asr discovering<br \/>\nNOTICE: \/dev\/sde: ddf1 discovering<br \/>\nNOTICE: \/dev\/sde: hpt37x discovering<br \/>\nNOTICE: \/dev\/sde: hpt45x discovering<br \/>\nNOTICE: \/dev\/sde: isw discovering<br \/>\nNOTICE: \/dev\/sde: jmicron discovering<br \/>\nNOTICE: \/dev\/sde: lsi discovering<br \/>\nNOTICE: \/dev\/sde: nvidia discovering<br \/>\nNOTICE: \/dev\/sde: pdc discovering<br \/>\nNOTICE: \/dev\/sde: sil discovering<br \/>\nNOTICE: \/dev\/sde: via discovering<br \/>\nNOTICE: \/dev\/sdd: asr discovering<br \/>\nNOTICE: \/dev\/sdd: ddf1 discovering<br \/>\nNOTICE: \/dev\/sdd: hpt37x discovering<br \/>\nNOTICE: \/dev\/sdd: hpt45x discovering<br \/>\nNOTICE: \/dev\/sdd: isw discovering<br \/>\nNOTICE: \/dev\/sdd: jmicron discovering<br \/>\nNOTICE: \/dev\/sdd: lsi discovering<br \/>\nNOTICE: \/dev\/sdd: nvidia discovering<br \/>\nNOTICE: \/dev\/sdd: pdc discovering<br \/>\nNOTICE: \/dev\/sdd: sil discovering<br \/>\nNOTICE: \/dev\/sdd: via discovering<br \/>\nNOTICE: \/dev\/sdc: asr discovering<br \/>\nNOTICE: \/dev\/sdc: ddf1 discovering<br \/>\nNOTICE: \/dev\/sdc: ddf1 metadata discovered<br \/>\nNOTICE: \/dev\/sdc: hpt37x discovering<br \/>\nNOTICE: \/dev\/sdc: hpt45x discovering<br \/>\nNOTICE: \/dev\/sdc: isw discovering<br \/>\nNOTICE: \/dev\/sdc: jmicron discovering<br \/>\nNOTICE: \/dev\/sdc: lsi discovering<br \/>\nNOTICE: \/dev\/sdc: nvidia discovering<br \/>\nNOTICE: \/dev\/sdc: pdc discovering<br \/>\nNOTICE: \/dev\/sdc: sil discovering<br \/>\nNOTICE: \/dev\/sdc: via discovering<br \/>\nNOTICE: \/dev\/sdb: asr discovering<br \/>\nNOTICE: \/dev\/sdb: ddf1 discovering<br \/>\nNOTICE: \/dev\/sdb: ddf1 metadata discovered<br \/>\nNOTICE: \/dev\/sdb: hpt37x discovering<br \/>\nNOTICE: \/dev\/sdb: hpt45x discovering<br \/>\nNOTICE: \/dev\/sdb: isw discovering<br \/>\nNOTICE: \/dev\/sdb: jmicron discovering<br \/>\nNOTICE: \/dev\/sdb: lsi discovering<br \/>\nNOTICE: \/dev\/sdb: nvidia discovering<br \/>\nNOTICE: \/dev\/sdb: pdc discovering<br \/>\nNOTICE: \/dev\/sdb: sil discovering<br \/>\nNOTICE: \/dev\/sdb: via discovering<br \/>\nNOTICE: \/dev\/sda: asr discovering<br \/>\nNOTICE: \/dev\/sda: ddf1 discovering<br \/>\nNOTICE: \/dev\/sda: hpt37x discovering<br \/>\nNOTICE: \/dev\/sda: hpt45x discovering<br \/>\nNOTICE: \/dev\/sda: isw discovering<br \/>\nNOTICE: \/dev\/sda: jmicron discovering<br \/>\nNOTICE: \/dev\/sda: lsi discovering<br \/>\nNOTICE: \/dev\/sda: nvidia discovering<br \/>\nNOTICE: \/dev\/sda: pdc discovering<br \/>\nNOTICE: \/dev\/sda: sil discovering<br \/>\nNOTICE: \/dev\/sda: via discovering<br \/>\nDEBUG: _find_set: searching .ddf1_disks<br \/>\nDEBUG: _find_set: not found .ddf1_disks<br \/>\nERROR: ddf1: cannot find virtual drive record on \/dev\/sdc<br \/>\nNOTICE: added \/dev\/sdc to RAID set \".ddf1_disks\"<br \/>\nDEBUG: _find_set: searching .ddf1_disks<br \/>\nDEBUG: _find_set: found .ddf1_disks<br \/>\nERROR: ddf1: cannot find virtual drive record on \/dev\/sdb<br \/>\nNOTICE: added \/dev\/sdb to RAID set \".ddf1_disks\"<br \/>\nDEBUG: set status of set \".ddf1_disks\" to 16<br \/>\nINFO: Activating GROUP RAID set \".ddf1_disks\"<br \/>\nWARN: unlocking \/var\/lock\/dmraid\/.lock<br \/>\nDEBUG: freeing devices of RAID set \".ddf1_disks\"<br \/>\nDEBUG: freeing device \".ddf1_disks\", path \"\/dev\/sdc\"<br \/>\nDEBUG: freeing device \".ddf1_disks\", path \"\/dev\/sdb\"<\/code><\/p>\n<p>I did find a command that would delete this raid setup but it failed to run because of the same fault<\/p>\n<p><code># \/sbin\/dmraid -E -r \/dev\/sdb<br \/>\nDo you really want to erase \"ddf1\" ondisk metadata on \/dev\/sdb ? [y\/n] :y<br \/>\nERROR: ddf1: seeking device \"\/dev\/sdb\" to 256055225090048<br \/>\nERROR: writing metadata to \/dev\/sdb, offset 500107861504 sectors, size 0 bytes returned 0<br \/>\nERROR: erasing ondisk metadata on \/dev\/sdb<\/code><\/p>\n<p>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.\u00a0 Check yours by using df -h<\/p>\n<p><code># umount \/dev\/sdb1<br \/>\n# dd if=\/dev\/zero of=\/dev\/sdb bs=1M<\/code><\/p>\n<p>It&#8217;s  only the beginning and end we need to blank but I&#8217;ve been googling and  trying for half a day and can&#8217;t find it. In that time it could have  blanked the whole thing. After that you need to fdisk it<\/p>\n<p><code># \/sbin\/fdisk \/dev\/sdb<br \/>\nDevice contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel<br \/>\nBuilding a new DOS disklabel with disk identifier 0xa99048f4.<br \/>\nChanges will remain in memory only, until you decide to write them.<br \/>\nAfter that, of course, the previous content won't be recoverable.<\/code><\/p>\n<p>The number of cylinders for this disk is set to 60801.<br \/>\nThere is nothing wrong with that, but this is larger than 1024,<br \/>\nand could in certain setups cause problems with:<br \/>\n1) software that runs at boot time (e.g., old versions of LILO)<br \/>\n2) booting and partitioning software from other OSs<br \/>\n(e.g., DOS FDISK, OS\/2 FDISK)<br \/>\nWarning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)<\/p>\n<p>Command (m for help): p<\/p>\n<p>Disk \/dev\/sdb: 500.1 GB, 500107862016 bytes<br \/>\n255 heads, 63 sectors\/track, 60801 cylinders<br \/>\nUnits = cylinders of 16065 * 512 = 8225280 bytes<br \/>\nDisk identifier: 0xa99048f4<\/p>\n<p>Device Boot Start End Blocks Id System<\/p>\n<p>Command (m for help): n<br \/>\nCommand action<br \/>\ne extended<br \/>\np primary partition (1-4)<br \/>\np<br \/>\nPartition number (1-4): 1<br \/>\nFirst cylinder (1-60801, default 1):<br \/>\nUsing default value 1<br \/>\nLast cylinder or +size or +sizeM or +sizeK (1-60801, default 60801):<br \/>\nUsing default value 60801<\/p>\n<p>Command (m for help): p<\/p>\n<p>Disk \/dev\/sdb: 500.1 GB, 500107862016 bytes<br \/>\n255 heads, 63 sectors\/track, 60801 cylinders<br \/>\nUnits = cylinders of 16065 * 512 = 8225280 bytes<br \/>\nDisk identifier: 0xa99048f4<\/p>\n<p>Device Boot Start End Blocks Id System<br \/>\n\/dev\/sdb1 1 60801 488384001 83 Linux<\/p>\n<p>Command (m for help): w<br \/>\nThe partition table has been altered!<\/p>\n<p>Calling ioctl() to re-read partition table.<br \/>\nSyncing disks.<\/p>\n<p>And create the filesystem<\/p>\n<p><code># \/sbin\/mkfs.ext3 \/dev\/sdb1<br \/>\nmke2fs 1.40.4 (31-Dec-2007)<br \/>\nFilesystem label=<br \/>\nOS type: Linux<br \/>\nBlock size=4096 (log=2)<br \/>\nFragment size=4096 (log=2)<br \/>\n61063168 inodes, 122096000 blocks<br \/>\n6104800 blocks (5.00%) reserved for the super user<br \/>\nFirst data block=0<br \/>\nMaximum filesystem blocks=0<br \/>\n3727 block groups<br \/>\n32768 blocks per group, 32768 fragments per group<br \/>\n16384 inodes per group<br \/>\nSuperblock backups stored on blocks:<br \/>\n32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,<br \/>\n4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,<br \/>\n102400000<\/code><\/p>\n<p>Writing inode tables: done<br \/>\nCreating journal (32768 blocks): done<br \/>\nWriting superblocks and filesystem accounting information: done<\/p>\n<p>This filesystem will be automatically checked every 29 mounts or<br \/>\n180 days, whichever comes first. Use tune2fs -c or -i to override.<\/p>\n<p>Don&#8217;t forget the label for easier mounting and remount<\/p>\n<p><code># \/sbin\/e2label \/dev\/sdb1 LABEL=switch<br \/>\n# mount LABEL=switch \/media\/switch\/<\/code><\/p>\n<p>From that it stopped listing that drive as a raid, Yay!<\/p>\n<p><code># \/sbin\/dmraid -ay -vvv -d<br \/>\nWARN: locking \/var\/lock\/dmraid\/.lock<br \/>\nNOTICE: \/dev\/sdf: asr discovering<br \/>\nNOTICE: \/dev\/sdf: ddf1 discovering<br \/>\nNOTICE: \/dev\/sdf: hpt37x discovering<br \/>\nNOTICE: \/dev\/sdf: hpt45x discovering<br \/>\nNOTICE: \/dev\/sdf: isw discovering<br \/>\nNOTICE: \/dev\/sdf: jmicron discovering<br \/>\nNOTICE: \/dev\/sdf: lsi discovering<br \/>\nNOTICE: \/dev\/sdf: nvidia discovering<br \/>\nNOTICE: \/dev\/sdf: pdc discovering<br \/>\nNOTICE: \/dev\/sdf: sil discovering<br \/>\nNOTICE: \/dev\/sdf: via discovering<br \/>\nNOTICE: \/dev\/sde: asr discovering<br \/>\nNOTICE: \/dev\/sde: ddf1 discovering<br \/>\nNOTICE: \/dev\/sde: hpt37x discovering<br \/>\nNOTICE: \/dev\/sde: hpt45x discovering<br \/>\nNOTICE: \/dev\/sde: isw discovering<br \/>\nNOTICE: \/dev\/sde: jmicron discovering<br \/>\nNOTICE: \/dev\/sde: lsi discovering<br \/>\nNOTICE: \/dev\/sde: nvidia discovering<br \/>\nNOTICE: \/dev\/sde: pdc discovering<br \/>\nNOTICE: \/dev\/sde: sil discovering<br \/>\nNOTICE: \/dev\/sde: via discovering<br \/>\nNOTICE: \/dev\/sdd: asr discovering<br \/>\nNOTICE: \/dev\/sdd: ddf1 discovering<br \/>\nNOTICE: \/dev\/sdd: hpt37x discovering<br \/>\nNOTICE: \/dev\/sdd: hpt45x discovering<br \/>\nNOTICE: \/dev\/sdd: isw discovering<br \/>\nNOTICE: \/dev\/sdd: jmicron discovering<br \/>\nNOTICE: \/dev\/sdd: lsi discovering<br \/>\nNOTICE: \/dev\/sdd: nvidia discovering<br \/>\nNOTICE: \/dev\/sdd: pdc discovering<br \/>\nNOTICE: \/dev\/sdd: sil discovering<br \/>\nNOTICE: \/dev\/sdd: via discovering<br \/>\nNOTICE: \/dev\/sdc: asr discovering<br \/>\nNOTICE: \/dev\/sdc: ddf1 discovering<br \/>\nNOTICE: \/dev\/sdc: ddf1 metadata discovered<br \/>\nNOTICE: \/dev\/sdc: hpt37x discovering<br \/>\nNOTICE: \/dev\/sdc: hpt45x discovering<br \/>\nNOTICE: \/dev\/sdc: isw discovering<br \/>\nNOTICE: \/dev\/sdc: jmicron discovering<br \/>\nNOTICE: \/dev\/sdc: lsi discovering<br \/>\nNOTICE: \/dev\/sdc: nvidia discovering<br \/>\nNOTICE: \/dev\/sdc: pdc discovering<br \/>\nNOTICE: \/dev\/sdc: sil discovering<br \/>\nNOTICE: \/dev\/sdc: via discovering<br \/>\nNOTICE: \/dev\/sdb: asr discovering<br \/>\nNOTICE: \/dev\/sdb: ddf1 discovering<br \/>\nNOTICE: \/dev\/sdb: hpt37x discovering<br \/>\nNOTICE: \/dev\/sdb: hpt45x discovering<br \/>\nNOTICE: \/dev\/sdb: isw discovering<br \/>\nNOTICE: \/dev\/sdb: jmicron discovering<br \/>\nNOTICE: \/dev\/sdb: lsi discovering<br \/>\nNOTICE: \/dev\/sdb: nvidia discovering<br \/>\nNOTICE: \/dev\/sdb: pdc discovering<br \/>\nNOTICE: \/dev\/sdb: sil discovering<br \/>\nNOTICE: \/dev\/sdb: via discovering<br \/>\nNOTICE: \/dev\/sda: asr discovering<br \/>\nNOTICE: \/dev\/sda: ddf1 discovering<br \/>\nNOTICE: \/dev\/sda: hpt37x discovering<br \/>\nNOTICE: \/dev\/sda: hpt45x discovering<br \/>\nNOTICE: \/dev\/sda: isw discovering<br \/>\nNOTICE: \/dev\/sda: jmicron discovering<br \/>\nNOTICE: \/dev\/sda: lsi discovering<br \/>\nNOTICE: \/dev\/sda: nvidia discovering<br \/>\nNOTICE: \/dev\/sda: pdc discovering<br \/>\nNOTICE: \/dev\/sda: sil discovering<br \/>\nNOTICE: \/dev\/sda: via discovering<br \/>\nDEBUG: _find_set: searching .ddf1_disks<br \/>\nDEBUG: _find_set: not found .ddf1_disks<br \/>\nERROR: ddf1: cannot find virtual drive record on \/dev\/sdc<br \/>\nNOTICE: added \/dev\/sdc to RAID set \".ddf1_disks\"<br \/>\nDEBUG: set status of set \".ddf1_disks\" to 16<br \/>\nINFO: Activating GROUP RAID set \".ddf1_disks\"<br \/>\nWARN: unlocking \/var\/lock\/dmraid\/.lock<br \/>\nDEBUG: freeing devices of RAID set \".ddf1_disks\"<br \/>\nDEBUG: freeing device \".ddf1_disks\", path \"\/dev\/sdc\"<\/code><\/p>\n<p>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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8217;t in a raid. On &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"https:\/\/www.lanchbury.au\/?p=53\">Continue reading<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[6],"tags":[],"class_list":["post-53","post","type-post","status-publish","format-standard","hentry","category-support","item-wrap"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7tC7P-R","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.lanchbury.au\/index.php?rest_route=\/wp\/v2\/posts\/53","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lanchbury.au\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lanchbury.au\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lanchbury.au\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lanchbury.au\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=53"}],"version-history":[{"count":4,"href":"https:\/\/www.lanchbury.au\/index.php?rest_route=\/wp\/v2\/posts\/53\/revisions"}],"predecessor-version":[{"id":67,"href":"https:\/\/www.lanchbury.au\/index.php?rest_route=\/wp\/v2\/posts\/53\/revisions\/67"}],"wp:attachment":[{"href":"https:\/\/www.lanchbury.au\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=53"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lanchbury.au\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=53"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lanchbury.au\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=53"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}