Skip to contentSkip to conversation

AARGH! Please help. IDE controller fsckup

DISCUSSION Roy Sigurd Karlsbakk 4 participants 10 messages Oct 2, 2002 – Oct 5, 2002 MD RAID

lore
Share & tools
lore
#0 lore raw

hi all

I have this cute little server with some 16 120gig IDE drives, and I've got some serious problems with it.

Controllers:
One onboard IDE controller (2 channels).
Two promise ATA100 (2 channels each).
One CMD649 (2 channels).

something seriously bad about the CMD649 makes Linux beleive it's the first controller with hd[abcd]. On these, there are two RAID-1s (/ and /var). Due to the fact that the box has some 1,6TB disk space, we haven't got any backup solution (we have an identical box in order to mirror them).

so - now - the CMD649 has suddenly begun to fail - losing contact with one or two drives, and I _really_ need to get what's on /data (RAID-5 on hd[efghijklmnop]) out. Problem is - the replacement controller I've got from the vendor works fine (turns up as controller 3 serving hd[mnop]). How can I revert this most easily to be able to boot again?

I hope this is not too off topic... Please excuse that.

roy

Signature · 6 lines
Roy Sigurd Karlsbakk, Datavaktmester
ProntoTV AS - http://www.pronto.tv/
Tel: +47 9801 3356

Computers are like air conditioners.
They stop working when you open Windows.
#1 lore raw
Quoted 15 lines · Roy Sigurd Karlsbakk

hi all

I have this cute little server with some 16 120gig IDE drives, and I've got some serious problems with it.

Controllers:
One onboard IDE controller (2 channels).
Two promise ATA100 (2 channels each).
One CMD649 (2 channels).

something seriously bad about the CMD649 makes Linux beleive it's the first controller with hd[abcd]. On these, there are two RAID-1s (/ and /var). Due to the fact that the box has some 1,6TB disk space, we haven't got any backup solution (we have an identical box in order to mirror them).

Quoted 5 lines

so - now - the CMD649 has suddenly begun to fail - losing contact with one or two drives, and I _really_ need to get what's on /data (RAID-5 on hd[efghijklmnop]) out. Problem is - the replacement controller I've got from the vendor works fine (turns up as controller 3 serving hd[mnop]). How can I revert this most easily to be able to boot again?

Hindsight: had you used persistent superblocks, this would not have been a problem. The kernel would know the correct ordering from the superblocks, not the device names.

Solution 1: Write to the RAID mailing list and have one of the mdadm gurus give you a one-liner to initialize the array with the proper ordering.

Solution 2: Edit your /etc/raidtab to reflect the new device naming and run raidstart.

If you start up the array with a bad ordering, no amount of magic is going to bring back you data (after parity has been "reconstructed" on various chunks of your existing data).

Quoted 3 lines

I hope this is not too off topic... Please excuse that.

linux-raid is a better place.

Cheers,

Signature · 6 lines
................................................................
:   [email protected]   : And I see the elder races,         :
:.........................: putrid forms of man                :
:   Jakob Østergaard      : See him rise and claim the earth,  :
:        OZ9ABN           : his downfall is at hand.           :
:.........................:............{Konkhra}...............:
#2 lore raw
Quoted 9 lines
Quoted 5 lines

so - now - the CMD649 has suddenly begun to fail - losing contact with one or two drives, and I _really_ need to get what's on /data (RAID-5 on hd[efghijklmnop]) out. Problem is - the replacement controller I've got from the vendor works fine (turns up as controller 3 serving hd[mnop]). How can I revert this most easily to be able to boot again?

Hindsight: had you used persistent superblocks, this would not have been a problem. The kernel would know the correct ordering from the superblocks, not the device names.

I have used presistent superblocks, but md0,1,2,3 will be differently ordered if I change the disk order... At least I think so. It surely didn't work.

Quoted 6 lines

Solution 1: Write to the RAID mailing list and have one of the mdadm gurus give you a one-liner to initialize the array with the proper ordering.

Solution 2: Edit your /etc/raidtab to reflect the new device naming and run raidstart.

ok. but this won't be neccecary with persistent superblocks? right?

