diff options
author | Jonathan Earl Brassow <jbrassow@redhat.com> | 2011-02-04 20:30:17 +0000 |
---|---|---|
committer | Jonathan Earl Brassow <jbrassow@redhat.com> | 2011-02-04 20:30:17 +0000 |
commit | 27ff8813da360da17c974f47e6e376fefddfd2f5 (patch) | |
tree | 5ca4fe5bcd77a54a2caa1be6f78fbd734bdf2b1c /tools/vgchange.c | |
parent | 880507498a16603b9bf874d60433f88ab6d7d0b8 (diff) | |
download | lvm2-27ff8813da360da17c974f47e6e376fefddfd2f5.tar.gz lvm2-27ff8813da360da17c974f47e6e376fefddfd2f5.tar.xz lvm2-27ff8813da360da17c974f47e6e376fefddfd2f5.zip |
Allow snapshots in a cluster as long as they are exclusively
activated.
In order to achieve this, we need to be able to query whether
the origin is active exclusively (a condition of being able to
add an exclusive snapshot).
Once we are able to query the exclusive activation of an LV, we
can safely create/activate the snapshot.
A change to 'hold_lock' was also made so that a request to aquire
a WRITE lock did not replace an EX lock, which is already a form
of write lock.
Diffstat (limited to 'tools/vgchange.c')
-rw-r--r-- | tools/vgchange.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/vgchange.c b/tools/vgchange.c index f2d399c4..4266d633 100644 --- a/tools/vgchange.c +++ b/tools/vgchange.c @@ -115,6 +115,16 @@ static int _activate_lvs_in_vg(struct cmd_context *cmd, ((lv->status & PVMOVE) )) continue; + /* + * If the LV is active exclusive remotely, + * then ignore it here + */ + if (lv_is_active_exclusive_remotely(lv)) { + log_verbose("%s/%s is exclusively active on" + " a remote node", vg->name, lv->name); + continue; + } + expected_count++; if (activate == CHANGE_AN) { |