This will describe how to install slackware 12 onto a raid.
/dev/hda
and /dev/hdc
)# 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)
/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
# pvcreate /dev/md3
# vgcreate raid1_vg0 /dev/md3
# lvcreate -L8G -nslack_usr raid1_vg0 # lvcreate -L6G -nslack_var raid1_vg0 # lvcreate -L6G -nslack_home raid1_vg0
# vgchange -a y raid1_vg0
# mkswap /dev/md1 # swapon /dev/md1
vgchange -a y raid1_vg0
commandsetup
- don't bother activating swap - it has already been done abovemdadm.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
/dev/raid0_vg0/swap swap swap defaults 0 0
/mnt
):# chroot /mnt # vgscan -v