From 4ca207c829dc196b5f09fc695e1de4085b1114fe Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Mon, 29 Apr 2013 21:06:38 -0700 Subject: [PATCH] Track if snapshot is active --- lvm/lvm-lib.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lvm/lvm-lib.pl b/lvm/lvm-lib.pl index a510069b1..bf7743427 100755 --- a/lvm/lvm-lib.pl +++ b/lvm/lvm-lib.pl @@ -331,6 +331,12 @@ else { if (/destination\s+for\s+\/dev\/[^\/]+\/(\S+)/) { $lv->{'snap_of'} = $1; } + if (/active\s+destination/i) { + $lv->{'snap_active'} = 1; + } + elsif (/INACTIVE\s+destination/i) { + $lv->{'snap_active'} = 0; + } } elsif (/Read ahead sectors\s+(\d+|auto)/) { $lv->{'readahead'} = $1;