mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
lvmlockd: always disallow mirror splitting
lv_raid_split() was correctly prevented in a shared VG, but lv_raid_split_and_track() was missing that check.
This commit is contained in:
parent
09c792c206
commit
3071837e21
@ -1,5 +1,6 @@
|
||||
Version 2.02.174 -
|
||||
=================================
|
||||
Prevent raid1 split with trackchanges in a shared VG.
|
||||
Avoid double unlocking of client & lockspace mutexes in lvmlockd.
|
||||
Fix leaking of file descriptor for non-blocking filebased locking.
|
||||
Fix check for 2nd mda at end of disk fits if using pvcreate --restorefile.
|
||||
|
@ -3426,6 +3426,12 @@ int lv_raid_split_and_track(struct logical_volume *lv,
|
||||
int s;
|
||||
struct lv_segment *seg = first_seg(lv);
|
||||
|
||||
if (is_lockd_type(lv->vg->lock_type)) {
|
||||
log_error("Splitting raid image is not allowed with lock_type %s.",
|
||||
lv->vg->lock_type);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!seg_is_mirrored(seg)) {
|
||||
log_error("Unable to split images from non-mirrored RAID.");
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user