From f94c7dc1f3deb93f8efd3a02084ad17bad069280 Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Fri, 15 Sep 2017 13:25:46 +0200 Subject: Use vgexport / vgimport instead of vgchange -a ... --- cmount.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'cmount.py') diff --git a/cmount.py b/cmount.py index 9e25bda..e2dc8bf 100755 --- a/cmount.py +++ b/cmount.py @@ -32,11 +32,10 @@ def main(): device, mapper_name]) time.sleep(3) - cstm_error = 'lvchange error' - subprocess.check_call(['/sbin/vgchange', - '-a', - 'y', + cstm_error = 'vgimport error' + subprocess.check_call(['/sbin/vgimport', data['device'].split('/')[2]]) + cstm_error = 'lvchange error' subprocess.check_call(['/sbin/lvchange', '-a', 'y', -- cgit v1.3