Skip to content
This repository was archived by the owner on Jan 15, 2021. It is now read-only.

do not check thinprovisioned volumes #4

Closed
wants to merge 2 commits into from

Conversation

evgeni
Copy link

@evgeni evgeni commented Aug 25, 2015

Hi,

while playing with check-lvm-snapshots on my laptop, I noticed that it would also look at the thin volumes I have. For those, reporting 100% is just fine (it just means they are not so thin anymore).

To fix that, I changed the code to check only volumes that have the "snapshot" role and to look at the "snap_percent" column, not the "data_percent" one.

Enjoy!

evgeni added 2 commits August 25, 2015 10:13
otherwise we would also match thin-provisioned volumes

example lvs output:
% sudo lvs
  LV                     VG     Attr       LSize  Pool       Origin Data%  Meta%  Move Log Cpy%Sync Convert
  home                   fedora -wi-ao---- 20.00g
  root                   fedora owi-aos--- 20.00g
  root-snap              fedora swi-a-s---  1.00g            root   0.35
  swap                   fedora -wi-ao----  5.81g
  vm-osp7compute-root    fedora Vwi-a-tz-- 10.00g vmthinpool        0.00
  vm-osp7controller-root fedora Vwi-a-tz-- 10.00g vmthinpool        100.00
  vm-osp7dir-root        fedora Vwi-a-tz-- 10.00g vmthinpool        100.00
  vm-rhel66-root         fedora Vwi-a-tz-- 10.00g vmthinpool        9.30
  vm-rhel71-root         fedora Vwi-a-tz-- 10.00g vmthinpool        9.58
  vm-rhevh35-root        fedora Vwi-a-tz-- 10.00g vmthinpool        8.27
  vm-rhevm35-root        fedora Vwi-a-tz-- 10.00g vmthinpool        54.21
  vm-sat61-pulp          fedora Vwi-aotz-- 40.00g vmthinpool        67.43
  vm-sat61-root          fedora Vwi-aotz-- 15.00g vmthinpool        50.99
  vm-sat61-swap          fedora Vwi-aotz--  4.00g vmthinpool        9.21
  vmthinpool             fedora twi-aotz-- 70.00g                   90.17  78.80
that makes parsing the output easier and stable for future changes
@roman-vynar
Copy link
Contributor

Closing this as duplicate with #5

@roman-vynar roman-vynar closed this Jan 6, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants