1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Prevent mirror renames.

This commit is contained in:
Alasdair Kergon 2006-08-18 21:19:54 +00:00
parent 6711231a13
commit d68336a52f
2 changed files with 9 additions and 0 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.10 - Version 2.02.10 -
================================== ==================================
Prevent mirror renames.
Move CMDLIB code into separate file and record whether static build. Move CMDLIB code into separate file and record whether static build.
Version 2.02.09 - 17th August 2006 Version 2.02.09 - 17th August 2006

View File

@ -140,6 +140,14 @@ int lvrename(struct cmd_context *cmd, int argc, char **argv)
goto error; goto error;
} }
if ((lv->status & MIRRORED) ||
(lv->status & MIRROR_LOG) ||
(lv->status & MIRROR_IMAGE)) {
log_error("Mirrored LV, \"%s\" cannot be renamed: %s",
lv->name, strerror(ENOSYS));
goto error;
}
if (!archive(lv->vg)) { if (!archive(lv->vg)) {
stack; stack;
goto error; goto error;