]> sourceware.org Git - lvm2.git/log
lvm2.git
8 months agomakefiles: correct install srcdir
Zdenek Kabelac [Tue, 5 Mar 2024 21:00:28 +0000 (22:00 +0100)]
makefiles: correct install srcdir

When building in other dir, ensure srcdir is used to find helper
script (via vpath) through  $< usage.

Add also missing [INSTALL] prints for some installed files.

8 months agosnapshots: avoid monitoring of inactive origins
Zdenek Kabelac [Fri, 23 Feb 2024 11:54:54 +0000 (12:54 +0100)]
snapshots: avoid monitoring of inactive origins

External origins for thin volumes can be also used at the same time
as old(thick) snapshot origins. However in this case it's possible
the LV is only active as being 'external' origin, but old snapshot LVs
are not active. For this case before handling these
LVs for un/monitoring check the active state of origin LV.

This should prevent warnings of monitoring failures.

8 months agolvm.conf: update scan_lvs description 1185383911
David Teigland [Wed, 21 Feb 2024 17:08:02 +0000 (11:08 -0600)]
lvm.conf: update scan_lvs description

to better reflect the devices file existence, and
to mention layered autoactivation in lvm udev rules.

8 months agomake: generate 1182024962
Zdenek Kabelac [Mon, 19 Feb 2024 13:26:40 +0000 (14:26 +0100)]
make: generate

8 months agocleanup: remove unused code
Zdenek Kabelac [Fri, 26 Jan 2024 10:42:44 +0000 (11:42 +0100)]
cleanup: remove unused code

8 months agodevices: refactor recursive dir create
Zdenek Kabelac [Thu, 1 Feb 2024 13:14:02 +0000 (14:14 +0100)]
devices: refactor recursive dir create

Make recursive directory path creation reusable via
dir_create_recursive.

While we already have dm_create_dir() - it's not taking mode arg,
so let's make lvm's internal file helper function.

8 months agolabel: simplify code
Zdenek Kabelac [Fri, 26 Jan 2024 15:08:54 +0000 (16:08 +0100)]
label: simplify code

8 months agobcache: remove duplicate _wait_all call
Zdenek Kabelac [Fri, 26 Jan 2024 13:36:31 +0000 (14:36 +0100)]
bcache: remove duplicate _wait_all call

Since the  bcache_flush() is supposed to already use _wait_all()
remove duplicated invoce of this function.

8 months agocache: check module in modules builtin
Zdenek Kabelac [Thu, 8 Feb 2024 13:58:32 +0000 (14:58 +0100)]
cache: check module in modules builtin

Instead of parsing the whole /proc/kallsyms use faster variant
of using modprobe tool logic.

lvm2 here wants to know whether the particular DM cache policy is
present in the kernel - however since the cache policy does not have
any kernel module parameters and it can be built-in to a kernel
there is no /sys/modules directory in such case and we would need to call
modprobe everytime we want detect such case.

The old solution tried to look for particular kernel symbol
(and like not the right way, as smq_exit might be actually ommitted).

New version checks MODULES_PATH/`uname -r`/modules.builtin for
whether is present cache policy module instead of CPU expensive parsing
of kallsyms.

8 months agoconfigure: add --with-modulesdir
Zdenek Kabelac [Thu, 8 Feb 2024 13:58:16 +0000 (14:58 +0100)]
configure: add --with-modulesdir

Add configurable path for directory with kernel modules.
Following patch will use this directory to lookup:
/lib/modules/`uname -r`/modules.builtin

8 months agovdo: read VDO stats via dm message
Zdenek Kabelac [Mon, 19 Feb 2024 13:13:20 +0000 (14:13 +0100)]
vdo: read VDO stats via dm message

As the sysfs interface is seen somewhat obsolete, swith code
to prefer using DM 'stats' message to get our currently needed
info for VDO pool target.

9 months agodevices file: rename unused system.devices 1178341937
David Teigland [Mon, 5 Feb 2024 19:15:37 +0000 (13:15 -0600)]
devices file: rename unused system.devices

If lvm.conf has use_devicesfile=0 and /etc/lvm/device/system.devices
exists, then rename it to system.devices-unused.YYYYMMDD.HHMMSS.
This prevents an old, incorrect system.devices from being used in
the future if lvm.conf is changed to use_devicesfile=1.

9 months agodevices file: back up each version
David Teigland [Wed, 31 Jan 2024 18:14:02 +0000 (12:14 -0600)]
devices file: back up each version

