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

Re: RAID in Debian

Hi Magnus, 

On Mon, Apr 14, 2003 at 07:50:02PM +0200, Magnus Wiklander wrote:
> Anyone knows how to make a Debian system with software RAID1?
> I what to raid both / and swap with RAID1, i also what to boot direktly to /dev/md0
> Is it possible in Debian?
> And if how do i do it? Can it be done directly at installation time?

I don't think this is the right forum for this question but anyway...

AFAIK the old boot-floppies did not support installing to a raid volume.
The new installer does have some support I think but I don't currently 
follow development since I am already stuffed with my own packages. 

The way to do it with Debian 3.0 aka woody is quite simple actually. Let
me explain how I lately installed my new system (after having a disk
crash and losing all my data).

Setup: 3x80GB IDE drives, /dev/hda, /dev/hde, /dev/hdg, all connected as
master. The old on board bios does not support large disks so on board
ide is not activated and the off board ide controller is used to boot
from /dev/hde.

Install: I partitioned the disks as follows to prepare for raid1:

hda: 512MB primary swap, nothing else so far
hde: 512MB primary raid autodetect (0xfd), 500MB primary ext3
hdg: 512MB primary raid autodetect

Now I installed Debian into /dev/hde2 (the base system that is). Booting
that system is no big deal. Then I installed the raidtools2 pkg into that
system and created /dev/md0 by way of this entry in /etc/raidtab:

	raiddev /dev/md0
		raid-level              1
		nr-raid-disks           2
		persistent-superblock   1

		device                  /dev/hde1
		raid-disk               0
		device                  /dev/hdg1
		raid-disk               1

Now mkraid /dev/md0 sufficed to create the raid1 disk. mkfs -t ext3 on it, mount
it to /mnt and use tar -C / -clf - .|tar -C /mnt -xvf - to move over the whole system.
Use install-mbr to install a master boot record on hde and hdg and setup lilo to
install the boot block in /dev/md0. 

Of course I forgot one thing: Because I have quite an old system I created a custom 
kernel before installation that has raid built in. This may way be the most 
complicated stuff of it all...

But perhaps this is still of some use for you. Feel free to ask, but I have to admit
that I am quite low on time as always ;)



Attachment: pgpStdRUoyXru.pgp
Description: PGP signature

Reply to: