Skip to content

Commit

Permalink
[vdo] Capture more information about vdo volumes
Browse files Browse the repository at this point in the history
Capture more information about vdo volumes

Related: VDO-5797

Signed-off-by: Jose Castillo <[email protected]>
  • Loading branch information
jcastill committed Aug 8, 2024
1 parent d3a2169 commit c99b9b9
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion sos/report/plugins/vdo.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@ def setup(self):
vdos = self.collect_cmd_output('vdo list --all')
for vdo in vdos['output'].splitlines():
self.add_cmd_output(f"vdo status -n {vdo}")
self.add_cmd_output('vdostats --human-readable')
self.add_cmd_output([
'vdostats --human-readable',
'vdostats --verbose'
])
vdo_cols = ('vdo_deduplication,vdo_index_state')
lvs_opts = ('--no-headings -a -o +')
lvm_vdos = self.collect_cmd_output(f"lvs {lvs_opts}{vdo_cols}")
for vdo in lvm_vdos['output'].splitlines():
# we can find the pool and pool data maps in the output
# of lvs, in the column Volume type, marked as either 'd' or 'D'
if vdo.split()[2].startswith("D"):
vdo_path = f"{vdo.split()[1]}-{vdo.split()[0].strip('[]')}"
self.add_cmd_output(f"vdodumpconfig /dev/mapper/{vdo_path}")

# vim set et ts=4 sw=4 :

0 comments on commit c99b9b9

Please sign in to comment.