Difference between revisions of "LVM"

From braindump
Jump to navigation Jump to search
(Created page with "Notes on LVM # PV commands => working on physical disk # VG commands => virtual groups # LV commands => logical volumes Test environment DISK_DIR=/var/tmp/disks mkdir -p ${DI...")
 
Line 11: Line 11:
dd if=/dev/zero of=${DISK_DIR}/disk${i} bs=100M count=1 &&
dd if=/dev/zero of=${DISK_DIR}/disk${i} bs=100M count=1 &&
losetup /dev/loop${i} ${DISK_DIR}/disk${i} &&
losetup /dev/loop${i} ${DISK_DIR}/disk${i} &&
pvcreate ${DISK_DIR}/disk${i} &&
pvcreate /dev/loop${i}
done
done

Revision as of 02:59, 11 February 2011

Notes on LVM

  1. PV commands => working on physical disk
  2. VG commands => virtual groups
  3. LV commands => logical volumes

Test environment

DISK_DIR=/var/tmp/disks
mkdir -p ${DISK_DIR} &&
for i in 1 2 3 4 5; do
    dd if=/dev/zero of=${DISK_DIR}/disk${i} bs=100M count=1 &&
    losetup /dev/loop${i} ${DISK_DIR}/disk${i} &&
    pvcreate /dev/loop${i}
done