[Gllug] RAID 1 and RAID 5

Mike Brodbelt mike at coruscant.demon.co.uk
Thu Dec 5 00:02:44 UTC 2002


On Wed, 2002-12-04 at 16:26, Xander D Harkness wrote:
> David Irvine wrote:

> > At present you have raid 1.
> I did not know whether the kernel did a different format on the raid 
> devices for raid 1 and raid 5.
> 
> While I realise that I will have no more than raid 1 with two devices.
> 
> I think that I have already started on the degraded raid 5 array.  I 
> have a conflicting raid 5 / raid 1 set up.
> 
> The raidtab states raid 5 but only has two disks.  Does the kernel set 
> it up for degraded raid 5 or does it set it up for raid 1 and ignore the 
> raid level in the raidtab file?

The kernel will set up whatever level you tell it to, but it will not
assume the presence of failed disks, so a config that specifies raid 5
on two disks is invalid. You must have three disks in the config file,
though you only need two physical devices - the config file can have the
third specified as a failed disk.
 
> If the raid 1 and 5 devices are not different I should be able to add 
> another disk to the current setup.

The kernel writes information specific to the personality when you run
mkraid, so you can't convert. You can do as the previous poster
suggested - break your mirror, add a new disk, set up a degraded raid5
array, copy the system across, and destroy the broken mirror, and add
the physical device back into the raid5 array with raidhotadd.

Note that the contents of raidtab are pretty much ignored by everything
except mkraid - the details are written to the raid superblock, so after
the md device is created, raidtab becomes irrelevant. 

Also remember not to make the entire disk raid5 - you need somewhere to
put the kernel, and lilo doesn't understand raid5 yet....

Mike.


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list