summaryrefslogtreecommitdiffstats
path: root/tools/vgremove.c
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2002-01-29 17:23:33 +0000
committerAlasdair Kergon <agk@redhat.com>2002-01-29 17:23:33 +0000
commitf53c6aa66ef8b5c75a4e43e6cf518f0ec9cd5cfe (patch)
treed8d7170bb389a01a14e0f2c49e4f339fd1d5c63e /tools/vgremove.c
parent14936c751efc3f3d5d692e5c7c7ff7ac5b0694e0 (diff)
downloadlvm2-f53c6aa66ef8b5c75a4e43e6cf518f0ec9cd5cfe.tar.gz
lvm2-f53c6aa66ef8b5c75a4e43e6cf518f0ec9cd5cfe.tar.xz
lvm2-f53c6aa66ef8b5c75a4e43e6cf518f0ec9cd5cfe.zip
o Basic support for exporting (but importing not completed yet).
o When volume group does not have write flag set, prevent changes to it. o Preparation for partial activation (not completed yet).
Diffstat (limited to 'tools/vgremove.c')
-rw-r--r--tools/vgremove.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/vgremove.c b/tools/vgremove.c
index b7350495..13dcf0ce 100644
--- a/tools/vgremove.c
+++ b/tools/vgremove.c
@@ -40,6 +40,16 @@ static int vgremove_single(const char *vg_name)
return ECMD_FAILED;
}
+ if (vg->status & EXPORTED_VG) {
+ log_error("Volume group %s is exported", vg->name);
+ return ECMD_FAILED;
+ }
+
+ if (vg->status & PARTIAL_VG) {
+ log_error("Cannot remove partial volume group %s", vg->name);
+ return ECMD_FAILED;
+ }
+
if (vg->lv_count) {
log_error("Volume group %s still contains %d logical volume(s)",
vg_name, vg->lv_count);