1
0
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:
Mike Snitzer 2010-03-20 03:44:04 +00:00
parent 94ff21b4f1
commit fd817ff34a
2 changed files with 6 additions and 0 deletions

View File

@ -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.

View File

@ -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;