Create backup copies of system.devices in /etc/lvm/devices/backup
named system.devices-YYYYMMDD.HHMMSS.NNNN.  NNNN is the version
counter from the file.

Each time that an lvm command writes a new system.devices file,
it also writes the same file in the backup directory.

A new comment line is added to system.devices with HASH=<num>
where <num> is a crc calculated from the uncommented lines in
system.devices.  This lets lvm detect if the file has been
modified outside of lvm itself.

If system.devices is edited directly, the next time a command
reads the file, the crc will not match the HASH value.  The
command will then rewrite system.devices with the correct HASH
value, and create a backup reflecting the edits.

A default limit of 50 backup files is kept, configurable by
lvm.conf devicesfile_backup_limit (set to 0 to disable backups.)

9 months agoudev: ignore LVs containing PVs 1170102018
David Teigland [Thu, 8 Feb 2024 20:51:46 +0000 (14:51 -0600)]
udev: ignore LVs containing PVs

If LVM LVs happen to contain PVs, they are passed to the lvm udev
rule for processing, where they should be ignored.  PVs on LVs
most likely belong to VM images, and don't belong to the host
which sees the LV.  It's unsafe for the host to use these PVs.
Without this change, the LV would be processed by pvscan which
would generally ignore it, either because of the devices file,
or because of the default lvm policy to not consider LVs as
potential PVs.  This change makes the udev rule consistent
with that policy and avoids the unnecessary system messages
produced when pvscan ignores the LV.

9 months agosystem_id: explain the reason for choosing appmachineid over machineid 1165351102
Andre Klärner [Mon, 5 Feb 2024 19:57:30 +0000 (13:57 -0600)]
system_id: explain the reason for choosing appmachineid over machineid

Since understanding the reason for choosing the appmachineid over the
direct use of machineid is not easily found, I extended to help text to
clarify this a bit.

9 months agoman: fix typo in -A description 1165236263
David Teigland [Mon, 5 Feb 2024 18:13:44 +0000 (12:13 -0600)]
man: fix typo in -A description

9 months agoarchiving: Fix doubled filename in vgcfgrestore 1149721925
Ranjith ML [Wed, 24 Jan 2024 13:05:24 +0000 (14:05 +0100)]
archiving: Fix doubled filename in vgcfgrestore

10 months agothin_pool: correct refactoring chunk_size 1141637488
Zdenek Kabelac [Wed, 17 Jan 2024 16:25:34 +0000 (17:25 +0100)]
thin_pool: correct refactoring chunk_size

Function to recalc chunk_size according to dev hints needs to be
used after chunk_size is being set to thin pool segment - correct
this ordering mistake introduced in previous refactoring commit.

10 months agovdo: correct vdo header size
Zdenek Kabelac [Wed, 17 Jan 2024 16:13:26 +0000 (17:13 +0100)]
vdo: correct vdo header size

Previous patch that introduced support for thinpool with vdo
not correctly handled header size - as this part is not fully usable
yet.  We are going to try to use the 0, but current state of code is not
yet compliant to this logic so keep vdo_header_size during conversion
and alos correctly pass through virtual_extents to vdo formating.

10 months agoWHATS_NEW: update 1133383466
Zdenek Kabelac [Wed, 10 Jan 2024 13:07:45 +0000 (14:07 +0100)]
WHATS_NEW: update

10 months agomake generate
Zdenek Kabelac [Tue, 12 Dec 2023 19:01:16 +0000 (20:01 +0100)]
make generate

10 months agotests: testing creation of compressed thin-pool
Zdenek Kabelac [Wed, 13 Dec 2023 16:37:31 +0000 (17:37 +0100)]
tests: testing creation of compressed thin-pool

10 months agolvmcmdline: support --pooldatavdo
Zdenek Kabelac [Fri, 8 Dec 2023 13:06:25 +0000 (14:06 +0100)]
lvmcmdline: support --pooldatavdo

Extend definitions for lvcreate & lvconvert to support
new option  --pooldatavdo y|n  with thinpools.

10 months agoman: document creation of VDO thin-pool
Zdenek Kabelac [Thu, 14 Dec 2023 22:21:11 +0000 (23:21 +0100)]
man: document creation of VDO thin-pool

Show some examples how to create and convert thin-pools
with VDO volume for thin-pool data.

10 months agovdo: support creation of compressed thin-pools
Zdenek Kabelac [Thu, 14 Dec 2023 13:20:19 +0000 (14:20 +0100)]
vdo: support creation of compressed thin-pools

Add code to handle creation of  thin-pool with VDO data backend
which can be seen as compressed deduplicated thin-pool.

