summaryrefslogtreecommitdiffstats
path: root/tools/lvremove.c
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2005-06-03 14:49:51 +0000
committerAlasdair Kergon <agk@redhat.com>2005-06-03 14:49:51 +0000
commit8211a13ce0180979257689175d2fe2d700389c1e (patch)
tree98681540e30645c3bf91186c8e50d18d5c369c8b /tools/lvremove.c
parent60f13f01d2af1cb1b05c20b11285c7c6c15acd6b (diff)
downloadlvm2-8211a13ce0180979257689175d2fe2d700389c1e.tar.gz
lvm2-8211a13ce0180979257689175d2fe2d700389c1e.tar.xz
lvm2-8211a13ce0180979257689175d2fe2d700389c1e.zip
Always insert an intermediate layer for mirrors.
Suppress hidden LVs from reports unless --all is given. Use square brackets for hidden LVs in reports. Centralise restrictions on LV names.
Diffstat (limited to 'tools/lvremove.c')
-rw-r--r--tools/lvremove.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/lvremove.c b/tools/lvremove.c
index e5069a1f..18cac809 100644
--- a/tools/lvremove.c
+++ b/tools/lvremove.c
@@ -34,6 +34,12 @@ static int lvremove_single(struct cmd_context *cmd, struct logical_volume *lv,
return ECMD_FAILED;
}
+ if (lv->status & MIRROR_IMAGE) {
+ log_error("Can't remove logical volume %s used by a mirror",
+ lv->name);
+ return ECMD_FAILED;
+ }
+
if (lv->status & MIRROR_LOG) {
log_error("Can't remove logical volume %s used as mirror log",
lv->name);