Personal tools
You are here: Home Service EVMS Notes
Document Actions

EVMS Notes

Notes on converting to EVMS on Gentoo Linux

Goals

  • data assurance (RAID-1 mirroring)
  • flexibility (resizing without reformatting)

Main resources

My configuration

  • Shuttle XPC SK41G with AMD Athlon
  • Gentoo Linux 2.6.14-r2
  • Two internal hard drives, 250GB and 160GB, respectively

Desired partitions

/dev/evms/boot
64MB, RAID-1
/dev/evms/swap
2GB, RAID-0
/dev/evms/root
80GB, RAID-1
/dev/evms/home
230GB, Linear-RAID (backed up externally and remotely), consisting of the remaining space on both disks

Required steps

Emerge the following packages:

  emerge evms

Then compile the kernel using genkernel. Be sure to compile MD and RAID support into the kernel:

  genkernel --no-clean --menuconfig --gensplash=livecd-2005.1 --evms2 --bootloader=grub --install all
  Device Drivers > Multi-device support (RAID and LVM)
    [*] Multiple devices driver support (RAID and LVM)
    <*> RAID
    <*>   Linear
    <*>   RAID-0
    <*>   RAID-1
    <*>   RAID-4/5
    ...
    <*> Device mapper support 

Finally, rebuild any affected modules:

  module-rebuild rebuild

Notes

I had to set up the above-mentioned partitions incrementally so I could copy the existing data back and forth. I used the evmsgui for setting up the partitions.

  1. Convert /etc/fstab to EVMS based on existing partitions
  2. Create segments on new 250GB disk
  3. On the new disk, create Linear-RAID region with LVM2 container for /dev/evms/home (we will add the remaining segment on the old disk to this region later)
  4. Copy everything on the old disk to /dev/evms/home
  5. Reboot using /dev/evms/home as root in grub.conf
  6. Create fresh segments on old 160GB disk
  7. Set up the remaining three regions
  8. Populate /dev/evms/boot and /dev/evms/root
  9. Adjust /etc/fstab
  10. Reboot using /dev/evms/root as root in grub.conf
  11. Add the remaining segment on the old disk to the Linear-RAID region