diff options
author | Jose Castillo <jcastillo@redhat.com> | 2014-08-01 11:05:23 +0200 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2014-08-04 17:48:29 +0100 |
commit | 29f388bf5bf0153b7d5e00ae0e0d6b48c27176e2 (patch) | |
tree | 3fc8dcde87978c49d9a90112962bd10c418337a6 | |
parent | d80b7721293be9052cdc330d032755cba2689676 (diff) | |
download | sos-29f388bf5bf0153b7d5e00ae0e0d6b48c27176e2.tar.gz |
[lvm2] Extend reporting fields for pvs, vgs and lvs.
There were some useful columns missing from the output of the commands 'pvs', 'vgs' and 'lvs'
that we gather in the lvm plugin. This patch extends the reporting fields with:
- Information about metadata, like copies and size of mda, to the output of the 'pvs'
command.
- Information about metadata and tags for the output of the 'vgs' command, and
- information about tags for the output of 'lvs'.
Attempts to solve at least partially issue #331.
Signed-off-by: Jose Castillo <jcastillo@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
(Minor pep8 fixups.)
-rw-r--r-- | sos/plugins/lvm2.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sos/plugins/lvm2.py b/sos/plugins/lvm2.py index 60f4bbc7..ab6f0a7a 100644 --- a/sos/plugins/lvm2.py +++ b/sos/plugins/lvm2.py @@ -52,12 +52,17 @@ class Lvm2(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): "vgdisplay -vv %s" % lvm_opts, root_symlink="vgdisplay" ) + + pvs_cols = 'pv_mda_free,pv_mda_size,pv_mda_count,pv_mda_used_count' + vgs_cols = 'vg_mda_count,vg_mda_free,vg_mda_size,vg_mda_used_count' + vgs_cols = vgs_cols + ',' + 'vg_tags' + lvs_cols = 'lv_tags,devices' self.add_cmd_outputs([ "vgscan -vvv %s" % lvm_opts, "pvscan -v %s" % lvm_opts, - "pvs -a -v %s" % lvm_opts, - "vgs -v %s" % lvm_opts, - "lvs -a -o +devices %s" % lvm_opts + "pvs -a -v -o +%s %s" % (pvs_cols, lvm_opts), + "vgs -v -o +%s %s" % (vgs_cols, lvm_opts), + "lvs -a -o +%s %s" % (lvs_cols, lvm_opts) ]) self.add_copy_spec("/etc/lvm") |