Quoted 3 lines

If you start up the array with a bad ordering, no amount of magic is going to bring back you data (after parity has been "reconstructed" on various chunks of your existing data).

But ... with persistent superblock - is it possible to fsckup the raid?

Quoted 1 line

linux-raid is a better place.

I'll mail them. Thanks anyway

roy

Signature · 6 lines
Roy Sigurd Karlsbakk, Datavaktmester
ProntoTV AS - http://www.pronto.tv/
Tel: +47 9801 3356

Computers are like air conditioners.
They stop working when you open Windows.
#3 lore raw
Quoted 6 lines · Roy Sigurd Karlsbakk
Quoted 6 lines
Quoted 5 lines

so - now - the CMD649 has suddenly begun to fail - losing contact with one or two drives, and I _really_ need to get what's on /data (RAID-5 on hd[efghijklmnop]) out. Problem is - the replacement controller I've got from the vendor works fine (turns up as controller 3 serving hd[mnop]). How can I revert this most easily to be able to boot again?

Quoted 6 lines
Quoted 3 lines

Hindsight: had you used persistent superblocks, this would not have been a problem. The kernel would know the correct ordering from the superblocks, not the device names.

I have used presistent superblocks, but md0,1,2,3 will be differently ordered if I change the disk order... At least I think so. It surely didn't work.

No. md0 would stay md0. This is another effect of using superblocks, and in fact this is also (ironically) more or less the only argument
*against* using them :)

(Imagine inserting a disk which knows that it is disk 0 of md0 into some machine that already has a perfectly fine md0 running)

Quoted 9 lines
Quoted 7 lines

Solution 1: Write to the RAID mailing list and have one of the mdadm gurus give you a one-liner to initialize the array with the proper ordering.

Solution 2: Edit your /etc/raidtab to reflect the new device naming and run raidstart.

ok. but this won't be neccecary with persistent superblocks? right?

right

Quoted 6 lines
Quoted 4 lines

If you start up the array with a bad ordering, no amount of magic is going to bring back you data (after parity has been "reconstructed" on various chunks of your existing data).

But ... with persistent superblock - is it possible to fsckup the raid?

You're root, it is indeed possible :)

But you would not need to perform any of the special operations that you need to now.

Persistent superblocks saves you from a number of "bad" situations you can encounter with normal production systems (such as replacing a controller or moving disks around).

One should be careful when moving disks with persistent superblocks between systems though. You don't want the kernel to autodetect the
"wrong" md0 on boot :) I consider this problem nonexistent in the
production environment that I administer, but I know that some people feel differently about it. You should consider these pros and cons in relation to your environment and make a decision based on that.

Cheers,

Signature · 6 lines
................................................................
:   [email protected]   : And I see the elder races,         :
:.........................: putrid forms of man                :
:   Jakob Østergaard      : See him rise and claim the earth,  :
:        OZ9ABN           : his downfall is at hand.           :
:.........................:............{Konkhra}...............:
#4 lore raw
Quoted 10 lines
Quoted 3 lines

I have used presistent superblocks, but md0,1,2,3 will be differently ordered if I change the disk order... At least I think so. It surely didn't work.

No. md0 would stay md0. This is another effect of using superblocks, and in fact this is also (ironically) more or less the only argument
*against* using them :)

(Imagine inserting a disk which knows that it is disk 0 of md0 into some machine that already has a perfectly fine md0 running)

ok. so. theoretically - as long as the system finds all 16 drives, I should be able to shuffle them around and attach them to whichever controller there is? right?

ok.

now, I've replaced the faulty controller, and booting up. the new controller is also (like the old one) a CMD649...

hæ?

it works. but it surely didn't work last time...

thanks

Quoted 3 lines
Quoted 1 line

But ... with persistent superblock - is it possible to fsckup the raid?

You're root, it is indeed possible :)

er - yes. I more meant like 'automagically'

Quoted 13 lines

But you would not need to perform any of the special operations that you need to now.

Persistent superblocks saves you from a number of "bad" situations you can encounter with normal production systems (such as replacing a controller or moving disks around).

