User Tools

Site Tools



LVM2 Quick Reference

Too Much Information

When using lvm2 in an area where you might have “disks” which have additional lvm2 setups, you will sometimes get Too Much Information. For this, you can use the filter in /etc/lvm/lvm.conf. Setting this allows you to determine what is checked for lvm2 partitions. The example below Adds anything beginning with /dev/md and Removes anything else.

filter=[ "a|^/dev/md|", "r/.*/" ]

One example is a virtual server (Xen) which has Logical Volumes exported to running virtual. In some cases, those “drives” need to be set up as physical volumes for LVM2 inside the running virtual. But, typing 'vgs' or 'lvs' from the DOM0 will show all of them, which is not helpful.

Resize a Physical Volumne

If you expand a RAID set, or increase the size of an iSCSI share, you have to grow your Physical Volume (PV) in order to use the additional space. Following assumes your physical volume is /dev/md0

# look at current size
# resize the available space
pvresize /dev/mmd0
# look at size and note the increase
quickreference/lvm2.txt · Last modified: 2020/01/24 18:18 by rodolico