summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimeon Simeonov2017-09-15 13:25:46 +0200
committerSimeon Simeonov2017-09-15 13:25:46 +0200
commitf94c7dc1f3deb93f8efd3a02084ad17bad069280 (patch)
tree6294e6d39fc07fe3a76a782609b4011e805051f9
parent8ef2a7f12227a6d3365ac77040d14becba6ddd83 (diff)
Use vgexport / vgimport instead of vgchange -a ...
-rwxr-xr-xcmount.py7
-rwxr-xr-xcumount.py5
2 files changed, 5 insertions, 7 deletions
diff --git a/cmount.py b/cmount.py
index 9e25bda..e2dc8bf 100755
--- a/cmount.py
+++ b/cmount.py
@@ -32,11 +32,10 @@ def main():
32 device, 32 device,
33 mapper_name]) 33 mapper_name])
34 time.sleep(3) 34 time.sleep(3)
35 cstm_error = 'lvchange error' 35 cstm_error = 'vgimport error'
36 subprocess.check_call(['/sbin/vgchange', 36 subprocess.check_call(['/sbin/vgimport',
37 '-a',
38 'y',
39 data['device'].split('/')[2]]) 37 data['device'].split('/')[2]])
38 cstm_error = 'lvchange error'
40 subprocess.check_call(['/sbin/lvchange', 39 subprocess.check_call(['/sbin/lvchange',
41 '-a', 40 '-a',
42 'y', 41 'y',
diff --git a/cumount.py b/cumount.py
index e74bc00..565c3fb 100755
--- a/cumount.py
+++ b/cumount.py
@@ -32,9 +32,8 @@ def main():
32 '-a', 32 '-a',
33 'n', 33 'n',
34 data['device']]) 34 data['device']])
35 subprocess.check_call(['/sbin/vgchange', 35 cstm_error = 'vgexport error'
36 '-a', 36 subprocess.check_call(['/sbin/vgexport',
37 'n',
38 data['device'].split('/')[2]]) 37 data['device'].split('/')[2]])
39 cstm_error = 'pv_sources error' 38 cstm_error = 'pv_sources error'
40 for mapper_name in data['pv_sources'].values(): 39 for mapper_name in data['pv_sources'].values():