One should be careful when moving disks with persistent superblocks between systems though. You don't want the kernel to autodetect the
"wrong" md0 on boot :) I consider this problem nonexistent in the
production environment that I administer, but I know that some people feel differently about it. You should consider these pros and cons in relation to your environment and make a decision based on that.

Signature · 6 lines
Roy Sigurd Karlsbakk, Datavaktmester
ProntoTV AS - http://www.pronto.tv/
Tel: +47 9801 3356

Computers are like air conditioners.
They stop working when you open Windows.
#5 lore raw
Quoted 8 lines · Roy Sigurd Karlsbakk
Quoted 8 lines
Quoted 3 lines

I have used presistent superblocks, but md0,1,2,3 will be differently ordered if I change the disk order... At least I think so. It surely didn't work.

No. md0 would stay md0. This is another effect of using superblocks, and in fact this is also (ironically) more or less the only argument
*against* using them :)

Quoted 6 lines
Quoted 2 lines

(Imagine inserting a disk which knows that it is disk 0 of md0 into some machine that already has a perfectly fine md0 running)

ok. so. theoretically - as long as the system finds all 16 drives, I should be able to shuffle them around and attach them to whichever controller there is? right?

It will not reattach your disks (you need to move cables to do that), but it will know "First disk of md0" from "Second disk of md0" regardless of whether those disks are /dev/hda or /dev/sdg.

You can shuffle your disks around as much as you please. When the RAID code looks at your disks, it will read their superblocks and correctly make the first disk of md0 the first disk of md0, and so forth, regardless of the actual device name of the disk.

Quoted 6 lines

ok.

now, I've replaced the faulty controller, and booting up. the new controller is also (like the old one) a CMD649...

RAID doesn't care about controllers.

RAID without persistent superblocks cares about disk device names.

RAID with persistent superblocks don't care about disk device names.

Quoted 1 line

hæ?

Øh?

Quoted 3 lines

it works. but it surely didn't work last time...

Good for you :)

Quoted 7 lines

thanks

Quoted 3 lines
Quoted 1 line

But ... with persistent superblock - is it possible to fsckup the raid?

You're root, it is indeed possible :)

er - yes. I more meant like 'automagically'

It will only automagically screw up your arrays if you shuffle disks between machines (mix several RAID arrays from other systems in one system) (you can of course move all your disks to one new machine, if it has none of it's original RAIDed disks left).

Just don't mix disks with persistent superblocks from multiple machines into one single machine. Unless you know exactly what you're doing.

Signature · 6 lines
................................................................
:   [email protected]   : And I see the elder races,         :
:.........................: putrid forms of man                :
:   Jakob Østergaard      : See him rise and claim the earth,  :
:        OZ9ABN           : his downfall is at hand.           :
:.........................:............{Konkhra}...............:
#6 lore raw

One of the observed issues under raid-tools is not looking at all the devices' superblocks. This would allow for out of order initialization. Treating the devices as domino chips and stuffing them back in random order and it working.

If I am wrong here, great. Somebody please make the correction.

Cheers,

Quoted 56 lines · Jakob Oestergaard
Quoted 8 lines · Roy Sigurd Karlsbakk
Quoted 8 lines
Quoted 3 lines

I have used presistent superblocks, but md0,1,2,3 will be differently ordered if I change the disk order... At least I think so. It surely didn't work.

No. md0 would stay md0. This is another effect of using superblocks, and in fact this is also (ironically) more or less the only argument
*against* using them :)

Quoted 6 lines
Quoted 2 lines

(Imagine inserting a disk which knows that it is disk 0 of md0 into some machine that already has a perfectly fine md0 running)

ok. so. theoretically - as long as the system finds all 16 drives, I should be able to shuffle them around and attach them to whichever controller there is? right?

It will not reattach your disks (you need to move cables to do that), but it will know "First disk of md0" from "Second disk of md0" regardless of whether those disks are /dev/hda or /dev/sdg.

You can shuffle your disks around as much as you please. When the RAID code looks at your disks, it will read their superblocks and correctly make the first disk of md0 the first disk of md0, and so forth, regardless of the actual device name of the disk.

Quoted 6 lines

ok.