To avoid need of changing to many internal APIs, pass the conversion
parameters for create thin-pool data volume via cmd_context.

10 months agovdo: refactor conversion to vdo lv
Zdenek Kabelac [Thu, 14 Dec 2023 13:06:54 +0000 (14:06 +0100)]
vdo: refactor conversion to vdo lv

Introduce struct vdo_convert_params {} to pass-in all the parameters
needed for the conversion of an LV to a vdopool + vdo LV.

Function convert_vdo_lv() is also able to create a new LV and swap
segments, so the passed in LV can be later on use for futher
conversion so this refactoring makes it ready for more enhanced
usage.

10 months agovdo: refactor vdo_params passing
Zdenek Kabelac [Thu, 14 Dec 2023 13:09:55 +0000 (14:09 +0100)]
vdo: refactor vdo_params passing

Introduce vdo_convert_params and use vdo_params from this structure
also with lvcreate_params.

Later we will use this for convertion of thin-pool data volume to VDO.

10 months agothin_pool: introduce --pooldatavdo
Zdenek Kabelac [Thu, 7 Dec 2023 18:17:35 +0000 (19:17 +0100)]
thin_pool: introduce --pooldatavdo

Introducing new arg --pooldatavdo y|n

10 months agopool: code refactoring
Zdenek Kabelac [Fri, 8 Dec 2023 13:10:39 +0000 (14:10 +0100)]
pool: code refactoring

Move pool related manipulation code to pool_manip.c.

10 months agothin_pool: code refactoring
Zdenek Kabelac [Thu, 7 Dec 2023 17:07:56 +0000 (18:07 +0100)]
thin_pool: code refactoring

Move common code into thin_pool_set_params()
(just like we use  cache_set_params).

10 months agocov: check for failing device_ids_read
Zdenek Kabelac [Fri, 5 Jan 2024 14:23:27 +0000 (15:23 +0100)]
cov: check for failing device_ids_read

TODO: not sure if here we should possibly exit from function.

10 months agocov: remove unneeded header
Zdenek Kabelac [Fri, 5 Jan 2024 12:21:56 +0000 (13:21 +0100)]
cov: remove unneeded header

10 months agocov: some stack tracing corrections
Zdenek Kabelac [Fri, 5 Jan 2024 14:13:42 +0000 (15:13 +0100)]
cov: some stack tracing corrections

Checking some returned values and adding/correcting
some debug tracing.

10 months agolvcreate: support vg profile for error_on_full
Zdenek Kabelac [Fri, 8 Dec 2023 13:04:55 +0000 (14:04 +0100)]
lvcreate: support vg profile for error_on_full

10 months agovdo: flip return value to int
Zdenek Kabelac [Tue, 28 Nov 2023 14:50:59 +0000 (15:50 +0100)]
vdo: flip return value to int

Change API to return just 0/1.

10 months agodev_manager: reuse _setup_task_run
Zdenek Kabelac [Mon, 6 Nov 2023 13:39:30 +0000 (14:39 +0100)]
dev_manager: reuse _setup_task_run

10 months agolv: remove unused declaration
Zdenek Kabelac [Mon, 13 Nov 2023 12:52:44 +0000 (13:52 +0100)]
lv: remove unused declaration

10 months agoactivate: use lv_layer
Zdenek Kabelac [Thu, 9 Nov 2023 14:51:51 +0000 (15:51 +0100)]
activate: use lv_layer

Avoid code duplication.

11 months agoraid: add messages to lvs command output in case RaidLVs require a refresh 1097309350
Heinz Mauelshagen [Wed, 6 Dec 2023 11:58:14 +0000 (12:58 +0100)]
raid: add messages to lvs command output in case RaidLVs require a refresh

If a RaidLV mapping is required to be refreshed as a result of temporarily failed
and recurred RAID leg device (pairs) caused by writes to the LV during failure,
the requirement is reported by volume health character r' in position 9 of the
LV's attribute field (see 'man lvs' about additional volume health characters).

As this character can be overlooked, this patch adds messages to the top
of the lvs command output informing the user explicitely about the fact.

11 months agoman: update readonly description 1096422586
David Teigland [Tue, 5 Dec 2023 18:42:38 +0000 (12:42 -0600)]
man: update readonly description

11 months agoman: add inte(g)rity to man lvs
Lukas Herbolt [Tue, 5 Dec 2023 15:08:24 +0000 (09:08 -0600)]
man: add inte(g)rity to man lvs

