[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: howto know if raid is really working?




On Thu, 16 Dec 2004, Joao Clemente wrote:

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

i manually partition the new disk, because i do not trust that
the sw raid mirroring will partition the right way
 
> 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?

you cannot fdisk once /dev/mdxxx is created

you create the sw raid by:
	fdisk /dev/hda ...
	fdisk /dev/hdc ...

	( if you do NOT partition it ... i think sw raid uses
	( the whole disk as 1 giant partiton .. i always partition it 
	
	mdadd /dev/md0  /dev/hda1 /dev/hdc1 
	mdadd /dev/md1  /dev/hda2 /dev/hdc2
	...

	mke2fs -j /dev/md0
	mke2fs -j /dev/md1
	...
	
	mount /dev/md0 /
	mount /dev/md1 /home
	...

	fix /etc/mtab or wherever the equivalent file is saved

> 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}.

good

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

yes ... if you trust the system to do it for you

> Or you need do setup {hdx1, hdx2, hdx3} on the new disk, 
> before software raid resyncs the disks?

i prefer to manually fdisk the new disk so that i dont count
on the sw code to do it right or wrong
 
> Or this is not the way to do it?

trail and error ...

i've never had a problem when i fdisk it manually first
and it also tells me i can write the disk, at least partition it

>  From what I remember reading, HW RAID handles "disks", SW RAID handles 
> "partitions".

i think you can make /dev/hda1  and /dev/hdc1 as one "whole disk"

even "hw raid" will have at least one partition

if you use oracle .. they will use raw disks .. no partitions

> If you replace a disk in a HW RAID, the new disk will be 
> copied and be equal to the older ones.

not necessarily...

but than again, most people do not mix and match different sized
disks when replacing the dead one

and in sw raid .. you can have the dead 40GB disks replaced by
a 300GB disks and everythign will still work properly
	and have a spare (unused) 260GB on the new disk

> 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".

for the mirrored and used portion of the raid ..

> So what 
> happens if the disk has no partitions?

sw raid will partition the new disk for you
and format it  and merge it into the raid array  and sync
the data onto the new disk

c ya
alvin



Reply to: