RE: Help on root fs using raid-0

1999-12-10 Thread Bruno Prior

> Thanks for the clear explanation. I gave it a try, but it didn't
> work. It may be because I used the 'old' raid as compiled into the
> standard 2.2.13 kernel.

That'll be exactly why. Don't use the old RAID code unless you have a good
reason to.

> I've been very confused by the various raid
> docs around - some describing 'old' and  some describing 'new' raid.

You want to go with Jakob Oestergard's HOWTO. That's the definitive guide for
new RAID code. If you get the latest raidtools and patch, you'll find it
included in the raidtools package, or else go to
http://ostenfeld.dk/~jakob/Software-RAID.HOWTO/.

> One point I'm still not clear on is regardinq swap on a raid device.
> Does this mean that you have to fdisk a raid device, create a new
> (sub) partition and tag it as swap?

You shouldn't (can't?) fdisk a RAID device. Simply create a raid device as
normal with the capacity you want for swap, run mkswap to make the device a swap
device, and then swapon to turn swap on. To make sure that the device is used
for swap every time you reboot, mark the partitions as type fd so they autostart
and put the device into /etc/fstab as swap.

Cheers,

Bruno Prior [EMAIL PROTECTED]



Re: RE: Help on root fs using raid-0

1999-12-09 Thread Jim Ford


Bruno Prior wrote on 3/12/99 9:39:

>This is a little unorthodox, 
>but try the following 

Thanks for the clear explanation. I gave it a try, but it didn't work. It may be 
because I used the 'old' raid as compiled into the standard 2.2.13 kernel. I've been 
very confused by the various raid docs around - some describing 'old' and  some 
describing 'new' raid. As I'm settinq up a new system, I've now decided to get another 
1gig disk (making 3 in total) and go for raid 5 using the latest raid patch and tools.
One point I'm still not clear on is regardinq swap on a raid device. Does this mean 
that you have to fdisk a raid device, create a new (sub) partition and tag it as swap? 
I tried this and it created a partition /dev/md0p1 which I couldn't get to work.

Regards: Jim Ford



RE: Help on root fs using raid-0

1999-12-03 Thread Bruno Prior

> I've done this on raid-1.  I assume the procedure for raid-0 will be the
> same.

Sadly, it's not that simple. The difference being that each partition on a
RAID-1 contains a complete copy of the filesystem, so files can be read off the
physical device by lilo, whereas each partition on a RAID-0 effectively contains
junk until combined with the other partitions by the RAID code. lilo cannot, and
is unlikely ever to, read the essential system files from a RAID-0 (or RAID-5)
the way that is now possible with RAID-1.

What this means is that you are going to have to keep the essential system files
off the RAID-0 array. Effectively, this means putting /boot in its own (non-RAID
or RAID-1) partition. Fortunately, you already have a 60Mb partition doing
nothing once you get root onto RAID, so you could use this as a very generous
/boot partition (another option would be to leave root on this partition and
mount the larger non-essential sections of your filesystem on RAID-0s, but we'll
stick as close as possible to the original plan for now).

This is a little unorthodox, but try the following (I am assuming you have
already got a working linux filesystem on /dev/md0, mounted on /mnt, as
described). For the purposes of this explanation I will assume that your 60Mb
installation partition is /dev/hda1, but you will need to change this to
whatever it really is.

1. Copy the files in /boot to /
2. Edit /etc/lilo.conf so that it is reading the files it needs from / rather
than /boot, e.g.

boot=/dev/hda   # Change to whatever device you are using
map=/map
install=/boot.b
prompt
timeout=50
image=/vmlinuz  # Change to whatever your image's filename is
label=linux
root=/dev/md0
read-only
image=/vmlinuz  # Change to whatever your image's filename is
label=backup
root=/dev/hda1  #Change to the partition number of your little installation
partition
read-only

3. Run lilo
4. Edit /mnt/etc/lilo.conf:

boot=/dev/hda   # Change to whatever device you are using
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
image=/boot/vmlinuz # Change to whatever your image's filename is
label=linux
root=/dev/md0
read-only

5. Edit /mnt/etc/fstab so that /dev/md0 is shown as / and /dev/hda1 (or whatever
you 60Mb partition is) is shown as /boot.
6. Reboot. As long as you have raid support built into your kernel or included
in your initrd, the system should boot up with /dev/md0 on root and /dev/hda1 on
/boot.
7. Try running lilo again. It will be using the lilo.conf that we edited second
this time (as that now appears at /etc/lilo.conf). If this works, you will be
able to continue using this system, in which case you can lose all the
unnecessary files in /boot. So:
8. Delete all the sub-directories (the old system filesystem) under /boot, so
that only the /boot files remain.