now, I've replaced the faulty controller, and booting up. the new controller is also (like the old one) a CMD649...

RAID doesn't care about controllers.

RAID without persistent superblocks cares about disk device names.

RAID with persistent superblocks don't care about disk device names.

Quoted 1 line

hæ?

Øh?

Quoted 3 lines

it works. but it surely didn't work last time...

Good for you :)

Quoted 7 lines

thanks

Quoted 3 lines
Quoted 1 line

But ... with persistent superblock - is it possible to fsckup the raid?

You're root, it is indeed possible :)

er - yes. I more meant like 'automagically'

Quoted 21 lines

It will only automagically screw up your arrays if you shuffle disks between machines (mix several RAID arrays from other systems in one system) (you can of course move all your disks to one new machine, if it has none of it's original RAIDed disks left).

Just don't mix disks with persistent superblocks from multiple machines into one single machine. Unless you know exactly what you're doing.

Signature · 11 lines
................................................................
:   [email protected]   : And I see the elder races,         :
:.........................: putrid forms of man                :
:   Jakob Østergaard      : See him rise and claim the earth,  :
:        OZ9ABN           : his downfall is at hand.           :
:.........................:............{Konkhra}...............:
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Andre Hedrick
LAD Storage Consulting Group

#7 lore raw

[snipping CC]

Quoted 5 lines · Andre Hedrick

One of the observed issues under raid-tools is not looking at all the devices' superblocks. This would allow for out of order initialization. Treating the devices as domino chips and stuffing them back in random order and it working.

Have you seen this happening? With non-development kernels? ;)

There was one issue with raid startup that wouldn't start up arrays if the first disk of the array was missing, or something like that. It was a long-standing bug but it has been fixed.

I have not heard of the problem you're reporting.

Quoted 2 lines

If I am wrong here, great. Somebody please make the correction.

Now is the time for someone out there to actually point out that error which I blissfully ignored and which ruined their TB array of medical
records... ;)

Signature · 10 lines
................................................................
:   [email protected]   : And I see the elder races,         :
:.........................: putrid forms of man                :
:   Jakob Østergaard      : See him rise and claim the earth,  :
:        OZ9ABN           : his downfall is at hand.           :
:.........................:............{Konkhra}...............:
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#8 lore raw
In reply to Jakob Oestergaard
Quoted 10 lines · Jakob Oestergaard
Quoted 9 lines
Quoted 6 lines
Quoted 3 lines

But ... with persistent superblock - is it possible to fsckup the raid?

You're root, it is indeed possible :)

er - yes. I more meant like 'automagically'

Quoted 9 lines

It will only automagically screw up your arrays if you shuffle disks between machines (mix several RAID arrays from other systems in one system) (you can of course move all your disks to one new machine, if it has none of it's original RAIDed disks left).

Just don't mix disks with persistent superblocks from multiple machines into one single machine. Unless you know exactly what you're doing.

Could it be some kind of idea to 'sign' the disks with some hash out of hostname and IP or something?

roy

#9 lore raw

Just picking a severly large number at random would be good enough. But more useful ideas would be to keep the first two or three blocks over the n-disks as a md5 sum or other kind of checksum as your id.

Yeah, that means the id can change, but that's not very important... it just needs to be unique so that the automagic stops if something weird happens (an out of sync disk, or a foreign disk).

Or at least, this makes sense to me, with no prior sleep for 20 hours.

-Gryn (Adam Luter)

Quoted 14 lines · Roy Sigurd Karlsbakk
Quoted 4 lines
Quoted 3 lines
Quoted 2 lines
Quoted 1 line

But ... with persistent superblock - is it possible to fsckup the raid?

You're root, it is indeed possible :)

er - yes. I more meant like 'automagically'

Quoted 8 lines

It will only automagically screw up your arrays if you shuffle disks between machines (mix several RAID arrays from other systems in one system) (you can of course move all your disks to one new machine, if it has none of it's original RAIDed disks left).

Just don't mix disks with persistent superblocks from multiple machines into one single machine. Unless you know exactly what you're doing.

Could it be some kind of idea to 'sign' the disks with some hash out of hostname and IP or something?