1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
Commit Graph

15923 Commits

Author SHA1 Message Date
Peter Rajnoha
b6a767930f scan: md metadata version 0.90 is at the end of disk
commit de28637
  scan: use full md filter when md 1.0 devices are present

missed the fact that md superblock version 0.90 also puts
metadata at the end of the device, so the full md filter
needs to be used when either 0.90 or 1.0 is present.
2018-12-04 14:33:37 -06:00
David Teigland
d02a64cf36 config settings: fix version 3.0.0
version 3.0.0 was changed in the end to 2.3.0,
but config settings had previously been encoded
with version 3.0.0.
2018-12-04 14:33:37 -06:00
David Teigland
2c1e9d4956 lvmlockd: vgchange locktype with yes option
for auto response to yes/no prompt.
2018-12-04 14:33:37 -06:00
David Teigland
88ae03c38f lvmlockctl: wait by default when stopping
lvmlockctl --stop-lockspaces was by default not waiting
for all the lockspaces to be gone.
2018-12-04 14:33:37 -06:00
David Teigland
f6a77a894e blk_availability service drop lvmetad 2018-12-04 14:33:37 -06:00
David Teigland
8266d54a55 pvscan systemd service for event based activation
The pvscan systemd service for autoactivation was
mistakenly dropped along with the lvmetad related
services.

The activation generator program now looks at the new
lvm.conf setting "event_activation" (default 1) to
switch between event activation and direct activation.

Previously, the old use_lvmetad setting was used to
switch between event and direct activation.
2018-12-04 14:33:37 -06:00
David Teigland
263e34b9b6 bcache: sync io fixes
fix lseek error check
fix read/write error checks
handle zero return from read and write
don't return an error for short io
fix partial read/write loop
2018-12-04 14:33:37 -06:00
David Teigland
52502b1fba io: use sync io if aio fails
io_setup() for aio may fail if a system has reached the
aio request limit.  In this case, fall back to using
sync io.  Also, lvm use of aio can be disabled entirely
with config setting global/use_aio=0.

The system limit for aio requests can be seen from
  /proc/sys/fs/aio-max-nr

The current usage of aio requests can be seen from
  /proc/sys/fs/aio-nr

The system limit for aio requests can be increased by
setting fs.aio-max-nr using sysctl.

