| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
The recent fix 05c2b10c5d0a9 ensures that raid LV images are not
using the same devices. This was happening in the lvextend commands
used by this test, so fix the test to use more devices to ensue
redundancy.
|
| |
|
|
|
|
|
|
|
|
| |
In case of e.g. 3 PVs, creating or extending a RaidLV causes SubLV
collocation thus putting segments of diffent rimage (and potentially
larger rmeta) SubLVs onto the same PV. For redundant RaidLVs this'll
compromise redundancy. Fix by detecting such bogus allocation on
lvcreate/lvextend and reject the request.
|
| |
|
|
|
|
| |
Make sure primary_dev is defined when using it.
|
| |
|
| |
|
|
|
|
|
| |
Correcting to log_print_unless_silent(),
so -qq can do some work.
|
| |
|
| |
|
|
|
|
| |
Add explicit pointer check is never NULL.
|
|
|
|
|
| |
Avoid coverity to contruct some abstract scenarions of 'cft'
modification and simplify the code at the same time.
|
|
|
|
|
|
| |
Bail out in case first rimage is out-of-sync.
Refresh first, i.e. "lvchange --resync $RaidLV",
then retry downgrade to linear after resynchronization.
|
|
|
|
|
|
|
| |
lvreduce uses _lvseg_get_stripes() which was unable to get raid stripe
info with an integrity layer present. This caused lvreduce on a
raid+integrity LV to fail prematurely when checking stripe parameters.
An unhelpful error message about stripe size would be printed.
|
|
|
|
|
|
|
| |
When lvmcache info is dropped because it's an md component,
then the lvmcache vginfo can also be dropped, but the list
iterator was still using the list head in vginfo, so break
from the loop earlier to avoid it.
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is no easy way to detect, whether device supports zeroing,
and kernel also zeroes device when it's not directly supported,
but with extra message:
operation not supported error, dev X, sector Y op 0x9:(WRITE_ZEROES)...
So to avoid generating such message with every 'lvcreate', use for
zeroing of upto 8K just standard write of zeroed page.
(maybe we can go with even larger sizes).
|
|
|
|
|
| |
This function was relying on dev_name() returning NULL
to indicate no device, but dev_name never returns NULL.
|
|
|
|
|
| |
Creating a snapshot of a cache LV with a cachevol would fail
because cache_check was not being skipped.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of using size of 'empty header' in vdopool use fixed size 4K
for a 'wrappeing' vdo-pool device.
This fixes the issue when user tried to activate vdo-pool after
a conversion from vdo managed device with 'vgchange -ay' - where
this command activated all LVs with 'vdo-pool' wrapping device as well,
but this converted pool uses 0-length header.
This 4k size should usually prevent other tools like 'blkid' recognize
such device as anything - so it shouldn't cause any problems with
duplicate indentification of devices.
|
|
|
|
|
| |
Rename _thin_lv_has_device_id and use common function naming
with _lv_has_thin_device_id().
|
| |
|
|
|
|
|
| |
Creation of 'hidden' local LVs should be visible only in
verbose mode (-v) when creating a raid LV with integrity.
|
|
|
|
| |
Allow writecache|cache over raid+integrity LV.
|
|
|
|
|
|
|
|
|
| |
Remove old code that became incorrect at some point.
It's probably a fragment of an old condition that was left
behind because it wasn't understood. We don't want to drop
the MISSING_PV flag just because the PV has no mda in use.
The device that was missing may have stale data, so the user
needs to decide if the device should be removed or restored.
|
|
|
|
|
|
|
|
|
|
| |
Replace spaces with \040 in directory paths from getmntent (mtab).
The recent commit 5374a44c5712 compares mount point directory paths
from /etc/mtab and /proc/mounts, in order to detect when a mounted
LV has been renamed. The directory path comparison does not work
correctly when the path contains spaces because getmntent uses
ascii space chars and proc replaces spaces with \040.
|
|
|
|
|
|
|
| |
Coverity is complaining about unchecked strcpy here, which is
irelevant as we preallocate buffer to fit in copied string,
however we could actually reuse these size and use just memcpy().
So lets make some simple conversions.
|
|
|
|
|
|
|
| |
With the recent use of DEVLINKS, there is no longer any real
point in checking the filter for symlink names. Removing
this check should not change behavior with or without symlinks
in the filter.
|
| |
|
|
|
|
|
| |
Fixing minor mismatch between definition and declaration of
update_thin_pool_params().
|
|
|
|
|
|
| |
Patch aec5e573afe610070eb2c6bed675d2a7c0efc7e8 was fixing some
of typos only in generated file, but they need to be fixed in
the source files.
|
|
|
|
|
|
| |
A t10 wwid string was found containing a " character
which breaks vg metadata parsing. Ignore any quotation
marks in device id strings.
|
|
|
|
|
| |
This code was no longer used after ommit
87ee401eea3c3c3958ec5cda6e5c246b80503b8c
|
|
|
|
| |
Better suggesting message as suggested by RHBZ 2123151.
|
|
|
|
|
| |
In case the filter strings don't include "/dev/disk", and only
include "pci".
|
|
|
|
|
|
|
|
|
|
|
|
| |
"vgchange -aay --autoactivation event" is called by our udev rule.
When the udev rule runs, symlinks for devices may not all be created
yet. If the regex filter contains symlinks, it won't work correctly.
This command uses devices that already passed through pvscan. Since
pvscan applies the regex filter correctly, this command inherits the
filtering from pvscan and can skip the regex filter itself.
See the previous commit
"pvscan: use alternate device names from DEVLINKS to check filter"
|
|
|
|
|
|
|
|
|
|
|
|
| |
pvscan --cache <dev> is called by our udev rule at a time when all
the symlinks for <dev> may not be created yet (by other udev rules.)
The regex filter in lvm.conf may refer to <dev> using a symlink name
that hasn't yet been created, which would cause <dev> to not match
the filter regex. The DEVLINKS env var, set by udev, contains all
the symlink names for <dev> that have been or will be created.
So, we add all these symlink names to dev->aliases, as if we had
found them in /dev. This allows <dev> to be recognized by a regex
filter containing a symlink for <dev>.
|
|
|
|
|
| |
If extending an LV with crypto_LUKS on it, and the crypt device
is missing, then fail the command before extending the LV.
|
|
|
|
|
|
| |
If a mounted LV is renamed, then fs resizing utilities will fail,
so detect this condition and fail the command before any changes
are made.
|
|
|
|
|
|
|
|
|
| |
It looks like force was not being used to enable crypt resize,
but rather to force an inconsistency between LV and crypt
sizes, so this is either not needed or force in this case
should have some other meaning.
This reverts commit ed808a9b548ca59221d512bfb7ae581e8367fe50.
|
|
|
|
|
|
|
|
| |
Update previous commit
"lvresize: only resize crypt when fs resize is enabled"
to enable crypt resizing when --force is set and --resizefs
is not set. This is because it's been allowed in the past
and people have used it, but it's not a good idea.
|
|
|
|
|
|
|
|
|
|
|
| |
There were a couple of cases where lvresize, without --fs resize,
was resizing the crypt layer above the LV. Resizing the crypt
layer should only be done when fs resizing is enabled (even if the
fs is already small enough due to being independently reduced.)
Also, check the size of the crypt device to see if it's already
been reduced independently, and skip the cryptsetup resize if
it's not needed.
|
|
|
|
|
| |
ATM kernel VDO target does not handle resize of inactive VDO LVs
so prevent users corrupting such LVs and require active such LVs.
|
|
|
|
|
|
|
|
| |
Enhance checking vdo constains so it also handles changes of active VDO LVs
where only added difference is considered now.
For this also the reported informational message about used memory
was improved to only list consuming RAM blocks.
|
|
|
|
|
|
|
|
| |
Introduce struct vdo_pool_size_config usable to calculate necessary
memory size for active VDO volume.
Function lv_vdo_pool_size_config() is able to read out this
configuration out of runtime DM table line.
|
|
|
|
|
| |
When we are actually resizing VDO device - we need to check size only in
non-critical section - otherwise we are checking
|
|
|
|
|
| |
We need to validate whether the requested resizing size can be
expressed with given extent_size.
|
|
|
|
|
| |
Signed-off-by: lilinjie <lilinjie@uniontech.com>
(cherry picked from commit 81b1f5bc3bac0e2e9099b67162da7d1a4995c5f4)
|
| |
|