[linux-lvm] Snapshot behavior on classic LVM vs ThinLVM

Xen list at xenhideout.nl
Sat Apr 15 23:35:16 UTC 2017


Xen schreef op 15-04-2017 10:27:

> http://www.xenhideout.nl/scripts/snapshot-check.sh.txt

My script now does thin pool reporting, at least for the data volume 
that I could check (tpool).

:p.

It can create messages such as this :p.



Thin is currently at 80%.

Log messages:

Apr 16 00:00:12 perfection lvm[463]: Thin linux-thin-tpool is now 80% 
full.
Apr 15 18:10:42 perfection lvm[463]: Thin linux-thin-tpool is now 95% 
full.
Apr 15 18:10:22 perfection lvm[463]: Thin linux-thin-tpool is now 92% 
full.

Previous messages:

Apr 15 14:38:12 perfection lvm[463]: Thin linux-thin-tpool is now 85% 
full.
Apr 15 14:37:12 perfection lvm[463]: Thin linux-thin-tpool is now 80% 
full.


The cursor of journalctl was at the 85% mark; that is why an earlier 
invocation would have shown the last 2 messages, while in this sense in 
this invocation the above three would be displayed and found.

(I copied an older cursor file over the cursor location).

So it shows all new messages when there is something new to be shown and 
it uses the occasion to also remind you of older messages.

Still working on something better...

But this is already quite nice.

Basically it sends 3 types of emails:

- snapshot filling up
- snapshot filled up completely
- thin pool filling up

But it only responds to dmevent messages in syslog. Of course you could 
take the opportunity to give much more detailed information which is 
what I am working on but this does require invocations of lvs etc.




More information about the linux-lvm mailing list