1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
Commit Graph

18765 Commits

Author SHA1 Message Date
Zdenek Kabelac
df9e5f39a7 debug: correct check for failing close 2023-10-02 14:13:12 +02:00
David Teigland
88aa285a79 devices: refresh device ids if the system changes
If the system changes, locate PVs that appear on different devices,
and update the device IDs in the devices file.  A system change is
detected by saving the DMI product_uuid or hostname in the devices
file, and comparing it to the current system value.  If a root PV
is restored or copied to a new system with different devices, then
the product_uuid or hostname should change, and trigger lvm to
locate PVIDs from system.devices on new devices.
2023-09-27 15:22:11 -05:00
Zdenek Kabelac
d06378373e WHATS_NEW_DM: update 2023-09-26 01:32:48 +02:00
Zdenek Kabelac
cb8486a9b2 tests: check exit_on works 2023-09-26 01:24:38 +02:00
Zdenek Kabelac
d54deae0ad debug: correcting check for error
Correct trace for erroring case of close.
2023-09-26 01:23:00 +02:00
Zdenek Kabelac
e930ee93f7 debug: correct level
No error for just tracing message.
2023-09-26 01:23:00 +02:00
Zdenek Kabelac
a9d7a9d128 dmeventd: implement exit_on file check
When exit on file is present in a system and term/break signal is
catched, them dmeventd is no longger refusing to exit.

For the correct shutdown, there should be ideally unmonitoring call,
however in some case it's very hard to implement this correct procedure.

With this 'exit on' file dmeventd at least avoid 'blocking' shutdown,
before systemd kills use with -9 anyway possibly even in some unwanted
stated of internal dmeventd processing (i.e. in the middle of some lvm
command processing).
2023-09-26 01:23:00 +02:00
Zdenek Kabelac
3da18a06d8 configure: autoreconf 2023-09-26 01:23:00 +02:00
Zdenek Kabelac
744cdc3ba8 configure.ac: add --with-dmeventd-exit-on-path 2023-09-26 01:23:00 +02:00
Zdenek Kabelac
80d34abf49 dmeventd: info status report
To quickly get info about some internal dmeventd status,
implment   'dmeventd -i' support.

Reported messages are some 'raw' internal informations mainly
useful to developers.
2023-09-26 01:23:00 +02:00
Zdenek Kabelac
637d812df5 dmeventd: unregister all devices on restart
Instead of just exiting in the middle of monitoring,
unregisted all monitored devices first and then exit.

To speedup this path, all send internal SIGINT when thread
unregiters itself, to wakup-up main sleeping loop.
2023-09-26 01:23:00 +02:00
Zdenek Kabelac
c31dcf3632 dmeventd: use return
Use 'return' instead of calling exit() when possible.
2023-09-26 01:23:00 +02:00
Zdenek Kabelac
396024713f dm-event: reset descriptors
Reset descriptors after closing them to -1.
2023-09-26 01:23:00 +02:00
Zdenek Kabelac
a203499ba3 dm-event: release buffer on dm_event_get_version
Avoid memory leak in this function.
2023-09-26 01:23:00 +02:00
Zdenek Kabelac
90713c84f3 dm-event: enhance timestamp for debugging
Add microseconds for timestamps in dm-event trace messages.
Also collect timestamps only when debugging when they are used.
2023-09-26 01:23:00 +02:00
Zdenek Kabelac
a8fd6de907 lvmdbusd: fix syntax warning
python3.12 reported SyntaxWarning: invalid escape sequence '\/'
2023-09-20 15:55:28 +02:00
Zdenek Kabelac
fc2feabef7 WHATS_NEW: updates 2023-09-19 14:54:51 +02:00
Zdenek Kabelac
984c024ef2 typos: misc 2023-09-19 14:54:51 +02:00
Zdenek Kabelac
c7c51329f4 tests: check pvmove with raid legs
Check pvmove correctly handles raid legs on input
(testing previous pvmove fix).
2023-09-19 14:54:51 +02:00
Zdenek Kabelac
e2f29c4989 pvmove: fix building sibling raid lv name
Make a local copy of the 'idx' string to avoid
overlapping during the rebuild of name.

This fixes cases where users specified raid
component LVs for moving.

Reported-by: kotarou3@github.com
2023-09-19 14:47:27 +02:00
Zdenek Kabelac
970e4d295e tests: add fsck after split 2023-09-14 10:08:26 +02:00
Zdenek Kabelac
f5781144ab vdo: typo fix
Argh - lastmin mods...
2023-09-14 10:01:43 +02:00
Zdenek Kabelac
9d7061f1a3 tests: skip test when lvmdbusd runs on the system
lvmdbusd changes $RUNDIR results.
2023-09-14 01:45:34 +02:00
Zdenek Kabelac
f9d17f1f6d tests: update for work in fake dev environment
No write outside of $LVM_TEST_DIR  (removed /test access).
Use 'aux prepare_scsi_debug_dev' for automated scsi_debug handling
Properly use "" around shell vars.
Smarter read of PVS values.
Relax requirement to only work with real /dev dir.
2023-09-14 01:45:34 +02:00
Zdenek Kabelac
fac2e07333 tests: enforce full fs check 2023-09-14 01:45:34 +02:00
Zdenek Kabelac
fba81cf3e9 tests: pvmove large disk area
With some faster test hw machine we need to make this test
a bit more resource consuming.
2023-09-14 01:45:34 +02:00
Zdenek Kabelac
738c4b84fb tests: missing to check for writecache support
Ono more case requires writecache presence.
2023-09-14 01:45:34 +02:00
Zdenek Kabelac
de4cb219fb tests: aux using singl lvmconf call
lvmconf can handle multiple options in a single pass.
2023-09-14 01:45:34 +02:00
Zdenek Kabelac
4276c703c5 tests: aux try with extra sleep
Since udev_wait is not really adding any major delay to wait
for any udev worker processing - add extra sleep .1.
2023-09-14 01:45:34 +02:00
Zdenek Kabelac
f968833570 vdo: avoid using of valuesonly
To retain backward compatibility with some older version of lvm
avoid using --valuesonly option with lvmconfig.
2023-09-14 01:44:27 +02:00
Zdenek Kabelac
1885655e9a test: improve aux teardown
Handle the case of device teardown where the first pass
could have only a single, but opened device, for removal.
In such case we want to at least once go through
the udev_wait and retry removal again.