11 months agospec: Uncomment some globals 1089423238
Marian Csontos [Wed, 29 Nov 2023 14:26:03 +0000 (15:26 +0100)]
spec: Uncomment some globals

These were incorrectly commented out, after escaping '%' these no longer
compile on some older machines.

11 months agospec: Install and package /etc/lvm/devices 1089393814
Marian Csontos [Wed, 29 Nov 2023 14:09:36 +0000 (15:09 +0100)]
spec: Install and package /etc/lvm/devices

11 months agodmstats: Fix memory leak on error path 1088425690
Marian Csontos [Tue, 28 Nov 2023 20:41:35 +0000 (21:41 +0100)]
dmstats: Fix memory leak on error path

11 months agopost-release 1080205258
Marian Csontos [Tue, 21 Nov 2023 13:38:53 +0000 (14:38 +0100)]
post-release

11 months agopre-release
Marian Csontos [Tue, 21 Nov 2023 13:26:07 +0000 (14:26 +0100)]
pre-release

11 months agomake: generate
Marian Csontos [Thu, 16 Nov 2023 18:35:53 +0000 (19:35 +0100)]
make: generate

11 months agoWHATS_NEW: spelling
Marian Csontos [Wed, 15 Nov 2023 14:34:18 +0000 (15:34 +0100)]
WHATS_NEW: spelling

11 months agoraid: lvcreate and lvchange fail if --min_recovery_rate is defined 1080170876
Heinz Mauelshagen [Tue, 21 Nov 2023 13:17:57 +0000 (14:17 +0100)]
raid: lvcreate and lvchange fail if --min_recovery_rate is defined

Fix typos in previous commit 3589e515d.

Both commands default [raid_](min|max)recoveryrate to 0 but ensure
min_recovery_rate is not larger than max_recoveryrate.  This results
in command failure without requesting the user to also define
max_recovery_rate >= min_recovery_rate.

Fix both commands by defining max_recovery_rate = min_recoveryrate
in case "lvcreate/lvchange --minrecoveryrate Size ..." requests a
larger value than current maxrecoveryrate without also giving option

11 months agoraid: lvcreate and lvchange fail if --min_recovery_rate is defined 1079114472
Heinz Mauelshagen [Mon, 20 Nov 2023 16:05:59 +0000 (17:05 +0100)]
raid: lvcreate and lvchange fail if --min_recovery_rate is defined

Both commands default [raid_](min|max)recoveryrate to 0 but ensure
min_recovery_rate is not larger than max_recoveryrate.  This results
in command failure without requestinng the user to also define
max_recovery_rate >= min_recovery_rate.

Fix both commands by defining max_recovery_rate = min_recoveryrate
in case "lvcreate/lvchange --minrecoveryrate Size ..." requests a
larger value than current maxrecoveryrate without also giving option
"--maxrecoveryrate Size ..." with a size greater or equal than min.

12 months agolvmconfig: uncomment the report section 1076767364
David Teigland [Fri, 17 Nov 2023 19:52:49 +0000 (13:52 -0600)]
lvmconfig: uncomment the report section

so settings can be changed without uncommenting the
start/end of the section.

12 months agoWHATS_NEW: lv_attr for iorig LVs 1076750383
David Teigland [Fri, 17 Nov 2023 19:29:11 +0000 (13:29 -0600)]
WHATS_NEW: lv_attr for iorig LVs

12 months agolvs: set first attr flag for raid integrity images
David Teigland [Fri, 17 Nov 2023 17:04:22 +0000 (11:04 -0600)]
lvs: set first attr flag for raid integrity images

The first lv_attr flag is 'i' or 'I' for a raid image.
(i: raid image, I: out of sync raid image)
For integrity raid images (_iorig), the flag was not being set.

12 months agoWHATS_NEW: pvs -A 1075082744
David Teigland [Thu, 16 Nov 2023 14:46:23 +0000 (08:46 -0600)]
WHATS_NEW: pvs -A

12 months agopvs, pvscan: new option -A to show PVs outside the devices file
David Teigland [Fri, 10 Nov 2023 22:24:45 +0000 (16:24 -0600)]
pvs, pvscan: new option -A to show PVs outside the devices file

pvs -A|--allpvs
Show PVs that would otherwise be excluded by the devices file.

pvscan -A|--allpvs
Show PVs that would otherwise be excluded by the devices file.
For those devices that are included by the devices file,
their device ID is displayed in place of the usual "lvm2"
format and size.

(pvs -a|--all is unchanged, and shows devices not formatted as PVs.)

12 months agomake: generate 1073419502
Marian Csontos [Wed, 15 Nov 2023 12:35:52 +0000 (13:35 +0100)]
make: generate

