need help in recovering a RAID

2007-06-15 Thread Thorsten Wolf
Hello again, everyone.

I've been really busy playing and working with mdadm tools lately. And I've 
come across a problem which I haven't been able to solve myself so far.

My system looks like this:
IDE:
/dev/hda1   --   /  100 GB
/dev/hda2   --   SWAP 1 GB
/dev/hda3   --   /home  395 GB

S-ATA onboard:
/dev/hde1   --   Disk 0 on /dev/md0
/dev/hdg1   --   Disk 1 on /dev/md0
/dev/hdi1   --   Disk 2 on /dev/md0
/dev/hdk1   --   Disk 3 on /dev/md0

/dev/md0-- via LVG mounted as /raid

A loose cable caused hdi and hdk to go offline. The server itself was shut down 
1 minute later.

But I can't access the raid anymore because it marked the disks as failed. 
There was no write access to the system when the power went down on the two 
disks.

How can I mark them as online (I'm pretty sure the data is still ok) ???

I really want to get the raid working again as I think this is a good scenario 
that I'd like to be able to handle in the future.

Regards,

Thorsten
-- 
Contact me on ICQ: 7656468
skype://sysfried

Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
-
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


Re: limits on raid

2007-06-15 Thread Neil Brown
On Friday June 15, [EMAIL PROTECTED] wrote:
 
   As I understand the way
 raid works, when you write a block to the array, it will have to read all
 the other blocks in the stripe and recalculate the parity and write it out.

Your understanding is incomplete.
For raid5 on an array with more than 3 drive, if you attempt to write
a single block, it will:

 - read the current value of the block, and the parity block.
 - subtract the old value of the block from the parity, and add
   the new value.
 - write out the new data and the new parity.

If the parity was wrong before, it will still be wrong.  If you then
lose a drive, you lose your data.

With the current implementation in md, this only affect RAID5.  RAID6
will always behave as you describe.  But I don't promise that won't
change with time.

It would be possible to have a 'this is not initialised' flag on the
array, and if that is not set, always do a reconstruct-write rather
than a read-modify-write.  But the first time you have an unclean
shutdown you are going to resync all the parity anyway (unless you
have a bitmap) so you may as well resync at the start.

And why is it such a big deal anyway?  The initial resync doesn't stop
you from using the array.  I guess if you wanted to put an array into
production instantly and couldn't afford any slowdown due to resync,
then you might want to skip the initial resync but is that really
likely?

NeilBrown
-
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