| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Upgrade commit 222e1e3acee399b0acf31565f784716d67c465a8 with more checks.
|
|
|
|
|
|
|
| |
After the internal lvmlock LV (holding sanlock leases) is
extended to hold more leases, it needs to be zeroed.
sanlock expects to see either zeroed blocks or blocks
initialized with leases.
|
|
|
|
|
|
|
|
|
|
| |
currently, lvcreate for sanlock find the free lock offset
from the beginning of the lvmlock every time.
after created thousands of lvs, it will issue thousands of read
ios for lvcreate to find free lock offset.
remeber the last free lock offset will greatly reduce the impact
Signed-off-by: Zhang Huan <zhanghuan@huayun.com>
|
|
|
|
|
|
|
| |
supported anymore
The fact that this combination is not supported anymore is tested
already in pvcreate-operation.sh test.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
--restorefile
Fix code checking that the 2nd mda which is at the end of disk really
fits the available free space and avoid any DA and MDA interleaving when
we already have DA preallocated. This mainly applies when we're restoring
a PV from VG backup using pvcreate --restorefile where we may already have
some DA preallocated - this means the PV was in a VG before with already
allocated space from it (the LVs were created). Hence we need to avoid
stepping into DA - the MDA can never ever be inside in such case!
The code responsible for this calculation was already in
_text_pv_add_metadata_area fn, but it had a bug in the calculation where
we subtracted one more sector by mistake and then the code could still
incorrectly allocate the MDA inside existing DA. The patch also renames
the variable in the code so it doesn't confuse us in future.
Also, if the 2nd mda doesn't fit, don't silently continue with just 1
MDA (at the start of the disk). If 2nd mda was requested and we can't
create that due to unavailable space, error out correctly (the patch
also adds a test to shell/pvcreate-operation.sh for this case).
|
|
|
|
| |
Upgrade commit fb641c342343ac48cc623c8079900b1f4f395a69 with additional checks.
|
|
|
|
|
|
| |
If the PV was originally created with a larger-than-default
metadata area the restored one wasn't and might not even be
large enough to hold the metadata!
|
|
|
|
|
|
| |
Previously the cache remembered an existing bootloaderarea and
reinstated it (without even checking for overlap) when asked to
write out the PV. pvcreate could write out an incorrect layout.
|
|
|
|
|
| |
The backup file already holds the bootloader area details to use so
don't overcomplicate things.
|
|
|
|
| |
and interpret it as lvm command -h
|
|
|
|
|
| |
It's not known when this last worked, but there has
been documentation suggesting it worked, so enable it.
|
|
|
|
|
| |
When adopting locks, we shouldn't skip the special
dlm global lockspace name when using sanlock.
|
|
|
|
|
| |
When trying to adopt locks in startup, we want to ignore
a lock manager that isn't running, not fail.
|
|
|
|
|
| |
Use --withgeneralpreamble and --withlocalpreamble instead of
concatenating files.
|
|
|
|
|
|
|
|
| |
Add the new concise format to dmsetup create, either as a single
command-line parameter or from stdin.
Based on patches submitted by
Enric Balletbo i Serra <enric.balletbo@collabora.com>.
|
|
|
|
|
| |
There's no need to insist on a major number being supplied when the
code's going to override it if it's wrong anyway.
|
| |
|
| |
|
|
|
|
|
| |
Add DEFS_$@ for c++ (used only by test suite...)
Just to pair plain C build rules.
|
|
|
|
|
| |
Add missing ELDFLAGS when linking binary.
Also pass CFLAGS for cases where we build code coverage compilation.
|
|
|
|
|
| |
For resolving usability of DEBUG_MEM - check proper translated make
vars for proper value.
|
|
|
|
|
|
|
|
|
|
| |
Drop 'DMEVENT' make variable and use BUILD_DMEVENTD like with other daemons.
NOTE: by default we do not build dmeventd - maybe time to change
as lot of build targets basically do need dmeventd...
Switch to use SYSTEMD_LIBS and avoid linking systemd library with
every linked tool when dbus notification are enabled.
(TODO add missing testing for lib presence)
|
|
|
|
|
|
|
|
|
|
| |
Check first if we need to even link -lrt - since clock functions
are normally emebeded with recent glibc (>=2.17)
Use standard RT_LIBS name.
Avoid duplicate test for realtime clock with lvmlockd
Show better error message when realtime clock support is missing or
disabled.
Link RT_LIBS explicitely with lvmlockd and lvmetad.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid adding -g more then once for debug builds.
Avoid enabling DEBUG_MEM when we build multithreaded tools.
Link executables with -fPIE -pie and --export-dynamic LDFLAGS
Introduce PROGS_FLAGS to add option to pass flags for external libs.
Link lvm2 internally library only when really used.
Link DAEMON_LIBS with daemons.
Pass VALGRIND_CFLAGS internally
Set shell failure mode on couple places.
|
|
|
|
| |
Avoid passing 'gcc' warning options to non-gcc compiler
|
|
|
|
|
| |
Link -lrt directly only with libdevmapper.
All other users get dependency transiently.
|
|
|
|
|
| |
No real effect anyway - function returs '1' in all paths,
but just make sure we do not have 'log_error()' on non-error path.
|
|
|
|
| |
Use user configured paths instead of some developers paths ;)
|
|
|
|
|
|
|
| |
lvm2 warned about zeroing and too big chunksize (>=512KiB), but
only during lvconvert, so lvcreate was creating thin-pools
without any warning about possible slowness of thin provisioning
because of zeroing.
|
| |
|
|
|
|
| |
Replace -1 (reported as 255) by 4.
|
|
|
|
|
| |
When using this new format for input, it'll sometimes help to
be able to specify the minor number.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create a new table output format that concisely shows multiple devices
on one line.
dmsetup table --concise [device...]
<dev_name>,<uuid>,<flags>[,<table>]*[;<dev_name>,<uuid>,<flags>[,<table>]*]*
Table lines are separated by commas.
Devices are separated by semi-colons.
Flags is currently 'ro' or 'rw' (and might be extended in a
yet-to-be-defined way in future).
Any comma, semi-colon or backslash within a field is quoted by a
preceding backslash.
The format can later be supplied as input to dmsetup or even to the
booting kernel as an alternative way to set up devices.
Based on patches submitted by
Enric Balletbo i Serra <enric.balletbo@collabora.com>.
|
| |
|
|
|
|
| |
they are escaped by running sed in makefile
|
|
|
|
|
| |
Use the command definitions to separate the implementation
of vgchange systemid from the rest of vgchange.
|
|
|
|
|
| |
Use the command definitions to separate the implementation
of lockstop and lockstart from the rest of vgchange.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add an independent command definition for "vgchange --locktype",
and split the implementation out of the set of common metadata
changes. It is unlike normal metadata changes, and can only
be run by itself. (Changing the lock type is similar in
principle to changing the VG name or the VG system ID; it
effects the ability of any host to see or access the VG.)
At some point this command lost the ability to forcibly change
the lock type of a shared VG to "none" (making it a local VG).
This can be necessary to repair shared VGs (e.g. recovery steps
that occur in vg_read are disabled for shared VGs because
they are not locked properly, or recovering sanlock locks
when the PV holding them is lost.)
"vgchange --locktype none --lockopt force VG" is used as the
method of forcing the shared VG to become local so that it
can be repaired.
|
|
|
|
|
| |
Put in sync some naming used for function declaration and
actual in-code implementation.
|
|
|
|
|
| |
Give udev time to get in sync and give md-core time to wake up
after table reload.
|
| |
|
| |
|
|
|
|
| |
warning: declaration of ‘lv_size’ shadows a global declaration
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since _deactivate_and_remove_lvs() is used in more then one place,
move the needed udev synchronization into this function so other
users automatically get correct fs state before next dm manipulation.
Assumption here is that this udev synchronization 'delay' may also
prevent to 'early' table reloads which might cause kernel problems
for md-core - but we may need more generic time-limited reload
frequency for raid devices.
Note: on udev-less system there will be almost no delay.
|
|
|
|
|
|
|
| |
Commit 8a912d6dbcc34ce2b76a0104c39de7aa0480c512 missed the wrong logic,
we use 2 vars 'dev' & 'mddev' and their usage can't be mixed.
So correctly separate them so mddev keeps name of MD device.
|
|
|
|
| |
Avoid casting to the same type.
|
| |
|