12 months agoWHATS_NEW: update
Marian Csontos [Wed, 15 Nov 2023 12:35:10 +0000 (13:35 +0100)]
WHATS_NEW: update

Remove stray line

12 months agospec: Fix spec file to work with mock 1073156117
Marian Csontos [Tue, 26 Sep 2023 13:34:21 +0000 (15:34 +0200)]
spec: Fix spec file to work with mock

- missing BuildRequires

diff --git a/spec/source.inc b/spec/source.inc
index 7b44ef152..b04c500a2 100644
--- a/spec/source.inc
+++ b/spec/source.inc
@@ -12,8 +12,8 @@
 %global enable_lvmlockd 1
 %global enable_lvmpolld 1
 %global enable_dmfilemapd 0
-#%global enable_lvmlockd_dlm 0
-#%global enable_lvmlockd_sanlock 0
+#%%global enable_lvmlockd_dlm 0
+#%%global enable_lvmlockd_sanlock 0

 %if %{enable_udev}
 %service lvmpolld 1
@@ -43,7 +43,8 @@
 %with writecache internal
 %with integrity internal

-%global buildreq_udev systemd-devel
+# NOTE: Required by fedora 38+, maybe older
+%global buildreq_udev systemd-devel, systemd-units
 %global req_udev udev >= 181-1

@@ -60,15 +61,12 @@
  %global sanlock_version 3.3.0-1
  %global enable_lvmlockd_dlm 1
  %global enable_lvmlockd_sanlock 1
+ # FIXME: Check these conditions against RHEL builds!
  %if %{rhel}
-  %ifarch i686 x86_64 s390x
-   %global buildreq_lvmlockd_dlm dlm-devel >= %{dlm_version}
-  %else
+  %ifnarch i686 x86_64 s390x
    %global enable_lvmlockd_dlm 0
   %endif
-  %ifarch x86_64 ppc64le ppc64 aarch64
-   %global buildreq_lvmlockd_sanlock sanlock-devel >= %{sanlock_version}
-  %else
+  %ifnarch x86_64 ppc64le ppc64 aarch64
    %global enable_lvmlockd_sanlock 0
   %endif
  %endif
@@ -78,6 +76,12 @@
   %global enable_lvmlockd_dlm 1
  %endif
 %endif
+%if 0%{enable_lvmlockd_dlm}
+ %global buildreq_lvmlockd_dlm dlm-devel >= %{dlm_version}
+%endif
+%if 0%{enable_lvmlockd_sanlock}
+ %global buildreq_lvmlockd_sanlock sanlock-devel >= %{sanlock_version}
+%endif

 ##############################################################

@@ -164,6 +168,11 @@ Source92: build.inc
 Source93: packages.inc
 Source94: macros.inc

+BuildRequires: make
+BuildRequires: gcc
+%if %{enable_testsuite}
+BuildRequires: gcc-c++
+%endif
 BuildRequires: libselinux-devel >= 1.30.19-4, libsepol-devel
 BuildRequires: ncurses-devel
 %if %{enable_readline}
@@ -174,6 +183,9 @@ BuildRequires: libedit-devel
 %endif
 BuildRequires: module-init-tools
 BuildRequires: pkgconfig
+# TODO: Should these be conditional?
+BuildRequires: libaio-devel
+BuildRequires: libblkid-devel

 # Expands to nothing unless at least 2 arguments are given
 %define maybe() \
@@ -189,6 +201,8 @@ BuildRequires: pkgconfig
 %maybe BuildRequires: %{?buildreq_lvmlockd_sanlock}
 %maybe BuildRequires: %{?buildreq_python3_devel}
 %maybe BuildRequires: %{?buildreq_python3_setuptools}
+%maybe BuildRequires: %{?buildreq_python3_dbus}
+%maybe BuildRequires: %{?buildreq_python3_pyudev}

 %description
 LVM2 includes all of the support for handling read/write operations on

12 months agoWHATS_NEW: update
Marian Csontos [Wed, 15 Nov 2023 09:37:18 +0000 (10:37 +0100)]
WHATS_NEW: update

12 months agodevice: remove log_debug for nvme device 1067244130
David Teigland [Thu, 9 Nov 2023 19:31:01 +0000 (13:31 -0600)]
device: remove log_debug for nvme device

12 months agodevice_id: remove unused dev pointer from dev_id struct 1067230115
David Teigland [Thu, 9 Nov 2023 19:12:33 +0000 (13:12 -0600)]
device_id: remove unused dev pointer from dev_id struct

