Skip to contentSkip to conversation

will mdadm work with a raid created using raidtools

DISCUSSION Andrew Nelson 3 participants 8 messages Feb 15, 2006 – Feb 16, 2006 MD RAID

lore
Share & tools
lore
#0 lore raw

I may be a bit late in asking this because I already gave it a try but will mdadm work with a raid created using raidtools?

//andy

#1 lore raw
Quoted 2 lines · On Wednesday February 15, [email protected] wrote:

I may be a bit late in asking this because I already gave it a try but will mdadm work with a raid created using raidtools?

Yes. There is no difference in the arrays created by raidtools or mdadm.

NeilBrown

#2 lore raw
Quoted 10 lines · Neil Brown
Quoted 2 lines · On Wednesday February 15, [email protected] wrote:

I may be a bit late in asking this because I already gave it a try but will mdadm work with a raid created using raidtools?

Yes. There is no difference in the arrays created by raidtools or mdadm.

Cool. Now I just gotta figure out why I can't create the raid. Sadly when this system crashed I lost the old /etc/raidtab config so I really have no idea how the raid was set up, but here is what I've done so far.

alfalfa:~# mdadm --examine /dev/hdg
/dev/hdg:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : 04407130:1c19b2b9:2c573158:ee8ac467
  Creation Time : Sun Dec 21 16:19:13 2003
     Raid Level : raid1
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 0

Update Time : Tue Jan 13 23:12:57 2004
State : active
Active Devices : 1
Working Devices : 2
Failed Devices : 0
Spare Devices : 1
Checksum : 6ff770df - correct
Events : 0.29

Number Major Minor RaidDevice State
this 2 34 0 2 spare /dev/hdg

   0     0      33        1        0      active sync   /dev/hde1
   1     1       0        0        1      faulty removed
   2     2      34        0        2      spare   /dev/hdg
alfalfa:~# mdadm --examin /dev/hde
mdadm: No super block found on /dev/hde (Expected magic a92b4efc, got ffffffff)
alfalfa:~# mdadm --examin /dev/hde1
/dev/hde1:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : 04407130:1c19b2b9:2c573158:ee8ac467
  Creation Time : Sun Dec 21 16:19:13 2003
     Raid Level : raid1
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 0

Update Time : Tue Feb 14 21:44:46 2006
State : active
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0

       Checksum : 73e5445d - correct
         Events : 0.42


      Number   Major   Minor   RaidDevice State

this 0 33 1 0 active sync /dev/hde1

   0     0      33        1        0      active sync   /dev/hde1
   1     1      34        1        1      active sync   /dev/hdg1
alfalfa:~# mdadm --examin /dev/hdg1
/dev/hdg1:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : 04407130:1c19b2b9:2c573158:ee8ac467
  Creation Time : Sun Dec 21 16:19:13 2003
     Raid Level : raid1
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 0

Update Time : Tue Feb 14 21:44:46 2006
State : active
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0

       Checksum : 73e54460 - correct
         Events : 0.42


      Number   Major   Minor   RaidDevice State

this 1 34 1 1 active sync /dev/hdg1

   0     0      33        1        0      active sync   /dev/hde1
   1     1      34        1        1      active sync   /dev/hdg1

I then try to assemble the raid with

mdadm --assemble /dev/md0 /dev/hdg1 /dev/hde1

This appears to work fine but then the computer locks up. With this info in syslog.

Feb 14 21:57:19 localhost kernel: md: md driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DI
SKS=27
Feb 14 21:57:19 localhost kernel: md: md0 stopped.
Feb 14 21:57:51 localhost kernel: md: md0 stopped.
Feb 14 21:57:52 localhost kernel: md: bind<hdg1>
Feb 14 21:57:52 localhost kernel: md: bind<hde1>
Feb 14 21:57:52 localhost kernel: md: md0: raid array is not clean -- starting b
ackground reconstruction
Feb 14 21:57:52 localhost kernel: md: raid1 personality registered as nr 3
Feb 14 21:57:52 localhost kernel: raid1: raid set md0 active with 2 out of 2 mir
rors
Feb 14 21:57:52 localhost kernel: md: syncing RAID array md0
Feb 14 21:57:52 localhost kernel: md: minimum _guaranteed_ reconstruction speed:
 1000 KB/sec/disc.
Feb 14 21:57:52 localhost kernel: md: using maximum available idle IO bandwith (
but not more than 200000 KB/sec) for reconstruction.
Feb 14 21:57:52 localhost kernel: md: using 128k window, over a total of 1953583
36 blocks.
Feb 14 21:58:36 localhost kernel: hde: dma_timer_expiry: dma status == 0x21
Feb 14 21:58:46 localhost kernel: hde: DMA timeout error
Feb 14 21:58:46 localhost kernel: hde: dma timeout error: status=0x51 { DriveRea
dy SeekComplete Error }
Feb 14 21:58:46 localhost kernel: hde: dma timeout error: error=0x40 { Uncorrect
ableError }, LBAsect=1594001, high=0, low=1594001, sector=1593535
Feb 14 21:58:46 localhost kernel: end_request: I/O error, dev hde, sector 159353

5

Does anyone have any idea what I'm doing wrong?

Thanks much

//andy

