mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Don't allow resizing of internal logical volumes.
Prevent lvresize from being able to resize internal LVs: mirror legs (*_mimage_*), mirror log (*_mlog), snapshot placeholder LVs (snapshot*) and others. Resizing these would leads to unexpected metadata and sometimes crashes (in case of growing snapshot*).
This commit is contained in:
parent
94ff21b4f1
commit
fd817ff34a
@ -1,5 +1,6 @@
|
||||
Version 2.02.63 -
|
||||
================================
|
||||
Don't allow resizing of internal logical volumes.
|
||||
Fix libdevmapper-event pkgconfig version string to match libdevmapper.
|
||||
Avoid scanning all pvs in the system if operating on a device with mdas.
|
||||
Add configure --with-clvmd=singlenode to use clvmd w/o cluster infrastructure.
|
||||
|
@ -323,6 +323,11 @@ static int _lvresize(struct cmd_context *cmd, struct volume_group *vg,
|
||||
|
||||
lv = lvl->lv;
|
||||
|
||||
if (!lv_is_visible(lv)) {
|
||||
log_error("Can't resize internal logical volume %s", lv->name);
|
||||
return ECMD_FAILED;
|
||||
}
|
||||
|
||||
if (lv->status & LOCKED) {
|
||||
log_error("Can't resize locked LV %s", lv->name);
|
||||
return ECMD_FAILED;
|
||||
|
Loading…
Reference in New Issue
Block a user