12 months agodevice_id: ensure pvid buffers are ID_LEN+1
David Teigland [Wed, 8 Nov 2023 17:46:38 +0000 (11:46 -0600)]
device_id: ensure pvid buffers are ID_LEN+1

A pvid string read from system.devices could be less
then ID_LEN since system.devices fields can be edited.
Ensure the pvid buffer is ID_LEN+1 even if the string
read from the file is shorter.

12 months agodevice_id: improve searched_devnames temp file
David Teigland [Thu, 2 Nov 2023 19:54:31 +0000 (14:54 -0500)]
device_id: improve searched_devnames temp file

Include info in the temp file to confirm that it should be used.
The temp file is meant to suppress repeated, identical searches
for the same PVIDs on the same set of devices.  Write to the file
a count and hash of the missing PVIDs and a count and hash of the
devices to search.  A subsequent command will ignore and remove
the temp file if any of these values differ.  We don't want to
suppress a search if a change has occured, and a missing PV could
be found by scanning devices.

12 months agolvmdevices: print changes for product_uuid or hostname 1064341461
David Teigland [Tue, 7 Nov 2023 20:30:48 +0000 (14:30 -0600)]
lvmdevices: print changes for product_uuid or hostname

used by the recently added refresh feature

12 months agolvmdevices: handle empty fields in new check and update 1060752941
David Teigland [Fri, 3 Nov 2023 20:15:59 +0000 (15:15 -0500)]
lvmdevices: handle empty fields in new check and update

Expand the recent commit 37773c1055913
"lvmdevices: new output and options for check and update"
to specifically cover entries with empty fields.

12 months agodevice_id: change default search_for_devnames to all 1059322176
David Teigland [Thu, 2 Nov 2023 17:10:56 +0000 (12:10 -0500)]
device_id: change default search_for_devnames to all

Problematic scenario:
. the device for a PV has no wwid, so it's identified in system.devices
  with IDTYPE=devname IDNAME=/dev/foo
. user adds/enables a wwid for the device
. on reboot, the device name changes, e.g. now /dev/bar
. the code that searches for the new device name includes an
  optimization to skip looking on devs that have a wwid, on
  the basis that a device with a wwid won't have IDTYPE=devname
. this optimization causes lvm to not look for the PV on /dev/bar
  since that device now has a wwid, so the PV is not found
. the optimization is enabled by search_for_devnames="auto"
. change the default to search_for_devnames="all" which does not
  use the problematic optimization

12 months agolvmdevices: new output and options for check and update 1059238271
David Teigland [Fri, 27 Oct 2023 22:39:32 +0000 (17:39 -0500)]
lvmdevices: new output and options for check and update

- add new comparison between old and new entries, and use this
  as the basis for new dedicated output for check and update
- add new --refresh option to search for missing PVIDs on all
  devices, and possibly update the device ID
- internally, only use the term "refresh" for cases where a
  new device ID may be found and assigned for a missing PVID

12 months agodevice_id: improve validate debug messages
David Teigland [Fri, 27 Oct 2023 22:13:25 +0000 (17:13 -0500)]
device_id: improve validate debug messages

Make the device_ids_validate messages consistent.

Consistently use "noupdate" and "update_needed" args.

12 months agodevice_id: reduce messages
David Teigland [Tue, 24 Oct 2023 21:39:15 +0000 (16:39 -0500)]
device_id: reduce messages

Don't print messages about devices file entries that are
missing or are being updated.

12 months agoREADME: update with new list info 1056712015
Zdenek Kabelac [Tue, 31 Oct 2023 18:07:47 +0000 (19:07 +0100)]
README: update with new list info

Server is changed for linux-lvm and lvm-devel mailing lists.

12 months agotests: unit test for raid status
Zdenek Kabelac [Thu, 26 Oct 2023 20:02:54 +0000 (22:02 +0200)]
tests: unit test for raid status

12 months agotests: longer timeout
Zdenek Kabelac [Thu, 26 Oct 2023 19:58:55 +0000 (21:58 +0200)]
tests: longer timeout

12 months agotests: lvmdbusd handles empty LvCommon.Devices
Tony Asleson [Wed, 25 Oct 2023 20:08:12 +0000 (15:08 -0500)]
tests: lvmdbusd handles empty LvCommon.Devices

