Logical Volume Management (LVM)
- The Below illustration shows the relationships between disks, physical volumes (PVs), volume Groups (VGs) and Logical volumes in LVM:
- Volume management is a approach dealing with disks & partitions. The new approach to deal with this partitions is called as Logical Volume Management (LVM)
- Benefits of using LVM
- Greater flexibility for disk partitioning
- Easier online resizing of volumes
- Use of Snapshots
- Terms:
- Physical Volume(PV): This represents physical disk.
- Volume Group (VG): VGs are used to house one or more physical volumes & logical volumes into single administrative unit.
- Logical Volume (LV): LVs are equivalent to disk partitions. LV appears as standard block device. LV can be mounted on to directories
- Extents: Two kinds of extents physical extents & logical extents. PVs can be divided into physical extents. LVs can be divided into logical extents
Examining Disk Layout
- Open the parted prompt & execute print statement
- Physical volumes can be explored using pvdisplay & volume groups can be explored using vgdisplay & Logical volumes using lvdisplay
- Lets experiment
- scan disks
- Lets create a physical volume using pvcreate
- Now lets create volume groups using vgcreate
- Now lets create a Logical volume using lvcreate
- Now create a file system in two lvs and mount it asper your needs
- scan disks