Thanks for the reply, but I still haven't cleared my doubt.I'll cut the relevant part of the reply (relevant for what I'm trying to understand) and comment at the end:
Alvin Oga wrote:
On Thu, 16 Dec 2004, Joao Clemente wrote:Image you're using software raid and 1 disk fails. You somehow get alerted and , AFAIK, you1 - shutdown the machine (ok, this if you don't have a hot-swap system) 2 - remove the failed disk 3 - insert a new, "fresh-from-the-store" diskfor sanity ... i always fdisk the new disk to be the same as the remaining disk4 - power-upand sw raid will mirror the good disk onto the new disk
[snip]
Now, if this was a hardware raid solution, yes I believe the array will self-contruct again.sw raid, when PROPERLY created will also resysnc/self-construct again all by itselfMy question is if, with these steps you'll have a software RAID system resync'ing the array... or you need to do extra steps like:no extra step is supposed to be needed except to take the old disk out and plug in a new one
[snip]
5 - partition the disk with same partition layout as the removed oneprobably a good idea ... to keep it the same as before even if your enw disk is bigger than before - use the xtra (unused) space for something else
Ok, Alvin, as far as I understand when you said at the top "for sanity ... i always fdisk the new disk to be the same as the remaining disk" you mean limiting it's size, as you say here at last few lines, right?
My doubt is: If you DONT do this (and, following my steps, you CANT fdisk unless you power the machine first :-) what will happen then? Supose you have your disks with 3 partitions each, {hd?1, hd?2, hda?3} from wich you have your 3 software raid partitions {md0, md1, md2}. One disk fails. You put a new one. New as "out-of-the-shop", no partitions, no filesystem. What happens? Will the partitions be generated? Or you need do setup {hdx1, hdx2, hdx3} on the new disk, before software raid resyncs the disks?
Or this is not the way to do it?From what I remember reading, HW RAID handles "disks", SW RAID handles "partitions". If you replace a disk in a HW RAID, the new disk will be copied and be equal to the older ones. Mapping this to SW RAID makes the sentence like this: "If you replace a PARTITION in a SW RAID, the new PARTITION will be copied and be equal to the older ones". So what happens if the disk has no partitions?
Thanks Joao Clemente