Professional Documents
Culture Documents
3
3
The lsblk command will show a tree-like structure of all storage devices and their partitions,
including any LVM Logical Volumes. The LVM Logical Volumes will be listed under the
mapper directory.
ruby
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 40G 0 disk
├─sda1 8:1 0 20G 0 part /
└─sda2 8:2 0 20G 0 part
└─ubuntu--vg-ubuntu--lv
251:0 0 39G 0 lvm /mnt
In this example, /dev/sda2 is a partition that contains the LVM Logical Volume ubuntu--vg-
ubuntu--lv.
Alternatively, you can use the fdisk -l command to list all available storage devices and their
partitions. The output will show the partition name and the type, which will be LVM for Logical
Volumes.
python
$ sudo fdisk -l
Disk /dev/sda: 40 GiB, 42949672960 bytes, 83886080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x2949f74c
In this example, the partition /dev/sda2 is an LVM partition, indicated by the Id Type of 8e
Linux LVM.