mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Prevent permission changes on active mirrors.
This commit is contained in:
parent
e0096cabef
commit
fb12fd445a
@ -1,7 +1,8 @@
|
|||||||
Version 2.02.18 -
|
Version 2.02.18 -
|
||||||
====================================
|
====================================
|
||||||
Print warning instead of error message if cannot zero volume
|
Prevent permission changes on active mirrors.
|
||||||
Update lvconvert man page (snapshot option)
|
Print warning instead of error message if lvconvert cannot zero volume.
|
||||||
|
Add snapshot options to lvconvert man page.
|
||||||
dumpconfig accepts a list of configuration variables to display.
|
dumpconfig accepts a list of configuration variables to display.
|
||||||
Change dumpconfig to use --file to redirect output to a file.
|
Change dumpconfig to use --file to redirect output to a file.
|
||||||
Avoid vgreduce error when mirror code removes the log LV.
|
Avoid vgreduce error when mirror code removes the log LV.
|
||||||
|
@ -58,7 +58,7 @@ Power of 2 chunk size for the snapshot logical volume between 4k and 512k.
|
|||||||
.TP
|
.TP
|
||||||
.I \-Z, \-\-zero y/n
|
.I \-Z, \-\-zero y/n
|
||||||
Controls zeroing of the first KB of data in the snapshot.
|
Controls zeroing of the first KB of data in the snapshot.
|
||||||
If the volume is read only snapshot will not be zeroed.
|
If the volume is read-only the snapshot will not be zeroed.
|
||||||
.br
|
.br
|
||||||
.SH Examples
|
.SH Examples
|
||||||
"lvconvert -m1 vg00/lvol1"
|
"lvconvert -m1 vg00/lvol1"
|
||||||
|
@ -19,6 +19,7 @@ static int lvchange_permission(struct cmd_context *cmd,
|
|||||||
struct logical_volume *lv)
|
struct logical_volume *lv)
|
||||||
{
|
{
|
||||||
uint32_t lv_access;
|
uint32_t lv_access;
|
||||||
|
struct lvinfo info;
|
||||||
|
|
||||||
lv_access = arg_uint_value(cmd, permission_ARG, 0);
|
lv_access = arg_uint_value(cmd, permission_ARG, 0);
|
||||||
|
|
||||||
@ -34,6 +35,13 @@ static int lvchange_permission(struct cmd_context *cmd,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((lv->status & MIRRORED) && (lv->vg->status & CLUSTERED) &&
|
||||||
|
lv_info(cmd, lv, &info, 0) && info.exists) {
|
||||||
|
log_error("Cannot change permissions of mirror \"%s\" "
|
||||||
|
"while active.", lv->name);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (lv_access & LVM_WRITE) {
|
if (lv_access & LVM_WRITE) {
|
||||||
lv->status |= LVM_WRITE;
|
lv->status |= LVM_WRITE;
|
||||||
log_verbose("Setting logical volume \"%s\" read/write",
|
log_verbose("Setting logical volume \"%s\" read/write",
|
||||||
|
Loading…
Reference in New Issue
Block a user