====== Slackware Raid Installation ======
This will describe how to install slackware 12 onto a raid.
===== procedure =====
- boot
- pick hugesmp.s kernel or whatever
- partiton one drive (I'm using ''/dev/hda'' and ''/dev/hdc'')
- run:\\ # sfdisk -d /dev/hda |sfdisk /dev/hdc
# fdisk /dev/hdc
...
you should see the same partition table as you setup on /dev/hda.
If you do, type "w" and press enter (to write the table and exit fdisk)
- setup the raids - ''/dev/md0'' will be ''/boot'', ''/dev/md1'' will be ''swap'' (and thus striped), ''/dev/md2'' will be ''/'', and ''/dev/md3'' will be an lvm partion:\\ # mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/hd[ac]1
# mdadm --create /dev/md1 --level=0 --raid-devices=2 /dev/hd[ac]2
# mdadm --create /dev/md2 --level=1 --raid-devices=2 /dev/hd[ac]3
# mdadm --create /dev/md3 --level=1 --raid-devices=2 /dev/hd[ac]4
- setup the lvm physical volume:\\ # pvcreate /dev/md3
- setup the lvm volume group:\\ # vgcreate raid1_vg0 /dev/md3
- setup the lvm logical volumes:\\ # lvcreate -L8G -nslack_usr raid1_vg0
# lvcreate -L6G -nslack_var raid1_vg0
# lvcreate -L6G -nslack_home raid1_vg0
- initialize the lvm groups:\\ # vgchange -a y raid1_vg0
- setup the swap:\\ # mkswap /dev/md1
# swapon /dev/md1
- the slackware setup will detect the volume groups after running the ''vgchange -a y raid1_vg0'' command
- run ''setup'' - don't bother activating swap - it has already been done above
- after your setup completes, create ''mdadm.conf'' (It is not required by mdadm to work, but is useful for keeping track of arrays and member disks):\\ # mdadm --detail --scan >> /mnt/etc/mdadm.conf
- add swap mount point to /mnt/etc/fstab:
* /dev/raid0_vg0/swap swap swap defaults 0 0
- run vgscan to create /etc/lvm/backup, which is checked by the init scripts in order to enable LVM (for details see /etc/rc.d/rc.S). We have to do this in our "new" installation (located in ''/mnt''):\\ # chroot /mnt
# vgscan -v
- exit chroot
- reboot!
===== references =====
* http://pumpump.blogspot.com/2007/07/installing-slackware-12-on-linux.html
==
==
\\ \\
{{tag>:linux :linux:slackware :linux:server}}