summaryrefslogtreecommitdiffstats
path: root/tools/pvchange.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/pvchange.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/pvchange.c')
-rw-r--r--tools/pvchange.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/pvchange.c b/tools/pvchange.c
index 7056ddd2..a4c0aa45 100644
--- a/tools/pvchange.c
+++ b/tools/pvchange.c
@@ -67,6 +67,12 @@ static int _pvchange_single(struct cmd_context *cmd, struct physical_volume *pv,
return 0;
}
+ if ((vg->status & CLUSTERED) && !locking_is_clustered() &&
+ !lockingfailed()) {
+ log_error("Skipping clustered volume group %s", vg->name);
+ return 0;
+ }
+
if (vg->status & EXPORTED_VG) {
unlock_vg(cmd, pv->vg_name);
log_error("Volume group \"%s\" is exported", vg->name);