During vdo testing with smaller block devices the test needs to determine
which PVs in a VG are unused.  This was leveraging LvCommon.Devices, but
that isn't populated when a LV is resides on a LV pool instead of a PV.
This is a known limitation of the code at this time.  For now we will walk
all the PVs in the VG looking for ones that don't have any associated LVs
and use them instead.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
12 months agodevice_mapper: raid status handle all a chars
Zdenek Kabelac [Thu, 26 Oct 2023 19:57:59 +0000 (21:57 +0200)]
device_mapper: raid status handle all a chars

When getting raid status from some older kernels, we may get an 'a'
for 'A' leg when doing initial synchronization.
This may prohibit removal of newly synchronized leg until synchronization
is finished.
So in this case change the status to look like being reported
from a newer kernel version.

12 months agotests: add devicesfile-misc 1046737321
David Teigland [Mon, 23 Oct 2023 19:29:14 +0000 (14:29 -0500)]
tests: add devicesfile-misc

12 months agodevice_id: simplify devname matching
David Teigland [Mon, 23 Oct 2023 19:27:36 +0000 (14:27 -0500)]
device_id: simplify devname matching

Handle this case directly rather than going through the
process for reading other device ids.  Also simplify
matching alternate dm devnames.

12 months agodevice_id: no idname should be NULL not empty string
David Teigland [Tue, 17 Oct 2023 21:49:30 +0000 (16:49 -0500)]
device_id: no idname should be NULL not empty string

One place was setting idname to "" instead of NULL when
there was no idname value.

12 months agodevice_id: first match non-devname device ids
David Teigland [Tue, 17 Oct 2023 18:54:31 +0000 (13:54 -0500)]
device_id: first match non-devname device ids

Incorrectly matching a dev to a devname id (due to changing devnames)
before matching the dev to a proper device id, can result in the
dev not being matched to the real id.

12 months agolibdm: report: fix invalid JSON if using DM_REPORT_OUTPUT_MULTIPLE_TIMES and selection 1046171620
Peter Rajnoha [Mon, 23 Oct 2023 11:56:55 +0000 (13:56 +0200)]
libdm: report: fix invalid JSON if using DM_REPORT_OUTPUT_MULTIPLE_TIMES and selection

When reporting in JSON format, we need to be able to find the 'last
displayed row', not just 'last row' as we did before. This is used
to decide whether to put the JSON_SEPARATOR (the ',' character)
between the lines when reporting in JSON format.

This is mainly important in case we use a combination of JSON format
and a report marked with DM_REPORT_OUTPUT_MULTIPLE_TIMES flag.
Such report may be reused several times with different selection
criteria each time. In that case, the report always contains all lines
in memory, even though some of them do not need to pass the selection
criteria that are currently used.

Without DM_REPORT_OUTPUT_MULTIPLE_TIMES flag, the report only contains
the lines that have passed the selection criteria, so the this wasn't
an issue in this case.

Fix suggested by Lars Ellenberg and reported here: https://github.com/lvmteam/lvm2/issues/130

13 months agotypo: update 1043152934
Zdenek Kabelac [Thu, 19 Oct 2023 20:05:11 +0000 (22:05 +0200)]
typo: update

13 months agotests: longer delay between table reloads
Zdenek Kabelac [Thu, 19 Oct 2023 22:02:44 +0000 (00:02 +0200)]
tests: longer delay between table reloads

It looks like there is some kernel bug/limitation
that may cause invalid table load processing:

dmsetup load LVMTEST-LV1
device-mapper: reload ioctl on LVMTEST-LV1  failed: Invalid argument
  md/raid:mdX: reshape_position too early for auto-recovery - aborting.
           md: pers->run() failed ...
device-mapper: table: 253:38: raid: Failed to run raid array (-EINVAL)
device-mapper: ioctl: error adding target to table

However ATM there is not much we can do then make delays bigger.
TODO: fixing md core...

13 months agotests: skip on problematic kernel
Zdenek Kabelac [Wed, 18 Oct 2023 11:35:08 +0000 (13:35 +0200)]
tests: skip on problematic kernel

13 months agolvconvert: fix "lvconvert -m 0" for in-sync legs
Heinz Mauelshagen [Thu, 19 Oct 2023 14:50:01 +0000 (16:50 +0200)]
lvconvert: fix "lvconvert -m 0" for in-sync legs

With commit d7e922480e04ecfb7c4d8b2d42533699ddef5c34
lvconvert -m   may fail if we try to remove 1st. leg that
is out-of-sync while other leg is in-sync.

Hot fix allows to proceed with such down conversion.

Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
13 months agofilters: fix condition 1040436447
Zdenek Kabelac [Wed, 18 Oct 2023 00:19:15 +0000 (02:19 +0200)]
filters: fix condition

