linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Questions about software RAID
@ 2005-04-18 19:50 tmp
  2005-04-18 20:12 ` David Greaves
                   ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: tmp @ 2005-04-18 19:50 UTC (permalink / raw)
  To: linux-raid

I read the software RAID-HOWTO, but the below 6 questions is still
unclear. I have asked around on IRC-channels and it seems that I am not
the only one being confused. Maybe the HOWTO could be updated to
clearify the below items?


1) I have a RAID-1 setup with one spare disk. A disk crashes and the
spare disk takes over. Now, when the crashed disk is replaced with a new
one, what is then happening with the role of the spare disk? Is it
reverting to its old role as spare disk?

If it is NOT reverting to it's old role, then the raidtab file will
suddenly be out-of-sync with reality. Is that correct?

Does the answer given here differ in e.g. RAID-5 setups?


2) The new disk has to be manually partitioned before beeing used in the
array. What happens if the new partitions are larger than other
partitions used in the array? What happens if they are smaller?


3) Must all partition types be 0xFD? What happens if they are not?


4) I guess the partitions itself doesn't have to be formated as the
filesystem is on the RAID-level. Is that correct?


5) Removing a disk requires that I do a "mdadm -r" on all the partitions
that is involved in a RAID array. I attempt to by a hot-swap capable
controler, so what happens if I just pull out the disk without this
manual removal command?
Aren't there some more hotswap-friendly setup?


6) I know that the kernel does stripping automatically if more
partitions are given as swap partitions in /etc/fstab. But can it also
handle if one disk crashes? I.e. do I have to let my swap disk be a
RAID-setup too if I wan't it to continue upon disk crash?


Thanks!


^ permalink raw reply	[flat|nested] 26+ messages in thread
* Re: Questions about software RAID
@ 2005-04-19 11:00 bernd
  2005-04-19 14:40 ` Hervé Eychenne
  0 siblings, 1 reply; 26+ messages in thread
From: bernd @ 2005-04-19 11:00 UTC (permalink / raw)
  To: linux-raid

>Devid wrote:
>>>>
>>>> >5) Removing a disk requires that I do a "mdadm -r" on all the 
>>>> partitions
>>>> >that is involved in a RAID array. I attempt to by a hot-swap capable
>>>> >controler, so what happens if I just pull out the disk without this
>>>> >manual removal command?
>>>> as far as md is concerned the disk disappeared.
>>>> I _think_ this is just like mdadm -r.
>>
>> i think it will be marked faulty, not removed.
>>
>yep - you're right, I remember now.
>You have to mdadm -r remove it and re-add it once you restore the disk.

First you have to look if there are partitions on that disk to which no
data was written since the disk failed (this typically concerns the swap
partition). These partitions have to be marked faulty by hand using mdadm -f
before you can remove them with mdadm -r. If you have scsi-disks you have 
to use the following command to take it out off the kernel after removing 
a faulty disk:

echo "scsi remove-single-device h.c.i.l" >/proc/scsi/scsi

>>> So I could actually just pull out the disk, insert a new one and do a
>>> "mdadm -a /dev/mdX /dev/sdY"?
>>> The RAID system won't detect the newly inserted disk itself?
>
>or:
>no, it would be mighty strange if the raid subsystem just grabbed every
>new disk it saw...
>Think of what would happen when I insert my camera's compact flash card
>and it suddenly gets used as a hot spare <grin>

But if the new disk contains any RAID information and partitions on it
then after spinning it up with something like 
 
echo "scsi add-single-device h.c.i.l" >/proc/scsi/scsi
                                                      
the RAID system immediately tries to activate those incomming array(s).
We had this yesterday on a SuSE 9.3 system. So be carefull walking with
used disks from one system to another (this szenario is discussed actually
in a parallel thread under topic ... uuid...).
                                       
>> no, think of it as flexibility. if you want you can build something
>> using the "hotplug" subsystem.
                                 
We tried to build "something like a hotplug system" :-). Our hardware
supports this but in a ratio of 1:10 the kernel (actually 2.6.11-4) 
crashes when there is activity on that controller while spinning up the
new disk. We hoped the system would survive with the remaining (second)
controller and the part of the mirrors (RAID1) attached to it but it
fails in ca. 10% of our attempts. So till now we weren't lucky to build
up a system based on software-raid with no downtime in case of a disk 
failure. But may be this problem is more related to SCSI than to sw-raid...

Bernd Rieke

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2005-04-21  1:21 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-18 19:50 Questions about software RAID tmp
2005-04-18 20:12 ` David Greaves
2005-04-18 23:12   ` tmp
2005-04-19  6:36     ` Peter T. Breuer
2005-04-19  7:15     ` Luca Berra
2005-04-19  8:08       ` David Greaves
2005-04-19 12:18         ` Michael Tokarev
2005-04-19 12:08     ` Don't use whole disks for raid arrays [was: Questions about software RAID] Michael Tokarev
2005-04-18 20:15 ` Questions about software RAID Peter T. Breuer
2005-04-18 20:50 ` Frank Wittig
  -- strict thread matches above, loose matches on Subject: below --
2005-04-19 11:00 bernd
2005-04-19 14:40 ` Hervé Eychenne
2005-04-19 15:27   ` David Greaves
2005-04-19 15:54     ` Hervé Eychenne
2005-04-19 16:53       ` Frank Wittig
2005-04-19 17:54         ` Hervé Eychenne
2005-04-19 19:46           ` Frank Wittig
2005-04-20  4:15             ` Guy
2005-04-20  7:59               ` David Greaves
2005-04-20  9:26                 ` Molle Bestefich
2005-04-20  9:32                   ` Hervé Eychenne
2005-04-20 17:36                     ` Molle Bestefich
2005-04-20 11:16                   ` Peter T. Breuer
2005-04-20 12:34                     ` Lars Marowsky-Bree
2005-04-20 15:49               ` Martin K. Petersen
2005-04-21  1:21                 ` Guy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).