Search This Blog

Sunday, July 31, 2011

Create and remove physical volumes, assign physical volumes to volume groups, create and delete logical volumes

Create and remove physical volumes
Suppose there is partition named /dev/sdb which is of type lvm
To create pv
#pvcreate /dev/sdb
To remove pv
#pvremove /dev/sdb

Assign physical volumes to volume groups
#vgcreate -s size vgname /dev/sdb

Create and delete logical volumes
#lvcreate -L size -n lvname vgname
#lvremove /dev/vgname/lvname