During revork in commit cf46f4baeeaba5f79982e651c1c36c15476f7329
condition was inverted, the check for non-null string is needed.

13 months agotests: aux kills lvmdbusd more agressively 1040416585
Zdenek Kabelac [Tue, 17 Oct 2023 23:48:50 +0000 (01:48 +0200)]
tests: aux kills lvmdbusd more agressively

It's not exactly trivial to kill 'frozen' lvmdbusd.
So skip the test testing interruption and also add killall use.

13 months agotests: wait till snapshot merge is finished
Zdenek Kabelac [Tue, 17 Oct 2023 23:47:13 +0000 (01:47 +0200)]
tests: wait till snapshot merge is finished

In case test runs with lvmpolld (and lvmlockd) wait till snapshot
merge is finished.

13 months agotests: init of dmevent may take upto a second
Zdenek Kabelac [Tue, 17 Oct 2023 21:24:03 +0000 (23:24 +0200)]
tests: init of dmevent may take upto a second

Dynamic load of plugins takes a while...

13 months agotests: avoid busy looping 1039938507
Zdenek Kabelac [Tue, 17 Oct 2023 14:45:10 +0000 (16:45 +0200)]
tests: avoid busy looping

While waiting for the change, don't busy loop on CPU.
TODO: fix missing notification about device removal.

13 months agotests: ensure file is removed
Zdenek Kabelac [Tue, 17 Oct 2023 11:05:09 +0000 (13:05 +0200)]
tests: ensure file is removed

Make sure there are no previous loop results.

13 months agolvm: fix reporting path with HOME envvar
Zdenek Kabelac [Mon, 16 Oct 2023 10:57:41 +0000 (12:57 +0200)]
lvm: fix reporting path with HOME envvar

When envvar HOME is not present we were using invalid path with (null).

13 months agomake: generate
Zdenek Kabelac [Tue, 17 Oct 2023 14:48:50 +0000 (16:48 +0200)]
make: generate

13 months agodevice_id: make dmeventd use system.devices by default 1038717006
David Teigland [Mon, 2 Oct 2023 22:15:44 +0000 (17:15 -0500)]
device_id: make dmeventd use system.devices by default

When no dmeventd.devices exists, make it use system.devices
rather than no devices file at all.

13 months agodevice_id: accept wwids containing QEMU HARDDISK
David Teigland [Mon, 16 Oct 2023 20:11:29 +0000 (15:11 -0500)]
device_id: accept wwids containing QEMU HARDDISK

A wwid may be useful even when it contains the string
"QEMU HARDDISK", so allow these to be used.

13 months agodevice_id: improve handling of non-standard wwid prefixes
David Teigland [Mon, 16 Oct 2023 20:09:17 +0000 (15:09 -0500)]
device_id: improve handling of non-standard wwid prefixes

13 months agohints: correct fix for hints with device ids 1038649998
David Teigland [Mon, 16 Oct 2023 19:08:28 +0000 (14:08 -0500)]
hints: correct fix for hints with device ids

Fixes commit 63b469c1609fe5d3395b7757eebaf35a4a77ea7a
"device_id: fix hints with device ids"

It's not correct for internal filtering to be a factor
in validating the set of devs that are the basis for hints.

Instead, look for inconsistencies between a hint entry and
the corresponding devices file entry.

13 months agotests: aux mdadm_assemble skip path 1037427774
Zdenek Kabelac [Sun, 15 Oct 2023 22:11:35 +0000 (00:11 +0200)]
tests: aux mdadm_assemble skip path

If the old mdadm fails to assembly array due to its internal buggy logic
skip the test instead of failure.

13 months agotests: simplify line counting
Zdenek Kabelac [Sun, 15 Oct 2023 19:47:36 +0000 (21:47 +0200)]
tests: simplify line counting

No need for pipes

13 months agotests: better synchronization
Zdenek Kabelac [Sun, 15 Oct 2023 19:42:20 +0000 (21:42 +0200)]
tests: better synchronization

13 months agotests: fsck with yes
Zdenek Kabelac [Sun, 15 Oct 2023 17:51:43 +0000 (19:51 +0200)]
tests: fsck with yes

Fsck may need to update metadata even after clean unmount.

13 months agotests: check for blkid 1037198448
Zdenek Kabelac [Sun, 15 Oct 2023 12:43:13 +0000 (14:43 +0200)]
tests: check for blkid

When libblkid is not present (older systems) we can't use new -fs tests at
all so skip these tests.

This page took 0.07116 seconds and 5 git commands to generate.