mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
lvchange: disable persistent minors for pools
There is no reason to support persistent major/minor numbers for pool volumes - it's only meant to be supported for filesystems (since i.e. nfs may need to keep volume on a persistent device node.) Support for pools is now explicitely disabled and documented.
This commit is contained in:
parent
95fbbf4f40
commit
a10a11bd54
@ -1,5 +1,6 @@
|
||||
Version 2.02.118 -
|
||||
=================================
|
||||
Disable lvchange of major and minor of pool LVs.
|
||||
Fix pvscan --cache to not scan and read ignored metadata areas on PVs.
|
||||
Add After=iscsi-shutdown.service to blk-availability.service systemd unit.
|
||||
Disallow vgconvert from changing metadata format when lvmetad is used.
|
||||
|
@ -279,6 +279,7 @@ Do not use this if dmeventd is already monitoring a device.
|
||||
.TP
|
||||
.BR \-M ", " \-\-persistent " {" \fIy | \fIn }
|
||||
Set to y to make the minor number specified persistent.
|
||||
Change of persistent numbers is not supported for pool volumes.
|
||||
.TP
|
||||
.BR \-p ", " \-\-permission " {" \fIr | \fIrw }
|
||||
Change access permission to read-only or read/write.
|
||||
|
@ -18,6 +18,10 @@ lvcreate --type cache-pool -an -v -L 2 -n cpool $vg
|
||||
lvcreate -H -L 4 -n corigin --cachepool $vg/cpool
|
||||
lvcreate -n noncache -l 1 $vg
|
||||
|
||||
# cannot change major minor for pools
|
||||
not lvchange --yes -M y --minor 235 --major 253 $vg/cpool
|
||||
not lvchange -M n $vg/cpool
|
||||
|
||||
not lvchange --cachepolicy mq $vg/noncache
|
||||
not lvchange --cachesettings foo=bar $vg/noncache
|
||||
|
||||
|
@ -54,8 +54,9 @@ lvchange -r auto $vg/$lv1
|
||||
lvchange --yes -M y --minor 234 --major 253 $vg/$lv1
|
||||
lvchange -M n $vg/$lv1
|
||||
|
||||
lvchange --yes -M y --minor 235 --major 253 $vg/pool
|
||||
lvchange -M n $vg/pool
|
||||
# cannot change major minor for pools
|
||||
not lvchange --yes -M y --minor 235 --major 253 $vg/pool
|
||||
not lvchange -M n $vg/pool
|
||||
|
||||
# addtag_ARG
|
||||
lvchange --addtag foo $vg/$lv1
|
||||
|
@ -966,6 +966,11 @@ static int _lvchange_single(struct cmd_context *cmd, struct logical_volume *lv,
|
||||
return ECMD_FAILED;
|
||||
}
|
||||
|
||||
if (arg_count(cmd, persistent_ARG) && lv_is_pool(lv)) {
|
||||
log_error("Persistent major and minor numbers are not supported with pools.");
|
||||
return ECMD_FAILED;
|
||||
}
|
||||
|
||||
/*
|
||||
* FIXME: DEFAULT_BACKGROUND_POLLING should be "unspecified".
|
||||
* If --poll is explicitly provided use it; otherwise polling
|
||||
|
Loading…
Reference in New Issue
Block a user