Skip to content

Logical volumes on LInux

January 17, 2014

There are some commands that are used to create and manipulate logical volumes.

  • fdisk -c /dev/cciss/c0d1 #partition raw disk
  • parted /dev/sdb #for >= 2TB logical drives
    • mklabel gpt
    • mkpart primary 4096 6000GB
    • toggle 1 lvm
    • quit
  • mkfs /dev/sdb #format to Volume manager disk
    • Select 8e “Linux LVM”
  • pvcreate /dev/sdb /dev/sdc #create a physical volume
  • vgcreate groupname /dev/sdb #give it a group name, add as many PV’s as you need.
  • lvcreate –name lv_name -L size groupname #size is like 200M or 3G, etc.

Other useful commands

  • lvscan #brief listing
  • vgscan
  • lvdisplay #detailed listing
  • vgdisplay
  • lvextend
  • lvreduce
  • lvremove, vgremove, pvremove

You can see some more information here:


From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: