Working with LVM

Preate Physical Volume

# pvcreate /dev/sda2

Create Volume Group

# vgcreate vg0 /dev/sda2
# vgscan

Create Logical Volume

# lvcreate -n lv0 --size 32g vg0

Make File System

# mkfs.ext3 /dev/vg0/lv0

Create Logical Volume

# mkdir /vz 
# mount /dev/vg0/lv0 /vz

Check Block Device ID:

# blkid /dev/vg0/lv0

Auto mount for fstab:

/etc/fstab:
...
# For Older Systems
/dev/vg0/lv0    /vz             ext3    noatime              0       1

# For Newer Systems
UUID=b534913-580f-461c-844f-546d8cde4556 /vz	ext3 defaults 0 0
...

Resources

  1. A simple introduction to working with LVM
  2. LFCS: How to Manage and Create LVM Using vgcreate, lvcreate and lvextend Commands – Part 11
CheetSheet: LVM
Tagged on:     

Leave a Reply

Your email address will not be published. Required fields are marked *