TODO: maybe a sleep .1  might be usable as well with udev_wait
2023-09-13 13:38:15 +02:00
Zdenek Kabelac
e75ac1b4c0 gcc: warning: missing braces around initializer
Fix warning emitted by some older gcc...
2023-09-13 13:38:15 +02:00
Zdenek Kabelac
e1cfc075c2 vdo: better support for devicesfile
Instead of relying on 'pvs' output - check directly system
configuation and use lvmdevice accrording to use_devicesfile setting.

Also drop use of --fs ignore for filesystem extension for better
backward compatibility with older lvm version.

Shuffle code a bit so the '--no-snapshot' path does not execute
a few unnecessary commands.
2023-09-13 13:38:15 +02:00
Zdenek Kabelac
8cbfd72f68 WHATS_NEW: updates 2023-09-12 14:44:32 +02:00
Mikulas Patocka
ab73ad4e5f gcc: fix warnings for x32 architecture
Warning from x32 ABI compilation.
2023-09-12 14:41:22 +02:00
Zdenek Kabelac
b1b60887f0 debug: missing dots 2023-09-12 14:39:14 +02:00
Zdenek Kabelac
d9cebeaf34 vdo: lvm_import_vdo enhancements
Work also with devices that may have ':' inside their generated
/dev/disk/by-id

Ensure there is no race with systems' auto activation while using
the snapshot for conversion.

Update system's vdoconf.yml after the use of snapshot for conversion.

Skip unnecesary prompt for 'convert' while using snapshot and query only
for final snaphot merge.

Prohibit conversion for a device with the PV header.

Enhance 'trap' protection for more signals.

Improve clean() recovery path.

Replace bash 'test' command with [].

Correct some output message to print $TOOL.

Support also options without '-' in the middle i.e. --nosnapshot.

For shellcheck predefine all variables extracted from vdoconf.yml.
2023-09-12 14:30:48 +02:00
David Teigland
fa49651301 lvresize: fix 32 bit overflow in size calculation 2023-09-11 12:18:12 -05:00
Zdenek Kabelac
2eb34edeba make: generate 2023-09-04 18:52:02 +02:00
Zdenek Kabelac
5a44135233 tests: disable logging for lvmdbusd
Since lvmdbusd testing tends to do its own logging,
try for now to disable very generic logging mechnanism
of the test suite and see the result.

Some lvmdbusd test seems to rely on some log/file logic
which is modified with the use of these shell vars.
2023-09-04 18:52:02 +02:00
Zdenek Kabelac
2b8b51291f tests: check for writecache
Writecache needs writecache kernel target to be present.
2023-09-04 18:52:02 +02:00
Zdenek Kabelac
cc8178e911 tests: check for binaries
vdo wrapper tool uses some 'locally installed' binaries
for vdoformat and vdoprepareforlvm
Chech for their presence.

Skip this test with lvmlockd.
2023-09-04 17:48:41 +02:00
Zdenek Kabelac
e9eeb84040 WHATS_NEW: update 2023-09-03 22:51:22 +02:00
Zdenek Kabelac
86cf593e87 tests: vdo scsi convert
Somewhat tricky test to check VDO import of a SCSI device.
2023-09-03 22:44:08 +02:00
Zdenek Kabelac
b85f9c183c tests: vdo convert
Require VDO version 6.2.3.

Skip the part of the test that needs vdo wrapper and 2 different
versions of vdoprepareforlvm to prepare shifted VDO header
at the 2MiB offset.
2023-09-03 22:33:11 +02:00
Zdenek Kabelac
39f312108d tests: check passing PV list 2023-09-03 22:33:11 +02:00
Zdenek Kabelac
06464f7cfc tests: vdo wrapper support symlinks
Enhance internal VDO replacement wrapper script to handle symlinks
for i.e. SCSI device like VDO manager.
2023-09-03 22:33:11 +02:00
Zdenek Kabelac
9087ace2af aux: teardown also devices with testing UUID
Hunt also for devices with LVMTEST prefix in UUID.

Call teardown_devs_prefixed - so if they hold RAM or SCSI
they are closed before trying to remove kernel modules.
2023-09-03 22:15:48 +02:00
Zdenek Kabelac
d34d1f0173 debug: trace result failure 2023-09-03 22:03:33 +02:00
Zdenek Kabelac
670d982568 debug: drop stack from regular path 2023-09-03 22:03:33 +02:00