summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimeon Simeonov2017-09-14 19:56:17 +0200
committerSimeon Simeonov2017-09-14 19:56:17 +0200
commit8ef2a7f12227a6d3365ac77040d14becba6ddd83 (patch)
treeaf60de68891b844c908f20dc9c57286f7eebe6ca
parent7a754f722de1e44865573335b990658b3ff004cc (diff)
Enable / disable VG as well
-rwxr-xr-xcmount.py6
-rwxr-xr-xcumount.py4
2 files changed, 10 insertions, 0 deletions
diff --git a/cmount.py b/cmount.py
index f980dc9..9e25bda 100755
--- a/cmount.py
+++ b/cmount.py
@@ -5,6 +5,7 @@ import json
5import os 5import os
6import subprocess 6import subprocess
7import sys 7import sys
8import time
8 9
9 10
10def main(): 11def main():
@@ -30,7 +31,12 @@ def main():
30 'luksOpen', 31 'luksOpen',
31 device, 32 device,
32 mapper_name]) 33 mapper_name])
34 time.sleep(3)
33 cstm_error = 'lvchange error' 35 cstm_error = 'lvchange error'
36 subprocess.check_call(['/sbin/vgchange',
37 '-a',
38 'y',
39 data['device'].split('/')[2]])
34 subprocess.check_call(['/sbin/lvchange', 40 subprocess.check_call(['/sbin/lvchange',
35 '-a', 41 '-a',
36 'y', 42 'y',
diff --git a/cumount.py b/cumount.py
index e2fb32f..e74bc00 100755
--- a/cumount.py
+++ b/cumount.py
@@ -32,6 +32,10 @@ def main():
32 '-a', 32 '-a',
33 'n', 33 'n',
34 data['device']]) 34 data['device']])
35 subprocess.check_call(['/sbin/vgchange',
36 '-a',
37 'n',
38 data['device'].split('/')[2]])
35 cstm_error = 'pv_sources error' 39 cstm_error = 'pv_sources error'
36 for mapper_name in data['pv_sources'].values(): 40 for mapper_name in data['pv_sources'].values():
37 subprocess.check_call(['/sbin/cryptsetup', 41 subprocess.check_call(['/sbin/cryptsetup',