You are not logged in.

#1 2003-01-17 17:59:01

Registered: 2002-09-14
Posts: 23

raid install

ok, yesterday aperio put the raidtools into the base, and it first came to my attention that i could compined my 2 large harddrives into one big one. (as far as linux is concerned).  and i was between linux installs for i figured i'd work a way to setup arch on raid so my root was on my 2 striped drives.  and for the record i don't have hardware raid, my 2 hds are the masters on the ide channels

the problem: no support in the setup script for installing raid right off the bat.
short answer: install a basic system in what will be swap, to chroot to, then build my raid setup, and rerun setup and install everything.
**note** you NEED a seperate partition for /boot/ something thats actualy bootable i recommend ext2 since its really stable.  and if your using lilo it has to be within the 1024 cyclinder mark, grub doesn't care(i think).

long way:
i only used a few of the step in the setup script, mainly to install packages and my kernel.  do i wasn't sitting at the command line later adding everything thro pacman.

setup your nic, load and inseret mods

then create what will be your base system. my harddrive was already setup from my last drake install were i looked over all the config files to see how a working install like this looks.  i'm not sure how big the base install for arch is, but i know a drake install with kde and openoffice and all the development pkgs runs about 1.5 gig, so i'm guessing you can probably do with about a gig partion. possibly alot less. since you really only need: bash, ncurses, snarf, raidtools, and your choice of filesystem tools.  i didn't test how little you need to do this install.  i just went with all of base minus a kernel, perl, and a few other obviously unneeded pkgs.

then you need to make directors and mount your makeshift install:
mkdir /mnt/arch
mount /dev/discs/disc1/part1 /mnt/arch (remeber its devfs, and of course use your actualy partion)

then run arch setup and do an ftp install, you must do an ftp install since the raidtools pkg is new(added to base yesterday), and is not available on your cd unless someone re-releases the iso.
then select your pkgs and when you go to do the install the setup will ask what partion you have your arch system mounted on, in this case its /mnt/arch

after that gets finished we need to copy some files before we can chroot, if you miss one you can always exit the chroot and go copy it and chroot back in. 
files needed to be copied:
/usr/bin/snarf (only needed if you didn't get the snarf pkg when you iwere installing)
/bin/dialog  <---MUST do
/etc/resolv.conf <--also a MUST
then you need to bring /arch/ with you, do it this way:
mkdir /mnt/arch/arch/
mount -o bind /arch/ /mnt/arch/arch/
mount -o bind /dev/ /mnt/arch/dev
mount -o bind /proc/ /mnt/arch/proc

now your ready to chroot over:
chroot /mnt/arch /bin/bash

ok now you need to edit /etc/raidtab
it has examples commented out in it, for raid0,1,5
i'm using raid 0, so i uncommented everythin from that section and edited to fit my computer.
**note** that it is written with /dev/hda style devides arch uses bsd style so its /dev/discs/disc#/part#
**another note** it has the initial raid device as /dev/md0 if you look in /dev/ its actualy /dev/md/0 or /dev/md/1 or what ever you decide to call it.

## compatible (old) RAID0 setup:
#raiddev /dev/md1
#    raid-level                0
#    nr-raid-disks             3
#    persistent-superblock     1
#    chunk-size                4
#    device                    /dev/sda1
#    raid-disk                 0
#    device                    /dev/sdb1
#    raid-disk                 1
#    device                    /dev/sdc1
#    raid-disk                 2

that was just the section i was interested in, the things i changed:
nr-raid-discs 3 to 2
raiddev to /dev/md/0
and edited the raid-disk setting for bsd style devices

then you need to format it, it used reiser, at this point you can most lilely use what ever your hear desires, since its a makesift install. one could use lynxs and wget and d/l tools for lets say xfs. but thats more work for an unstable buggy file system.
then issue the command to format pass the raid device so /dev/md/0 instead of formating both of them individualy.

the you need to make a dir in mount for it, and make your boot dir inside of it since you need a seperate partion to boot from.

mkdir /mnt/arch/
mkdir /mnt/arch/boot/
mkdir /mnt/arch/dev/
mkdir /mnt/arch/proc/
then yet again
mount /dev/md/0 /mnt/arch
mount /dev/discs/disc0/part1 /mnt/arch/boot (your boot partion**inside 1024 cyc for lilo)
mount -o bind /dev /mnt/arch/dev
mount -o bind /proc /mnt/arch/proc

then do /arch/setup to install all the pkgs you want for your final system
then after you finish installing pkgs, exit the setup script.
then chroot to that, and set up your config files.

**note** since you didn't use the setup script for anything more then pkg installing you'll need to manualy add your fstab file, and the rest of your config files.  remeber to use the raid device when mounting / in fstab heres mine

/dev/md/0 / reiserfs defaults 0 0
/dev/discs/disc0/part1 /boot ext2 defaults 0 1
/dev/discs/disc1/part1 swap swap defaults 0 0


and of course lilo



sorry if my instructions are garbbled and go in a million directions, but if you have any questions just ask.  oh yeah and i forgot its general a good idea to setup your partions before you start chrooting and installing.

have fun


#2 2003-01-17 18:00:37

Registered: 2002-09-14
Posts: 23

Re: raid install

oh and thers no need to edit system scripts outside of the stardard config ones.


Board footer

Powered by FluxBB