Friday, March 16, 2012

Studying for the Linux+ cert, and wanted to write down notes on LVM's. It helps for me to see examples of how each command is used, and I wanted a 1 place to go look for info.


pvcreate /dev/sda6 /dev/sda7 Creates Physical volumes on /sda6 and /sda7.

pvscan Will scan for physical volumes on the hard drives.

pvdisplay Displays more in depth info of the physical volumes

vgcreate vol_grp1 /dev/sda6 /dev/sda7 Creates Volume Groups from partitions sda 6 and 7.

-s changes the standard size of 4mb chunks to another size of your choosing

lvcreate -L 500G -n logical_vol1 vol_grp1 Creates a 500GB logical volume from the Volume group you created earlier

lvdisplay Displays the Logical Volume Info.


lvextend -L12G /dev/vol_grp1/logical_vol1 Extends the Logical drive 12GB's

other commands.

lvchange lvdisplay lvmchange lvmdump lvreduce lvresize
lvconvert lvextend lvmconf lvmsadc lvremove lvs
lvcreate lvm lvmdiskscan lvmsar lvrename lvscan