mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Don't allow a node to remove an LV that's exclusively active on anther node.
This commit is contained in:
parent
9766c3c960
commit
77fcc2076a
@ -1,5 +1,6 @@
|
||||
Version 2.02.13 -
|
||||
===================================
|
||||
Don't allow a node to remove an LV that's exclusively active on anther node.
|
||||
Cope if same PV is included more than once in cmdline PE range list.
|
||||
Set PV size to current device size if it is found to be zero.
|
||||
Add segment parameter to target_present functions.
|
||||
|
@ -75,6 +75,16 @@ static int lvremove_single(struct cmd_context *cmd, struct logical_volume *lv,
|
||||
if (!archive(vg))
|
||||
return ECMD_FAILED;
|
||||
|
||||
/* If the VG is clustered then make sure no-one else is using the LV
|
||||
we are about to remove */
|
||||
if (vg->status & CLUSTERED) {
|
||||
if (!activate_lv_excl(cmd, lv)) {
|
||||
log_error("Can't get exclusive access to volume \"%s\"",
|
||||
lv->name);
|
||||
return ECMD_FAILED;
|
||||
}
|
||||
}
|
||||
|
||||
/* FIXME Snapshot commit out of sequence if it fails after here? */
|
||||
if (!deactivate_lv(cmd, lv)) {
|
||||
log_error("Unable to deactivate logical volume \"%s\"",
|
||||
|
Loading…
Reference in New Issue
Block a user