Linux 101 : LVM (Linux volume Manager) Overview.
Physical volumes : sit on top of disk partitions, they are the lowest level of the LVM volumes.
Volumes groups : combine the physical volumes into a big storage pool.
Logical volume : a volume group can be divided into logical volumes, they are like disk partition that we can easily expand or shrink.
Logical volume : a volume group can be divided into logical volumes, they are like disk partition that we can easily expand or shrink.
Creating partitions:
We use fdisk to create a partition /dev/sdb1:
We create a physical volume from the "/dev/sda", "/dev/sdb1" and "/dev/sdc" partition using:
We can check if the physical volumes was created using:
For a more summary description of the physical volumes on the system, we could use the command "pvs".
Remark:
Because we are using the whole disks for "sda" and "sdc", we don't need to partition them first using fdisk as we did we "sdb" to create the /dev/sdb1 partition.
Creating a volume group:
We check that the volume group "vg_name" was created using:
Creating a logical volume:
Creates a two gigabytes logical volume inside the volume group "vg_name".
Mounting the filesystem:
To be able to use the logical volume "lv_name" we need to mount it on a mountpoint, for example "/mnt".
Comments