Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Software RAID disk replacement missing superblock
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
alinmesser
n00b
n00b


Joined: 26 Jun 2004
Posts: 25

PostPosted: Wed Oct 24, 2007 12:12 am    Post subject: Software RAID disk replacement missing superblock Reply with quote

Hi, I've using the linux (md) raid for many years now without any issues, but I just ran into one I cannot solve.

I have a 4 disk raid0 array, and one of the disks started developing bad sectors.
Code:
Oct 23 03:23:26 homer hde: dma_intr: status=0x51 { DriveReady SeekComplete Error }
Oct 23 03:23:26 homer hde: dma_intr: error=0x40 { UncorrectableError }, LBAsect=294715424, high=17, low=9502752, sector=294715424

I was lucky enough to find an identical drive (Maxtor 6Y160P0) and I'm trying to replace the bad one.

I did:
Code:
dd if=/dev/hde of=/dev/hdc conv=noerror bs=512

only to find out that, for some unknown reasons, the extra-super-secret raid superblock is not being replicated with dd...
I found somewhere in the documentation that it is supposed to be located in the last 128k of the disk... but it's not, unless dd is not really as low-level as I thought.

Superblock output:
Code:
mdadm -E /dev/hde
/dev/hdc:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : 12d85fe9:ded8f770:930cf5aa:44457eac
  Creation Time : Mon Oct  2 16:10:26 2006
     Raid Level : raid0
  Used Dev Size : 0
   Raid Devices : 4
  Total Devices : 4
Preferred Minor : 0

    Update Time : Tue Jul 31 02:26:49 2007
          State : active
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 0
       Checksum : fdff9f94 - correct
         Events : 0.3

     Chunk Size : 64K

      Number   Major   Minor   RaidDevice State
this     0      33        0        0      active sync   /dev/hde

   0     0      33        0        0      active sync   /dev/hde
   1     1      34        0        1      active sync   /dev/hdg
   2     2      56        0        2      active sync   /dev/hdi
   3     3      57        0        3      active sync   /dev/hdk

and, of course:
Code:
mdadm -E /dev/hdc
mdadm: No md superblock detected on /dev/hdc

Since it's a RAID0 I cannot add the disk and than mark the other one as failed.
I am afraid to do anything more drastic like zero-ing out the superblocks and re-creating the array, it must be a way to copy the disk.
Did any of you run into this before?

Thanks in advance
_________________
MesseR
Back to top
View user's profile Send private message
alinmesser
n00b
n00b


Joined: 26 Jun 2004
Posts: 25

PostPosted: Wed Oct 24, 2007 2:51 pm    Post subject: Fixed Reply with quote

The problem was me not using the "sync" option for dd.
The correct way was:
Code:
dd if=/dev/hde of=/dev/hdc conv=noerror,sync bs=512

Whithout "sync", dd skips over the bad sectors in the input but doesn't seek ahead by a secotr in the output, so everything is skewed from that point on.
_________________
MesseR
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum