IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
See Linux source Documentation/admin-guide/blockdev/zram.rst .
zram devices offer a good performance and efficient resource utilization
through the use of compression.
Signed-off-by: David Disseldorp <ddiss@suse.de>
If lvresize is given a size > the maximum COW size for a given origin
the command will fail with an internal error and no error message:
# lvresize --size 1.6g fedora/snaptest-snap
Rounding size to boundary between physical extents: <1.59 GiB.
Reached maximum COW size <1.01 GiB (258 extents).
Command failed with status code 5.
With -vvv:
Found snapshot target v1.16.0.
Getting target version for snapshot-origin
dm versions [ opencount flush ] [2048] (*1)
Found snapshot-origin target v1.9.0.
Reached maximum COW size <1.01 GiB (258 extents). <<<
Unlock: Memlock counters: prioritized:0 locked:0 critical:0 daemon:0 suspended:0
Syncing device names
Unlocking /run/lock/lvm/V_fedora
_undo_flock /run/lock/lvm/V_fedora
Freeing VG fedora at 0x55781b142890.
Freeing VG fedora at 0x55781b136860.
global/notify_dbus not found in config: defaulting to 1
Destroy lvmcache content
Completed: lvresize -vvv --debug --size 1706243072b fedora/snaptest-snap
Internal error: Failed command did not use log_error
This happens because in this case _lvresize_adjust_extents() returns
early without setting lp->resize to either LV_EXTEND or LV_REDUCE after
capping lp->extents to the maximum COW size.
Fix this by just capping lp->extents and relying on the existing code in
_lvresize_adjust_extents() to fixup lp->resize in the case that
lp->extents == existing_logical_extents. This is consistent with the
no-op case where -l is given as the existing size:
root@localhost:~/src/git/lvm2# LD_LIBRARY_PATH="$PWD/tools" ./tools/lvm lvresize -L 1.6g fedora/snaptest-snap
Rounding size to boundary between physical extents: 1.60 GiB.
Reached maximum COW size <1.01 GiB (258 extents).
New size (258 extents) matches existing size (258 extents).
No size change.
Initialization of union is somewhat tricky as it initialize only
the first member + padding, but in our case this does not clear
the whole size of union so explicitly set \0 after 2 'struct id'
and make sure DM uuid is not using random characters from stack.
Also add explicit .id designators (c99).
After detecting that a VG has wrongly claimed a PV, unpair
the pv->dev setting. This will cause the usual "missing PV"
message to appear for that VG. Make this message, and some
others, clearer by using the VGID rather than the VG name
when there are multiple VGs with the same name.
_vg_read() calls lvmcache_update_vg_from_read() which detects
that the VG metadata is incorrectly claiming the PV. Flag this
condition in the PV status as WRONG_VG. Later, vg_read() can
simply check the WRONG_VG flag rather than repeating the same
PV/VG checks that were already done in lvmcache_update_vg_from_read.
Outdated VG metadata that appears when an old device is attached
to the system can result in PVs appearing to belong to the
old/wrong VG, and commands are allowed to use (corrupt) the PVs.
- vgcreate old /dev/sda /dev/sdb /dev/sdc
- offline /dev/sda
- vgreduce --removemissing old
- vgremove old
- vgcreate new /dev/sdb /dev/sdc
- online /dev/sda
When sda is reattached, sdb and sdc will appear to be
in VG old again. An attempt to correct the problem,
e.g. with vgremove old or vgreduce old, would modify
sdb and sdc, removing them from the new VG.
To fix this, check that sdb and sdc contain metadata for
VG old before allowing VG old to claim ownership of them.
With the fix, sdb and sdc are not displayed as part of
VG old, and commands to change VG old will fail as long
as it references incorrect PVs.
To fix VG old (sda), remove the incorrect PVs from VG old
while limiting the command to see only the correct PVs:
vgreduce --removemissing --devices /dev/sda old
If an inactive LV is being cached in writeback mode, then
removing the cache does a temporary activation to flush
the cache back to the main LV. However, it forgot to
deactivate the LV again, so the temporary activation
was left in place.
Previous commit 874a8ab4d0 missed 'IGNORE' mode.
Fix it by adding rather 'explicit' test for this value,
so the code is better readable.
Also unlock memory earlier and drop unneeded <backtrace>
from return since we already logged error in this function.
The simple common case of locking the LV to remove with a
persistent lock would usually be fine, but there are a number
of special cases that were not addressed:
- no locking was done for removing cow snapshot
- direct locking to vdo pool
- dm-cache uncache using lvremove was not handled
Use the same lockd_lvcreate_lock() for all cases in which
creating a new LV first requires locking another associated
LV, e.g. locking the pool or origin for the new LV.
In most cases header should be self-compilable, so the
do not expect other 'header' files to be used upfront
so the header would be compilable.
No functional change.
These internal header were using misleading variable names
in function prototypes, but correct names were used in
function definition. Noticed with:
clang-tidy --checks=readability-inconsistent-declaration-parameter-name
No functional change.
After reorganizing elements in `possible_takeover_reshape_type`
(in commit 5b92ce741f),
it became apparent that the code relied on struct overlap,
which is somewhat unsafe. This commit removes it and ensures
proper `const` qualification for the struct usage.
vgreduce --removemissing --force replaces a partial image
with an error target. When that image includes an integrity
layer, that layer needs to first be removed.
Fix logging of VDO configuration info message which has acutally
printed " and," using next element..
Increase the array element size so it can store >=5 bytes
for " and" + \0.
Similar to the pvmove update, enhance error path handling
for scenarios where legs or logs remain open and cannot be
closed during the splitting of a mirror image.
Remove the now obsolete _delete_lv() function,
as it will no longer be needed.