Also add last-byte limit to the sync io code.
2018-12-04 14:33:37 -06:00
Zdenek Kabelac
a4d72c9cb2 tests: update required raid target
For embeded reshaping operation require higher driver version.
(otherwise we get:

Converting vg/LV1 from raid6 (same as raid6_zr) is directly possible to the following layouts:
 raid6_nc
 raid6_nr
 raid6_la_6
 raid6_ls_6
 raid6_ra_6
 raid6_rs_6
 raid6_n_6
2018-12-04 14:33:37 -06:00
Zdenek Kabelac
b43c8a81cb tests: missing copyright 2018-12-04 14:33:37 -06:00
Zdenek Kabelac
d207abce9d sanlock: update headers 2018-12-04 14:33:37 -06:00
Zdenek Kabelac
5a057cb85b tests: generate slightly less volumes 2018-12-04 14:33:37 -06:00
Zdenek Kabelac
674eaa13ff tests: speed-up testing full of lvm2 metadata
Generate faster full metadata condition.

FIXME: vgremove is extremaly slow with larger set of LVs.
2018-12-04 14:33:37 -06:00
Zdenek Kabelac
63b4b38b8b tests: update parm for new kernel 2018-12-04 14:33:37 -06:00
Zdenek Kabelac
8955c1b4e5 tests: skip part of test
On kernel 4.8 this test piece oopses machine (fc23).
2018-12-04 14:33:37 -06:00
Zdenek Kabelac
d379754b44 tests: create whole path with mkdir
Create also 'lvm' upper this if such one is missing in /run dir
and use '-p' with mkdir.
2018-12-04 14:33:37 -06:00
Zdenek Kabelac
9a6bcbe195 tests: skip portion of test for lvmpolld
lvmpolld ATM is not desingned to preserve interval checking
in the same way the 'lvconvert' tool is doing - so the passed
'-i 40' is not respected and lvmpolld autonomously checks
state of conversion and updates lvm2 metadata and dm tables
when needed.

So skip portion of test that relayed on this and preserve this logic
only for command line invocation and forking of polling process
where the interval of checking is under full control.
2018-12-04 14:33:37 -06:00
Zdenek Kabelac
30d8077f7a tests: skip when gcore from gdb package is missing
gcore is needed for gathering all userspace mappings.
2018-12-04 14:33:37 -06:00
Zdenek Kabelac
ca6bb353c9 tests: prefer internal header
Although we primarily want to check externally used libdevmapper
library,   out internal  all.h is still keeping all symbols
as the original library has - so for simpler compilation keep
using this private copy for defining needed symbols.
2018-12-04 14:33:37 -06:00
Zdenek Kabelac
8f0364ccd2 tests: correcting header file enclosure
Use "" for internal header file.
2018-12-04 14:33:37 -06:00
Zdenek Kabelac
e52b5f9ab2 tests: still more libs needs 2018-12-04 14:33:37 -06:00
Zdenek Kabelac
b2c52f1731 tests: makefile fixes
New tests needs more options and libs.
2018-12-04 14:33:37 -06:00
Zdenek Kabelac
74d77bfaaa tests: drop unwanted backup 2018-12-04 14:33:37 -06:00
Zdenek Kabelac
3931441190 tests: raise minsize of xfs
mkfs.xfs now needs at least ~1600...
2018-12-04 14:33:37 -06:00
Zdenek Kabelac
977d33c1cb tests: extend 2018-12-04 14:33:37 -06:00
Zdenek Kabelac
60c4802bc3 tests: secure data erase 2018-12-04 14:33:37 -06:00
Zdenek Kabelac
df10e0e598 libdm: add memory barrier
Just for case ensure compiler is not able to optimize
memset() away for resources that are released.

This idea of using memory barrier is taken from openssl.

Other options would be to check for 'explicit_bzero' function.
2018-12-04 14:33:37 -06:00
David Teigland
b33842e6fc scripts: remove lvmetad from makefile 2018-12-04 14:33:37 -06:00
David Teigland
f2618758e5 lvm2-monitoring service shouldn't refer to lvmetad 2018-12-04 14:33:37 -06:00
David Teigland
0bd6be5cf2 man: remove some clvmd references 2018-12-04 14:33:37 -06:00
David Teigland
4257c02415 man: remove scattered lvmetad references 2018-12-04 14:33:37 -06:00
David Teigland
9b423ae6da remove unused backgroundfork option 2018-12-04 14:33:36 -06:00
David Teigland
0aeafc2b0a man: pvscan updates 2018-12-04 14:33:36 -06:00
David Teigland
b4b859c6a9 pvscan: background option is not used
Move this into the list of ignored options so
it doesn't appear in the man page.
2018-12-04 14:33:36 -06:00
David Teigland
1eeda655ad man pvscan: replace lvmetad text 2018-12-04 14:33:36 -06:00
David Teigland
d4b69c81e3 man: remove lvmetad 2018-12-04 14:33:36 -06:00
David Teigland
228036bcb2 man lvmdump: remove clvm reference 2018-12-04 14:33:36 -06:00
David Teigland
938ee72c9b man: remove clvmd man page 2018-12-04 14:33:36 -06:00
David Teigland
d0fee1e784 man: remove cluster references 2018-12-04 14:33:36 -06:00
Zdenek Kabelac
3ac106df6e tests: add wait loop
Add a little wait loop - since lvconvert started background process
and we need to wait till this bg task initiate its work -
adding ~1s loop should give reasonable enough time to start mirroring.
2018-12-04 14:33:36 -06:00
Zdenek Kabelac
bac5d782ca devicemapper: retry mirror leg deactivation
This could be seen as continuation of
6cee8f1b06.
Some test maching with old udev system shows problem,
where udev 'jumps on' leg device after mirror target
releases its legs -  since udev does not (in this old case) skips
such device from scanning - it opens device - and this prevent
leg device to be deactivated - effectively such device stays
'leaked' in DM table invisibly to lvm2 command.

So to 'combat' this issue - if the device has '_mimage' in its name,
the retry of deactivation is automatically assumed.

NOTE: wider impact is unexpected - as it's touching only old mirror
target which is nowadays replaced with 'raid'.

In case there will be some problem identified - probably both patches
should be reverted.
2018-12-04 14:33:36 -06:00
David Teigland
0eafb76772 man: lvmcache update
for cache changes including writecache
2018-12-04 14:33:36 -06:00
Zdenek Kabelac
499923f0f6 tests: keep results configurable 2018-12-04 14:33:36 -06:00
Zdenek Kabelac
5c150a28e2 configure: update 2018-12-04 14:33:36 -06:00
Zdenek Kabelac
dbe0a79f03 devicemapper: retry remove even for subLVs
With older systems and udevs we don't have control over scanning of lvm2
internal devices - so far we set retry-removal only for top-level LVs,
but in occasional cases udev can be 'fast enough' to open device for
scanning and prevent removal of such device from DM table.

So to combat this case - try to pass 'retry' flag also for removal of
internal device so see how many races can go away with this simple
patch.

Note: patch is applied only to internal version of libdm so the external
API remains working in the old way for now.
2018-12-04 14:33:36 -06:00
Zdenek Kabelac
205b4f0146 activation: trimming string is expected
Commit 813347cf84 added extra validation,
however in this particular we do want to trim suffix out so rather ignore
resulting error code here intentionaly.
2018-12-04 14:33:36 -06:00
David Teigland
35b06d808a devices: reuse bcache fd when getting block size
This avoids an unnecessary open() on the device.
2018-12-04 14:33:36 -06:00
Zdenek Kabelac
29c6f2874b tests: fix shell quoting 2018-12-04 14:33:36 -06:00
Zdenek Kabelac
9aca3a1d67 tests: add wait for udev
Since the test is currently directly working with live directory,
which can be getting updates from system's udev - add wait
for settling so removal of all known PVs happens after that.
But still this has major influce on behavior of running system,
so the test should never be executed on a user used box.
2018-12-04 14:33:36 -06:00
Zdenek Kabelac
64e62167f0 pvscan: add error checking for write of online files
When there is any write failure during writting file,
report this upward as error and fail command instead
of continuing futher.
2018-12-04 14:33:36 -06:00