Slackware Raid Installation

This will describe how to install slackware 12 onto a raid.


  1. boot
  2. pick hugesmp.s kernel or whatever
  3. partiton one drive (I'm using /dev/hda and /dev/hdc)
  4. 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)
  5. 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
  6. setup the lvm physical volume:
    # pvcreate /dev/md3
  7. setup the lvm volume group:
    # vgcreate raid1_vg0 /dev/md3
  8. setup the lvm logical volumes:
    # lvcreate -L8G -nslack_usr raid1_vg0
    # lvcreate -L6G -nslack_var raid1_vg0
    # lvcreate -L6G -nslack_home raid1_vg0
  9. initialize the lvm groups:
    # vgchange -a y raid1_vg0
  10. setup the swap:
    # mkswap /dev/md1
    # swapon /dev/md1
  11. the slackware setup will detect the volume groups after running the vgchange -a y raid1_vg0 command
  12. run setup - don't bother activating swap - it has already been done above
  13. 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
  14. add swap mount point to /mnt/etc/fstab:
    • /dev/raid0_vg0/swap swap swap defaults 0 0
  15. 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
  16. exit chroot
  17. reboot!


linux/slackware/raid_install.txt · Last modified: 2008/04/03 04:17 by john
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki