master - lvmdump: also collect output from lsblk command when running lvmdump -s
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=cfdc87b62331875c2f10cca2c41f486d40b2a67c Commit: cfdc87b62331875c2f10cca2c41f486d40b2a67c Parent: 86f92714574487cce6a9de785ba2ff93b23a98f7 Author: Peter Rajnoha <[email protected]> AuthorDate: Thu Jun 9 13:51:09 2016 +0200 Committer: Peter Rajnoha <[email protected]> CommitterDate: Thu Jun 9 13:54:15 2016 +0200
lvmdump: also collect output from lsblk command when running lvmdump -s
lsblk provides nice and quick overview of the storage/sysfs structure that is useful for debugging - collect its output when running lvmdump -s.
--- WHATS_NEW | 1 + man/lvmdump.8.in | 9 +++++---- scripts/lvmdump.sh | 11 ++++++++++- 3 files changed, 16 insertions(+), 5 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.156 - ================================ + If available, also collect output from lsblk command when running lvmdump -s. Fix regression in blkdeactivate causing dm and md devices to be skipped. (2.02.155) Version 2.02.155 - 3rd June 2016
man/lvmdump.8.in +5 -4
@@ -85,10 +85,11 @@ history for all yet uncollected results of polling operations already finished including reason. .TP .B \-s -Gather system info and context. Currently, this encompasses systemd info -and context only: overall state of systemd units present in the system, -more detailed status of units controlling LVM functionality and the content -of systemd journal for current boot. +Gather system info and context. Currently, this encompasses info gathered +by calling lsblk command and various systemd info and context: overall state +of systemd units present in the system, more detailed status of units +controlling LVM functionality and the content of systemd journal for +current boot. .TP .B \-u Gather udev info and context: /etc/udev/udev.conf file, udev daemon version
scripts/lvmdump.sh +10 -1
@@ -252,13 +252,22 @@ if (( $sysreport )); then SYSTEMCTL=$(which systemctl 2>> $log) JOURNALCTL=$(which journalctl 2>> $log) + LSBLK=$(which lsblk 2>> $log) + + log "$MKDIR -p \"$sysreport_dir\"" + + if test -z "LSBLK"; then + myecho "WARNING: lsblk not found" + else + log "$LSBLK -O >> \"$sysreport_dir/lsblk\"" + log "$LSBLK -s >> \"$sysreport_dir/lsblk_s\"" + fi if test -z "$SYSTEMCTL"; then myecho "WARNING: systemctl not found" elif test -z "$JOURNALCTL"; then myecho "WARNING: journalctl not found" else - log "$MKDIR -p \"$sysreport_dir\"" log "$JOURNALCTL -b --no-pager -o short-precise > \"$sysreport_dir/journal_content\" 2>> \"$log\"" log "$SYSTEMCTL status -l --no-pager -n $log_lines -o short-precise dm-event.socket dm-event.service \ lvm2-monitor.service \