lvmdump command can be used to generate lvm2 information dumps for the diagnostic purposes by a support team. lvmdump is a tool to dump various information concerning LVM2. By default, it creates a tarball suitable for submission along with a problem report.
The content of the tarball is as follows:
- dmsetup info
- table of currently running processes
- recent entries from /var/log/messages (containing system messages)
- complete lvm configuration and cache (content of /etc/lvm)
- list of device nodes present under /dev
- list of files present /sys/block
- list of files present /sys/devices/virtual/block
- if enabled with -m, metadata dump will be also included
- if enabled with -a, debug output of vgscan, pvscan and list of all available volume groups, physical volumes and logical volumes will be included
- if enabled with -l, lvmetad state if running
- if enabled with -p, lvmpolld state if running
- if enabled with -s, system info and context
- if enabled with -u, udev info and context
lvmdump command examples
1. To create lvm dump:
# lvmdump Creating dump directory: /root/lvmdump-myhost.in-201042 Gathering LVM & device-mapper version info... Gathering dmsetup info... Gathering process info... Gathering console messages... Gathering /etc/lvm info... Gathering /dev listing... Gathering /sys/block listing... Creating report tarball in /root/lvmdump-myhost.in-2082042.tgz...
2. For advance data collections:
# lvmdump -a Gathering LVM volume info... vgscan... pvscan... lvs... pvs... vgs... Gathering LVM & device-mapper version info... Gathering dmsetup info... Gathering process info... Gathering console messages... Gathering /etc/lvm info... Gathering /dev listing... Gathering /sys/block listing... Creating report tarball in /root/lvmdump-myhost.in-2018129.tgz...
3. To gather LVM metadata:
# lvmdump -m Creating dump directory: /root/lvmdump-myhost.in-2018055 Gathering LVM & device-mapper version info... Gathering dmsetup info... Gathering process info... Gathering console messages... Gathering /etc/lvm info... Gathering /dev listing... Gathering /sys/block listing... Gathering LVM metadata from Physical Volumes... /dev/sdc /dev/sdd /dev/sde Creating report tarball in /root/lvmdump-myhost.in-20180255.tgz...
4. To gather cluster data:
# lvmdump -c
5. To get help:
# lvmdump -h