From 8ef2a7f12227a6d3365ac77040d14becba6ddd83 Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Thu, 14 Sep 2017 19:56:17 +0200 Subject: Enable / disable VG as well --- cmount.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cmount.py') diff --git a/cmount.py b/cmount.py index f980dc9..9e25bda 100755 --- a/cmount.py +++ b/cmount.py @@ -5,6 +5,7 @@ import json import os import subprocess import sys +import time def main(): @@ -30,7 +31,12 @@ def main(): 'luksOpen', device, mapper_name]) + time.sleep(3) cstm_error = 'lvchange error' + subprocess.check_call(['/sbin/vgchange', + '-a', + 'y', + data['device'].split('/')[2]]) subprocess.check_call(['/sbin/lvchange', '-a', 'y', -- cgit v1.3