Cheers,


Bruno Prior [EMAIL PROTECTED]

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of David Cunningham
> Sent: 03 December 1999 02:26
> To: Jim Ford; linux-raid
> Subject: Re: Help on root fs using raid-0
>
>
> I've done this on raid-1.  I assume the procedure for raid-0 will be the
> same.  Here is how I do it.  I'm not guaranteeing this is the best way:
>
> First I'll make some assumptions.  First you would like to boot to your root
> md0 filesystem.  Second, you have a kernel that is new enough to support
> booting on raid and the raid-0 personality is compiled into the Kernel.
> Third, your copy of lilo is new enough to support booting to md devices.
> And 4th, you're using IDE drives.
>
> 1.  Using fdisk make the partition id's of all raid partitions (on both
> disks) "fd".  Use the "t" option in fdisk to do this.
> 2.  Edit /etc/lilo.conf so that root=/dev/md0 and boot points to a valid
> boot drive.  (/dev/hda in my case.)
> 3.  Drop to your command prompt and run lilo.  (Ex.  Type "lilo" followed by
> enter at the prompt.)
> 4.  Reboot.
>
> Be sure to have a boot disk handy.  If this fails for any reason you'll need
> it to boot your computer.  Additions or comments on this nano-procedure are
> welcome.
>
> Good Luck.
>
> - Original Message -
> From: Jim Ford
> To: linux-raid
> Sent: Thursday, December 02, 1999 10:59 AM
> Subject: Help on root fs using raid-0
>
>
> I'm stuck!
>
> I've got two 1gig disks that I want to concatenate together using raid-0 and
> mount as / with Slackware 7 installed.
> I've created a minimal installation on a 60meg partition and used this to
> create a full installation on a raid-0 partition - /dev/md0, which I can
> mount and umount on /mnt to my heart's content (but which isn't much use
> there)!
> For 64,000 dollars - how can I mount /dev/md0 as /  ?
> I've read the docs, but find them quite opaque. Surely there's an simple
> way!
>
> Regards: Jim Ford
>
>
>



Re: Help on root fs using raid-0

1999-12-02 Thread David Cunningham

I've done this on raid-1.  I assume the procedure for raid-0 will be the
same.  Here is how I do it.  I'm not guaranteeing this is the best way:

First I'll make some assumptions.  First you would like to boot to your root
md0 filesystem.  Second, you have a kernel that is new enough to support
booting on raid and the raid-0 personality is compiled into the Kernel.
Third, your copy of lilo is new enough to support booting to md devices.
And 4th, you're using IDE drives.

1.  Using fdisk make the partition id's of all raid partitions (on both
disks) "fd".  Use the "t" option in fdisk to do this.
2.  Edit /etc/lilo.conf so that root=/dev/md0 and boot points to a valid
boot drive.  (/dev/hda in my case.)
3.  Drop to your command prompt and run lilo.  (Ex.  Type "lilo" followed by
enter at the prompt.)
4.  Reboot.

Be sure to have a boot disk handy.  If this fails for any reason you'll need
it to boot your computer.  Additions or comments on this nano-procedure are
welcome.

Good Luck.

- Original Message -
From: Jim Ford
To: linux-raid
Sent: Thursday, December 02, 1999 10:59 AM
Subject: Help on root fs using raid-0


I'm stuck!

I've got two 1gig disks that I want to concatenate together using raid-0 and
mount as / with Slackware 7 installed.
I've created a minimal installation on a 60meg partition and used this to
create a full installation on a raid-0 partition - /dev/md0, which I can
mount and umount on /mnt to my heart's content (but which isn't much use
there)!
For 64,000 dollars - how can I mount /dev/md0 as /  ?
I've read the docs, but find them quite opaque. Surely there's an simple
way!

Regards: Jim Ford



Help on root fs using raid-0

1999-12-02 Thread Jim Ford



I'm stuck!
I've got two 1gig disks that I want to concatenate 
together using raid-0 and mount as / with Slackware 7 installed.I've created 
a minimal installation on a 60meg partition and used this to create a full 
installation on a raid-0 partition - /dev/md0, which I can mount and umount on 
/mnt to my heart's content (but which isn't much use there)!For 64,000 
dollars - how can I mount /dev/md0 as /  ?I've read the docs, but find 
them quite opaque. Surely there's an simple way!
 
Regards: Jim Ford