#3 lore raw
Quoted 10 lines · Andrew Nelson
Feb 14 21:58:36 localhost kernel: hde: dma_timer_expiry: dma status == 0x21
Feb 14 21:58:46 localhost kernel: hde: DMA timeout error
Feb 14 21:58:46 localhost kernel: hde: dma timeout error: status=0x51 { DriveRea
dy SeekComplete Error }
Feb 14 21:58:46 localhost kernel: hde: dma timeout error: error=0x40 { Uncorrect
ableError }, LBAsect=1594001, high=0, low=1594001, sector=1593535
Feb 14 21:58:46 localhost kernel: end_request: I/O error, dev hde, sector 159353

5

Does anyone have any idea what I'm doing wrong?

It's probably not your fault - blame /dev/hde! This sounds like a bad error on the disk - you should really get a new one, and try to copy /dev/hde to the new disk (with dd_rescue for example). This _might_ save the data.

Then you can try to create the array with the new disk and hope that it will work.

Greetings,
Frank

#4 lore raw
Quoted 14 lines · Frank Blendinger
Quoted 10 lines · Andrew Nelson
Feb 14 21:58:36 localhost kernel: hde: dma_timer_expiry: dma status == 0x21
Feb 14 21:58:46 localhost kernel: hde: DMA timeout error
Feb 14 21:58:46 localhost kernel: hde: dma timeout error: status=0x51 { DriveRea
dy SeekComplete Error }
Feb 14 21:58:46 localhost kernel: hde: dma timeout error: error=0x40 { Uncorrect
ableError }, LBAsect=1594001, high=0, low=1594001, sector=1593535
Feb 14 21:58:46 localhost kernel: end_request: I/O error, dev hde, sector 159353

5

Does anyone have any idea what I'm doing wrong?

Quoted 8 lines

It's probably not your fault - blame /dev/hde! This sounds like a bad error on the disk - you should really get a new one, and try to copy /dev/hde to the new disk (with dd_rescue for example). This _might_ save the data.

Then you can try to create the array with the new disk and hope that it will work.

I thought the whole idea of a raid 1 was that if one drive went bad I could just plug a new drive in and the raid would rebuild without problems.

What have I done wrong so that this isn't possible?

//andy

#5 lore raw
Quoted 11 lines · Andrew Nelson
Quoted 7 lines

It's probably not your fault - blame /dev/hde! This sounds like a bad error on the disk - you should really get a new one, and try to copy /dev/hde to the new disk (with dd_rescue for example). This _might_ save the data.

Then you can try to create the array with the new disk and hope that it will work.

I thought the whole idea of a raid 1 was that if one drive went bad I could just plug a new drive in and the raid would rebuild without problems.

That is certainly right. I just wanted to tell you, that your /dev/hde probably has a serious hardware error, and that you should replace it!

Of course you can just throw it out, put in a new drive, rebuild the array with your other drive and the new one, and then resync. This should work just fine.

I guess my first answer was quite confusing, sorry. It's absolutely not necessary to copy the old hde with dd_rescue.

Greetings,
Frank

#6 lore raw
Quoted 22 lines · Frank Blendinger
Quoted 11 lines · Andrew Nelson
Quoted 7 lines

It's probably not your fault - blame /dev/hde! This sounds like a bad error on the disk - you should really get a new one, and try to copy /dev/hde to the new disk (with dd_rescue for example). This _might_ save the data.

Then you can try to create the array with the new disk and hope that it will work.

I thought the whole idea of a raid 1 was that if one drive went bad I could just plug a new drive in and the raid would rebuild without problems.

That is certainly right. I just wanted to tell you, that your /dev/hde probably has a serious hardware error, and that you should replace it!

Of course you can just throw it out, put in a new drive, rebuild the array with your other drive and the new one, and then resync. This should work just fine.

Quoted 6 lines

I guess my first answer was quite confusing, sorry. It's absolutely not necessary to copy the old hde with dd_rescue.

Greetings,
Frank

Is it possible to assemble the array with just /dev/hdg? I swear I saw an option somewhere that allowed just such a thing but now I can't find it anywhere.

//andy

#7 lore raw
Quoted 29 lines · Andrew Nelson
Quoted 27 lines · Frank Blendinger
Quoted 11 lines · Andrew Nelson
Quoted 7 lines

It's probably not your fault - blame /dev/hde! This sounds like a bad error on the disk - you should really get a new one, and try to copy /dev/hde to the new disk (with dd_rescue for example). This _might_ save the data.

Then you can try to create the array with the new disk and hope that it will work.

I thought the whole idea of a raid 1 was that if one drive went bad I could just plug a new drive in and the raid would rebuild without problems.

That is certainly right. I just wanted to tell you, that your /dev/hde probably has a serious hardware error, and that you should replace it!

Of course you can just throw it out, put in a new drive, rebuild the array with your other drive and the new one, and then resync. This should work just fine.

I guess my first answer was quite confusing, sorry. It's absolutely not necessary to copy the old hde with dd_rescue.

Quoted 9 lines
Quoted 2 lines

Greetings,
Frank

Is it possible to assemble the array with just /dev/hdg? I swear I saw an option somewhere that allowed just such a thing but now I can't find it anywhere.

//andy

Never mind I figured it out.

mdadm -AR /dev/md0 /dev/hdg1

So far this seems to work.

Thanks for all the help. I'll replace hde ASAP :).

//andy