Linux 101 : Creating logical volumes - Physical volumes, Volume groups, Logical volumes -
- to grow a storage space
- to have a storage space that can spam multiple disks
- to combine several disks to offer a bigger space.
- to have Snapshots to help with the back up and recovery of data.
LVM is an aggregate of disks that are combined into a single pool of storage.
We start by turning our physical drives - sda, sdb and sdc - into entities called physical volumes - PVs - as we can see below:
We then aggregate these PVs into a volume group - VG - named volume0 :
The size of vg1 is the sum of the sizes of all the above disks.
We will then have will device file /dev/vg1/lv1 with 200 MB of space.
Then we create a filesystem on our new "partition" so we could use it, after creating a mountpoint - /storage_space - and mounting it on it:
Remark:
The /dev/vg1/lv1 file is a symbolic link to the /dev/mapper/vg1_lv1
file.
file.
Comments