summaryrefslogtreecommitdiffstats
path: root/tools/vgrename.c
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2006-09-02 01:18:17 +0000
committerAlasdair Kergon <agk@redhat.com>2006-09-02 01:18:17 +0000
commitdc4d7417f743ea0766aa9b200aa861ef003400bb (patch)
tree0379970e84f2089f5ed9d4649b9333d9c611675e /tools/vgrename.c
parenta45da5f6768e36535340982e1185e9ab234d9d7a (diff)
downloadlvm2-dc4d7417f743ea0766aa9b200aa861ef003400bb.tar.gz
lvm2-dc4d7417f743ea0766aa9b200aa861ef003400bb.tar.xz
lvm2-dc4d7417f743ea0766aa9b200aa861ef003400bb.zip
When using local file locking, skip clustered VGs.
Add fallback_to_clustered_locking and fallback_to_local_locking parameters.
Diffstat (limited to 'tools/vgrename.c')
-rw-r--r--tools/vgrename.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/vgrename.c b/tools/vgrename.c
index 95eec951..7a724a59 100644
--- a/tools/vgrename.c
+++ b/tools/vgrename.c
@@ -102,6 +102,13 @@ int vgrename(struct cmd_context *cmd, int argc, char **argv)
return ECMD_FAILED;
}
+ if ((vg_old->status & CLUSTERED) && !locking_is_clustered() &&
+ !lockingfailed()) {
+ log_error("Skipping clustered volume group %s", vg_old->name);
+ unlock_vg(cmd, vg_name_old);
+ return ECMD_FAILED;
+ }
+
if (vg_old->status & EXPORTED_VG)
log_info("Volume group \"%s\" is exported", vg_old->name);