1819792 Members
3030 Online
109607 Solutions
New Discussion юеВ

LVM commands

 
SOLVED
Go to solution
TJ Toedebusch
Occasional Advisor

LVM commands

Looking for the Linux LVM command that will show me what disk(s) we have under LVM control.

For example, another team builds our servers and we get them when they go into production. So there is a mirrored local pair of disks under LVM but I don't know which disk that is...

Surely there is a lvm command to list the disk names currently under lvm control.

Thanks,
6 REPLIES 6
Bryan Eley
Trusted Contributor
Solution

Re: LVM commands

Hi TJ,

Would pvscan provide the info you need?

Bryan
Bryan Eley
Trusted Contributor

Re: LVM commands

Hm, perhaps the command 'pvdisplay'

#lvm
lvm> pvdisplaylvm> pvdisplay

Example (though I only have one drive here):
--- Physical volume ---
PV Name /dev/hda2
VG Name VolGroup00
PV Size 12.53 GB / not usable 0
Allocatable yes
PE Size (KByte) 32768
Total PE 401
Free PE 1
Allocated PE 400
PV UUID A4Byu5-96m4-x0Je-0dEZ-5Egs-Ox1j-z5jImV

Bryan
Stanislav Bocinec
Regular Advisor

Re: LVM commands

Hi TJ,
try to look in /etc/lvmtab or use 'vgdisplay' command. Maybe this link will help u.
http://www.sfvlug.org/Talks/LVM/cheat_sheet.txt
s.
Bryan Eley
Trusted Contributor

Re: LVM commands

Sorry, I somehow double-pasted. The command should be:

#lvm
lvm> pvdisplay
Ivan Ferreira
Honored Contributor

Re: LVM commands

In linux, normally, mirror is not done through LVM, but using md devices. The pvdisplay will list the disks/partitions with lvm, vgdisplay -v will list the volume groups and they physical disk correspondence.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
TJ Toedebusch
Occasional Advisor

Re: LVM commands

pvscan got it...

Thanks for all the suggestions.