These are archived pages, most of them date back to 2007-2012. This content might not be relevant or accurate anymore.

LVM configuration

The terminology of LVM:

  • physical volumes – physical disks and disk partitions to be used by LVM

  • volume groups – virtual disk composed of physical volumes

  • logical volumes – virtual partitions which we use and could be easily managed

Prepare the partitions and disks:

pvcreate /dev/hda4
pvcreate /dev/hdb

Create volume group of name mygroup-vol:

vgcreate mygroup-vol /dev/hda4 /dev/hdb

You should be able to see your new volume group in the vgscan output:

# vgscan

  Reading all physical volumes.  This may take a while...
  Found volume group "mygroup-vol" using metadata type lvm2

Now you can create actual partitions with lvcreate, view them with lvdisplay and manage them with these and other LVM tools (their names start with lv prefix). Logical volumes can be accesed as regular devices in /dev/mygroup-vol/.

lvcreate -n test --size 1g mygroup-vol

More information in lvm(8) manpage.

 
 
 
disorder's homepage