Department of Electrical and Computer Engineering Facebook page


  • DEPARTMENT
    • Overview
    • Computing
    • Facilities
    • Organizations
    • Educational Objectives
    • Student Outcomes
    • Scholarship Awards
    • Employment
    • Advisory Committee
    • Contact
  • ACADEMICS
    • Undergraduate
      • Computer Eng.
      • Electrical Eng.
      • Ambassadors
    • Graduate
      • Information for Prospective Students
      • ECE Graduate Handbook
      • Graduate Forms
      • Ph.D. Qualifying Exam
      • Distance Education
      • Frequently Asked Questions (FAQ)
    • Courses
    • Student Survival kit
    • Distance Learning
  • PEOPLE
    • Faculty
    • Staff
  • PROSPECTIVE STUDENTS
    • Overview
    • FAQ
    • Considering ECE
    • Scholarships
    • PC Requirements
    • Office of Admissions
  • RESEARCH
    • Overview
    • Signal Processing & Communications
    • Digital Systems & Microelectronics
    • Power & High Voltage
    • Research Centers
      • Emerging Materials Research Laboratory
      • High Voltage Laboratory
      • Robotics
    • HPCC
  • ALUMNI
RAID and LVM - Ece
Personal tools
  • Log in
Views
  • Page
  • Discussion
  • View source
  • History

RAID and LVM

From Ece

Jump to: navigation, search

Incomplete - all the parts are here, but it is incoherent

In this example, we will take a PC with one drive, add another drive, create a RAID 1 array between the drives and use LVM for the mounts that we can. We will then migrate the data from the original drive to the RAID array.

  • Install the second drive in the PC.
  • Run fdisk and set the partitions for the second drive. In this example we will create two partitions. The first partition will hold /boot (~100MB) and the second partition will encompass the rest of the drive. An LVM, which contains the swap and root volumes, will be created on the second partition. Make sure to toggle each partition type to "Linux raid auto" (fd). We separate the /boot partition from the rest of the LVMs to make it easier for Linux to boot. Some can't boot for LVMs.
  • Create a RAID 1 array on the first and second partitions.
    mdadm -C /dev/md0 --level=1 --raid-devices=2 missing /dev/hdb1 --auto=yes
    mdadm -C /dev/md1 --level=1 --raid-devices=2 missing /dev/hdb2 --auto=yes
  • Now we create the LVM (physical volume and volume group) on the second RAID partition.
    pvcreate /dev/md1
    vgcreate VolGroup01 /dev/md1
  • After the LVM volume group is created, we create a logical volume for swap (2GB) and root (120GB).
    lvcreate -L2000 -nswap VolGroup01
    lvcreate -L120000 -nroot VolGroup01
  • Make a swap partition.
    mkswap /dev/VolGroup01/swap
  • Create a filesystem on the root volume. We chose to use ext3.
    mkfs.ext3 /dev/VolGroup01/root
    mkfs.ext3 /dev/md0

setup grub edit fstab

mkinitrd --preload raid1 /boot/initrd-`uname -r`.img `uname -r`

mount both /dev/md0 and /dev/VolGroup01/root

find / -mount -depth -print | cpio -pdmv /PATH_TO_ROOT_MOUNT
find /boot -mount -depth -print | cpio -pdmv /PATH_TO_BOOT_MOUNT

chroot to LVM root volume and run grub-install

reboot

mdadm /dev/md0 --add /dev/hda1
mdadm /dev/md1 --add /dev/hda2
Retrieved from "http://www.ece.msstate.edu/wiki/index.php/RAID_and_LVM"
Category: Admin:Recipes
Navigation
  • Main Page
  • Community portal
  • Current events
  • Recent changes
  • Random page
  • Help
SEARCH
TOOLBOX
LANGUAGES
 
Toolbox
  • What links here
  • Related changes
  • Upload file
  • Special pages
  • Printable version
  • Permanent link
Powered by MediaWiki
  • This page was last modified on 4 December 2007, at 20:11.
  • This page has been accessed 1,201 times.
  • Privacy policy
  • About Ece
  • Disclaimers

Mississippi State University Home| PO Box 9571, Mississippi State, MS 39762 | Main Office: 1.662.325.3912

Bagley College of Engineering | Mississippi State University| Legal| Webmaster| Intranet

Page modified: Tue, 23 Sep 2008 15:18:39 CDT