aoeu.ca

Blogging to half-marathon success!
aoeu.ca » Page 'PCI -> SATA -> RAID1 -> LVM -> ext3'

PCI -> SATA -> RAID1 -> LVM -> ext3

Getting this wonderful setup took quite a bit of troubleshooting, so I thought I’d share my instructions. Note that my root partition is not on this disk (it’s on another SCSI (hardware) RAID array (/dev/sda).

  • Update all BIOS/firmware (my BIOS didn’t deal with the PCI SATA card until the BIOS was upgraded).
  • Create single large partitions on each of my two SATA disks (fdisk). Set the type to 0xfd (Linux RAID autodetect).
  • Add the modules for my SATA/RAID PCI card to /etc/modules. Also add sd_mod, md_mod, my SATA module (sata_sil), and raid1.
  • apt-get install mdadm lvm2
  • Alter /etc/mdadm.conf:
    DEVICE /dev/sdb1 /dev/sdc1
    ARRAY /dev/md0 devices=/dev/sdb1,/dev/sdc1
  • Create the RAID array with mdadm
    mdadm –create /dev/md0 –level raid1 –raid-devices=2 –spare-devices=0 –auto=yes /dev/sdb1 /dev/sdc1
  • Reboot and `cat /proc/mdstat` to make sure the drives are active and sync’ing.
  • Create the physical volume.
    pvcreate /dev/md0
  • Create the volume group.
    vgcreate MYVGNAME /dev/md0
  • Create the logical volume
    lvcreate -L120G -n mylvname MYVGNAME
  • Make my filesystem
    mke2fs -j /dev/MYVGNAME/mylvname
  • Mount my new filesystem
    mount -t ext3 /dev/MYVGNAME/mylvname /mnt

PHEW!

Posted in geek

Comments are closed.

Top of page | Subscribe to new Entries (RSS) | Subscribe to Comments (RSS)