Below commands can be used be used for getting information on logical volumes and volume groups on Linux hosts.
lvdisplay
lvdisplay
This command displays all the logical volumes with all the details like LV Path, Volume & Group name, size etc. Below is sample output.
--- Logical volume ---
LV Path /dev/VolGroup00/LogVol01
LV Name LogVol01
VG Name VolGroup00
LV UUID MwEadG-LSm3-Abl1-Poxp-M9or-z6O3-wvt1eY
LV Write Access read/write
LV Creation host, time localhost.localdomain, 2014-02-20 07:21:52 -0500
LV Status available
# open 2
LV Size 512.00 MiB
Current LE 128
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:0
lvs -o +devices
lvs -o +devices
This command lists all the logical devices corresponding to logical volume. Below is sample output.
LV VG Attr LSize Pool Origin Data% Move Log Cpy%Sync Convert Devices
LogVol00 VolGroup00 -wi-ao---- 7.00g /dev/xvda2(128)
LogVol01 VolGroup00 -wi-ao---- 512.00m /dev/xvda2(0)
lsblk
lsblk
This command gives the device name dm-* to which the logical volumes are mapped. Below are sample outputs.
[root@host ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 10G 0 disk
├─xvda1 202:1 0 250M 0 part /boot
└─xvda2 202:2 0 9.8G 0 part
├─VolGroup00-LogVol01 (dm-0) 252:0 0 512M 0 lvm [SWAP]
└─VolGroup00-LogVol00 (dm-1) 252:1 0 7G 0 lvm /
xvdb 202:16 0 32G 0 disk
[root@tboyella-ol6-logical-volume ~]#
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 10G 0 disk
├─xvda1 202:1 0 250M 0 part /boot
└─xvda2 202:2 0 9.8G 0 part
├─VolGroup00-LogVol01 (dm-0) 252:0 0 512M 0 lvm [SWAP]
└─VolGroup00-LogVol00 (dm-1) 252:1 0 7G 0 lvm /
xvdb 202:16 0 32G 0 disk
[root@tboyella-ol6-logical-volume ~]#
Products to which Article Applies
All Linux Operating Systems
Additional Reference
https://www.systutorials.com/docs/linux/man/8-lvs/
tarun boyella
No comments:
Post a Comment