From 139c21e7218950e265fec521fa200df53ef3d77d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 24 Nov 2023 16:10:55 +0100 Subject: [PATCH] Sync from SUSE:ALP:Source:Standard:1.0 lvm2 revision c1fe59233555732fb21e7002bbe64eab --- .gitattributes | 23 + ...rt-swapmetadata-fix-lvmlockd-locking.patch | 96 + ...-fix-ret-values-fro-integrity-remove.patch | 105 + ...t-fix-regresion-from-integrity-check.patch | 29 + 0004-gcc-cleanup-warnings.patch | 103 + ...ockd-fix-thick-to-thin-lv-conversion.patch | 379 ++ ...let-lockd_init_lv_args-set-lock_args.patch | 63 + ...-lvmlockd-fix-lvconvert-to-thin-pool.patch | 97 + ...n-error-path-code-only-for-shared-VG.patch | 34 + ...ire-an-exclusive-VG-lock-for-refresh.patch | 30 + 0010-lvmlockd-client-mutex-ordering.patch | 40 + ...ilesystem-move-stat-after-open-check.patch | 57 + 0012-tests-check-for-writecache.patch | 49 + ...-32-bit-overflow-in-size-calculation.patch | 34 + ...cc-fix-warnings-for-x32-architecture.patch | 44 + ...ng-missing-braces-around-initializer.patch | 26 + 0016-test-improve-aux-teardown.patch | 53 + 0017-tests-aux-try-with-extra-sleep.patch | 26 + 0018-tests-aux-using-singl-lvmconf-call.patch | 27 + ...sing-to-check-for-writecache-support.patch | 49 + 0020-tests-pvmove-large-disk-area.patch | 40 + 0021-tests-enforce-full-fs-check.patch | 25 + ...ate-for-work-in-fake-dev-environment.patch | 588 +++ ...est-when-lvmdbusd-runs-on-the-system.patch | 27 + 0024-tests-better-slowdown.patch | 38 + LVM2.2.03.22.tgz | 3 + LVM2.2.03.22.tgz.asc | 16 + _multibuild | 4 + baselibs.conf | 7 + ...ecial-case-for-md-in-69-dm-lvm-rules.patch | 66 + ...ompliling-daemons-lvmlockd-directory.patch | 47 + bug-1184124-link-tests-as-PIE.patch | 12 + ...1184687_Add-nolvm-for-kernel-cmdline.patch | 46 + ...blkdeactivate_calls_wrong_mountpoint.patch | 20 + ..._dmeventd-fix-dso-name-wrong-compare.patch | 36 + ...make_pvscan_service_after_multipathd.patch | 23 + ...rd_remove_date_time_from_compilation.patch | 16 + fate-309425_display-dm-name-for-lv-name.patch | 56 + ...ort-to-resize-check-btrfs-filesystem.patch | 191 + fate-31841-02_man-add-support-for-btrfs.patch | 38 + ...ts-new-test-suite-of-fsadm-for-btrfs.patch | 205 ++ lvm.conf | 2465 +++++++++++++ lvm2-rpmlintrc | 1 + lvm2.changes | 3208 +++++++++++++++++ lvm2.spec | 819 +++++ 45 files changed, 9361 insertions(+) create mode 100644 .gitattributes create mode 100644 0001-lvconvert-swapmetadata-fix-lvmlockd-locking.patch create mode 100644 0002-lvconvert-fix-ret-values-fro-integrity-remove.patch create mode 100644 0003-lvconvert-fix-regresion-from-integrity-check.patch create mode 100644 0004-gcc-cleanup-warnings.patch create mode 100644 0005-lvmlockd-fix-thick-to-thin-lv-conversion.patch create mode 100644 0006-lvmlockd-let-lockd_init_lv_args-set-lock_args.patch create mode 100644 0007-lvmlockd-fix-lvconvert-to-thin-pool.patch create mode 100644 0008-lvconvert-run-error-path-code-only-for-shared-VG.patch create mode 100644 0009-vgchange-acquire-an-exclusive-VG-lock-for-refresh.patch create mode 100644 0010-lvmlockd-client-mutex-ordering.patch create mode 100644 0011-filesystem-move-stat-after-open-check.patch create mode 100644 0012-tests-check-for-writecache.patch create mode 100644 0013-lvresize-fix-32-bit-overflow-in-size-calculation.patch create mode 100644 0014-gcc-fix-warnings-for-x32-architecture.patch create mode 100644 0015-gcc-warning-missing-braces-around-initializer.patch create mode 100644 0016-test-improve-aux-teardown.patch create mode 100644 0017-tests-aux-try-with-extra-sleep.patch create mode 100644 0018-tests-aux-using-singl-lvmconf-call.patch create mode 100644 0019-tests-missing-to-check-for-writecache-support.patch create mode 100644 0020-tests-pvmove-large-disk-area.patch create mode 100644 0021-tests-enforce-full-fs-check.patch create mode 100644 0022-tests-update-for-work-in-fake-dev-environment.patch create mode 100644 0023-tests-skip-test-when-lvmdbusd-runs-on-the-system.patch create mode 100644 0024-tests-better-slowdown.patch create mode 100644 LVM2.2.03.22.tgz create mode 100644 LVM2.2.03.22.tgz.asc create mode 100644 _multibuild create mode 100644 baselibs.conf create mode 100644 bug-1012973_simplify-special-case-for-md-in-69-dm-lvm-rules.patch create mode 100644 bug-1037309_Makefile-skip-compliling-daemons-lvmlockd-directory.patch create mode 100644 bug-1184124-link-tests-as-PIE.patch create mode 100644 bug-1184687_Add-nolvm-for-kernel-cmdline.patch create mode 100644 bug-1214071-blkdeactivate_calls_wrong_mountpoint.patch create mode 100644 bug-935623_dmeventd-fix-dso-name-wrong-compare.patch create mode 100644 bug-998893_make_pvscan_service_after_multipathd.patch create mode 100644 cmirrord_remove_date_time_from_compilation.patch create mode 100644 fate-309425_display-dm-name-for-lv-name.patch create mode 100644 fate-31841-01_fsadm-add-support-to-resize-check-btrfs-filesystem.patch create mode 100644 fate-31841-02_man-add-support-for-btrfs.patch create mode 100644 fate-31841-03_tests-new-test-suite-of-fsadm-for-btrfs.patch create mode 100644 lvm.conf create mode 100644 lvm2-rpmlintrc create mode 100644 lvm2.changes create mode 100644 lvm2.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fecc750 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/0001-lvconvert-swapmetadata-fix-lvmlockd-locking.patch b/0001-lvconvert-swapmetadata-fix-lvmlockd-locking.patch new file mode 100644 index 0000000..171446d --- /dev/null +++ b/0001-lvconvert-swapmetadata-fix-lvmlockd-locking.patch @@ -0,0 +1,96 @@ +From ff0a8d7b6734c745e52652fc5e7dd3a0f2efb518 Mon Sep 17 00:00:00 2001 +From: David Teigland +Date: Tue, 8 Aug 2023 16:57:22 -0500 +Subject: [PATCH 01/24] lvconvert swapmetadata: fix lvmlockd locking + +The lockd lock needs to be freed for the LV that is becoming +the new metadata LV, and a new lockd lock needs to be created +for the old metadata LV that is becoming an independent LV. +Fixes b3e45219c2f4 +--- + tools/lvconvert.c | 45 +++++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 43 insertions(+), 2 deletions(-) + +diff --git a/tools/lvconvert.c b/tools/lvconvert.c +index 0004422f2..49047abb0 100644 +--- a/tools/lvconvert.c ++++ b/tools/lvconvert.c +@@ -2818,6 +2818,9 @@ static int _lvconvert_swap_pool_metadata(struct cmd_context *cmd, + struct lv_type *lvtype; + char meta_name[NAME_LEN]; + const char *swap_name; ++ char *lockd_meta_args = NULL; ++ char *lockd_meta_name = NULL; ++ struct id lockd_meta_id; + uint32_t chunk_size; + int is_thinpool; + int is_cachepool; +@@ -2872,6 +2875,12 @@ static int _lvconvert_swap_pool_metadata(struct cmd_context *cmd, + if (!lockd_lv(cmd, lv, "ex", 0)) + return 0; + ++ /* If new metadata LV is inactive here, ensure it's not active elsewhere */ ++ if (!lockd_lv(cmd, metadata_lv, "ex", 0)) { ++ log_error("New pool metadata LV %s cannot be locked.", display_lvname(metadata_lv)); ++ return 0; ++ } ++ + if (!deactivate_lv(cmd, metadata_lv)) { + log_error("Aborting. Failed to deactivate %s.", + display_lvname(metadata_lv)); +@@ -2883,8 +2892,22 @@ static int _lvconvert_swap_pool_metadata(struct cmd_context *cmd, + return 0; + } + +- metadata_lv->lock_args = NULL; +- ++ /* ++ * metadata_lv is currently an independent LV with its own lockd lock allocated. ++ * A pool metadata LV does not have its own lockd lock (only the pool LV does.) ++ * So, when metadata_lv is added to the thin pool, it's lock needs to be freed. ++ * Save info about the metadata_lv here that will be used to free the lock. ++ * The current pool metadata LV does not currently have its own lockd lock ++ * allocated, and once it becomes an independent LV it will need its own lock. ++ * (see setting prev_metadata_lv->lock_args below.) ++ */ ++ if (vg_is_shared(vg) && metadata_lv->lock_args) { ++ lockd_meta_args = dm_pool_strdup(cmd->mem, metadata_lv->lock_args); ++ lockd_meta_name = dm_pool_strdup(cmd->mem, metadata_lv->name); ++ memcpy(&lockd_meta_id, &metadata_lv->lvid.id[1], sizeof(struct id)); ++ /* Without lock_args, a lock will no longer be acquired for this LV. */ ++ metadata_lv->lock_args = NULL; ++ } + + seg = first_seg(lv); + +@@ -2950,9 +2973,27 @@ static int _lvconvert_swap_pool_metadata(struct cmd_context *cmd, + if (!attach_pool_metadata_lv(seg, metadata_lv)) + return_0; + ++ /* ++ * The previous metadata LV will now be an independent LV so it now ++ * requires a lockd lock. We could call lockd_init_lv_args() directly ++ * here, but reuse the existing code in vg_write() to be consistent ++ * with the way lvcreate allocates locks. ++ */ ++ if (is_lockd_type(vg->lock_type)) { ++ if (!strcmp(vg->lock_type, "sanlock")) ++ prev_metadata_lv->lock_args = "pending"; ++ else if (!strcmp(vg->lock_type, "dlm")) ++ prev_metadata_lv->lock_args = "dlm"; ++ else if (!strcmp(vg->lock_type, "idm")) ++ prev_metadata_lv->lock_args = "idm"; ++ } ++ + if (!vg_write(vg) || !vg_commit(vg)) + return_0; + ++ if (lockd_meta_name) ++ lockd_free_lv(cmd, vg, lockd_meta_name, &lockd_meta_id, lockd_meta_args); ++ + return 1; + } + +-- +2.35.3 + diff --git a/0002-lvconvert-fix-ret-values-fro-integrity-remove.patch b/0002-lvconvert-fix-ret-values-fro-integrity-remove.patch new file mode 100644 index 0000000..6488b19 --- /dev/null +++ b/0002-lvconvert-fix-ret-values-fro-integrity-remove.patch @@ -0,0 +1,105 @@ +From b982d9ac56a709f1ffcdfb052029556bd8d56635 Mon Sep 17 00:00:00 2001 +From: Zdenek Kabelac +Date: Wed, 9 Aug 2023 13:02:13 +0200 +Subject: [PATCH 02/24] lvconvert: fix ret values fro integrity remove + +Fix return value from _lvconvert_integrity_remove() +as it is expected to match _add() and be 0/1. + +Also add some missing log_error() messages. +--- + tools/lvconvert.c | 42 +++++++++++++++++++++++------------------- + 1 file changed, 23 insertions(+), 19 deletions(-) + +diff --git a/tools/lvconvert.c b/tools/lvconvert.c +index 49047abb0..c25c87db4 100644 +--- a/tools/lvconvert.c ++++ b/tools/lvconvert.c +@@ -6410,24 +6410,26 @@ int lvconvert_to_cache_with_cachevol_cmd(struct cmd_context *cmd, int argc, char + + static int _lvconvert_integrity_remove(struct cmd_context *cmd, struct logical_volume *lv) + { +- int ret = 0; +- +- if (!lv_is_integrity(lv) && !lv_is_raid(lv)) { ++ if (!lv_is_integrity(lv)) { + log_error("LV does not have integrity."); +- return ECMD_FAILED; ++ return 0; ++ } ++ ++ if (!lv_is_raid(lv)) { ++ log_error("Cannot remove integrity from non raid type LV %s.", ++ display_lvname(lv)); ++ return 0; + } + + /* ensure it's not active elsewhere. */ + if (!lockd_lv(cmd, lv, "ex", 0)) +- return_ECMD_FAILED; ++ return_0; + +- if (lv_is_raid(lv)) +- ret = lv_remove_integrity_from_raid(lv); +- if (!ret) +- return_ECMD_FAILED; ++ if (!lv_remove_integrity_from_raid(lv)) ++ return_0; + + log_print_unless_silent("Logical volume %s has removed integrity.", display_lvname(lv)); +- return ECMD_PROCESSED; ++ return 1; + } + + static int _lvconvert_integrity_add(struct cmd_context *cmd, struct logical_volume *lv, +@@ -6435,7 +6437,6 @@ static int _lvconvert_integrity_add(struct cmd_context *cmd, struct logical_volu + { + struct volume_group *vg = lv->vg; + struct dm_list *use_pvh; +- int ret = 0; + + /* ensure it's not active elsewhere. */ + if (!lockd_lv(cmd, lv, "ex", 0)) +@@ -6453,9 +6454,13 @@ static int _lvconvert_integrity_add(struct cmd_context *cmd, struct logical_volu + return 0; + } + +- if (lv_is_raid(lv)) +- ret = lv_add_integrity_to_raid(lv, set, use_pvh, NULL); +- if (!ret) ++ if (!lv_is_raid(lv)) { ++ log_error("Cannot add integrity to non raid type LV %s.", ++ display_lvname(lv)); ++ return 0; ++ } ++ ++ if (!lv_add_integrity_to_raid(lv, set, use_pvh, NULL)) + return_0; + + log_print_unless_silent("Logical volume %s has added integrity.", display_lvname(lv)); +@@ -6466,10 +6471,8 @@ static int _lvconvert_integrity_single(struct cmd_context *cmd, + struct logical_volume *lv, + struct processing_handle *handle) + { +- struct integrity_settings settings; +- int ret = 0; +- +- memset(&settings, 0, sizeof(settings)); ++ struct integrity_settings settings = { 0 }; ++ int ret; + + if (!integrity_mode_set(arg_str_value(cmd, raidintegritymode_ARG, NULL), &settings)) + return_ECMD_FAILED; +@@ -6483,7 +6486,8 @@ static int _lvconvert_integrity_single(struct cmd_context *cmd, + ret = _lvconvert_integrity_remove(cmd, lv); + + if (!ret) +- return ECMD_FAILED; ++ return_ECMD_FAILED; ++ + return ECMD_PROCESSED; + } + +-- +2.35.3 + diff --git a/0003-lvconvert-fix-regresion-from-integrity-check.patch b/0003-lvconvert-fix-regresion-from-integrity-check.patch new file mode 100644 index 0000000..41af75f --- /dev/null +++ b/0003-lvconvert-fix-regresion-from-integrity-check.patch @@ -0,0 +1,29 @@ +From 5829b341ea6826d70772af941859359475976b40 Mon Sep 17 00:00:00 2001 +From: Zdenek Kabelac +Date: Tue, 15 Aug 2023 23:06:29 +0200 +Subject: [PATCH 03/24] lvconvert: fix regresion from integrity check + +Testing code sliped into commit and cause regression in testing for +a raid with integrity. +--- + tools/lvconvert.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tools/lvconvert.c b/tools/lvconvert.c +index c25c87db4..6d2abb2e7 100644 +--- a/tools/lvconvert.c ++++ b/tools/lvconvert.c +@@ -6410,8 +6410,8 @@ int lvconvert_to_cache_with_cachevol_cmd(struct cmd_context *cmd, int argc, char + + static int _lvconvert_integrity_remove(struct cmd_context *cmd, struct logical_volume *lv) + { +- if (!lv_is_integrity(lv)) { +- log_error("LV does not have integrity."); ++ if (!lv_is_integrity(lv) && !lv_is_raid(lv)) { ++ log_error("LV %s does not have integrity.", display_lvname(lv)); + return 0; + } + +-- +2.35.3 + diff --git a/0004-gcc-cleanup-warnings.patch b/0004-gcc-cleanup-warnings.patch new file mode 100644 index 0000000..91ca22b --- /dev/null +++ b/0004-gcc-cleanup-warnings.patch @@ -0,0 +1,103 @@ +From 2cd58bb4c9ef063c5283daf0e618c2ed0c77eb89 Mon Sep 17 00:00:00 2001 +From: Zdenek Kabelac +Date: Wed, 16 Aug 2023 15:12:36 +0200 +Subject: [PATCH 04/24] gcc: cleanup warnings + +Correcting signess comparation. +Also use standalone /* fall through */ comment as that's +the only one supported by gcc to quiet warning. +--- + daemons/cmirrord/local.c | 2 +- + lib/metadata/metadata.c | 2 +- + libdm/datastruct/bitset.c | 3 ++- + tools/lvconvert.c | 2 +- + tools/lvmcmdline.c | 6 +++--- + 5 files changed, 8 insertions(+), 7 deletions(-) + +diff --git a/daemons/cmirrord/local.c b/daemons/cmirrord/local.c +index d0a25e105..27396ad98 100644 +--- a/daemons/cmirrord/local.c ++++ b/daemons/cmirrord/local.c +@@ -266,7 +266,7 @@ static int do_local_work(void *data __attribute__((unused))) + RQ_TYPE(u_rq->request_type)); + break; + } +- /* ELSE, fall through */ ++ /* ELSE */ /* fall through */ + case DM_ULOG_IS_CLEAN: + case DM_ULOG_FLUSH: + case DM_ULOG_MARK_REGION: +diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c +index 819c6fd9a..f56b5002d 100644 +--- a/lib/metadata/metadata.c ++++ b/lib/metadata/metadata.c +@@ -1133,7 +1133,7 @@ uint32_t extents_from_percent_size(struct volume_group *vg, const struct dm_list + } + break; + } +- /* fall through to use all PVs in VG like %FREE */ ++ /* fall through */ /* to use all PVs in VG like %FREE */ + case PERCENT_FREE: + if (!(extents = vg->free_count)) { + log_error("No free extents in Volume group %s.", vg->name); +diff --git a/libdm/datastruct/bitset.c b/libdm/datastruct/bitset.c +index 220ea2f26..25407f521 100644 +--- a/libdm/datastruct/bitset.c ++++ b/libdm/datastruct/bitset.c +@@ -149,7 +149,8 @@ dm_bitset_t dm_bitset_parse_list(const char *str, struct dm_pool *mem, + size_t min_num_bits) + { + unsigned a, b; +- int c, old_c, totaldigits, ndigits, nmaskbits; ++ int c, old_c, totaldigits, ndigits; ++ size_t nmaskbits; + int at_start, in_range; + dm_bitset_t mask = NULL; + const char *start = str; +diff --git a/tools/lvconvert.c b/tools/lvconvert.c +index 6d2abb2e7..d98d34ce0 100644 +--- a/tools/lvconvert.c ++++ b/tools/lvconvert.c +@@ -1352,7 +1352,7 @@ static int _lvconvert_raid(struct logical_volume *lv, struct lvconvert_params *l + else + image_count = lp->mirrors + 1; + +- images_reduced = (image_count < lv_raid_image_count(lv)); ++ images_reduced = (image_count < (int) lv_raid_image_count(lv)); + + if (image_count < 1) { + log_error("Unable to %s images by specified amount.", +diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c +index 57f9f2651..87f829f19 100644 +--- a/tools/lvmcmdline.c ++++ b/tools/lvmcmdline.c +@@ -1456,7 +1456,7 @@ static int _command_optional_opt_matches(struct cmd_context *cmd, int ci, int oo + } + + if (val_bit_is_set(commands[ci].optional_opt_args[oo].def.val_bits, constnum_VAL)) { +- if (commands[ci].optional_opt_args[oo].def.num == arg_int_value(cmd, opt_enum, 0)) ++ if (commands[ci].optional_opt_args[oo].def.num == arg_uint64_value(cmd, opt_enum, 0)) + return 1; + return 0; + } +@@ -1475,7 +1475,7 @@ static int _command_ignore_opt_matches(struct cmd_context *cmd, int ci, int io) + } + + if (val_bit_is_set(commands[ci].ignore_opt_args[io].def.val_bits, constnum_VAL)) { +- if (commands[ci].ignore_opt_args[io].def.num == arg_int_value(cmd, opt_enum, 0)) ++ if (commands[ci].ignore_opt_args[io].def.num == arg_uint64_value(cmd, opt_enum, 0)) + return 1; + return 0; + } +@@ -1519,7 +1519,7 @@ check_val: + } + + if (val_bit_is_set(commands[ci].required_opt_args[ro].def.val_bits, constnum_VAL)) { +- if (commands[ci].required_opt_args[ro].def.num == arg_int_value(cmd, opt_enum, 0)) ++ if (commands[ci].required_opt_args[ro].def.num == arg_uint64_value(cmd, opt_enum, 0)) + return 1; + return 0; + } +-- +2.35.3 + diff --git a/0005-lvmlockd-fix-thick-to-thin-lv-conversion.patch b/0005-lvmlockd-fix-thick-to-thin-lv-conversion.patch new file mode 100644 index 0000000..e0b3362 --- /dev/null +++ b/0005-lvmlockd-fix-thick-to-thin-lv-conversion.patch @@ -0,0 +1,379 @@ +From 76a4599500aef12442c8c24be8aacc89f6a27e68 Mon Sep 17 00:00:00 2001 +From: David Teigland +Date: Tue, 15 Aug 2023 09:53:39 -0500 +Subject: [PATCH 05/24] lvmlockd: fix thick to thin lv conversion + +--- + lib/locking/lvmlockd.c | 2 + + lib/metadata/metadata.c | 2 + + tools/lvconvert.c | 231 ++++++++++++++++++++++++---------------- + 3 files changed, 143 insertions(+), 92 deletions(-) + +diff --git a/lib/locking/lvmlockd.c b/lib/locking/lvmlockd.c +index a8db25d7a..d44b7333a 100644 +--- a/lib/locking/lvmlockd.c ++++ b/lib/locking/lvmlockd.c +@@ -2908,6 +2908,8 @@ static int _free_lv(struct cmd_context *cmd, struct volume_group *vg, + if (!id_write_format(lv_id, lv_uuid, sizeof(lv_uuid))) + return_0; + ++ log_debug("lockd free LV %s/%s %s lock_args %s", vg->name, lv_name, lv_uuid, lock_args ?: "none"); ++ + reply = _lockd_send("free_lv", + "pid = " FMTd64, (int64_t) getpid(), + "vg_name = %s", vg->name, +diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c +index f56b5002d..f8a4f6279 100644 +--- a/lib/metadata/metadata.c ++++ b/lib/metadata/metadata.c +@@ -2924,6 +2924,8 @@ int vg_write(struct volume_group *vg) + vgid[ID_LEN] = 0; + memcpy(vgid, &vg->id.uuid, ID_LEN); + ++ log_debug("Writing metadata for VG %s.", vg->name); ++ + if (vg_is_shared(vg)) { + dm_list_iterate_items(lvl, &vg->lvs) { + if (lvl->lv->lock_args && !strcmp(lvl->lv->lock_args, "pending")) { +diff --git a/tools/lvconvert.c b/tools/lvconvert.c +index d98d34ce0..7c9540712 100644 +--- a/tools/lvconvert.c ++++ b/tools/lvconvert.c +@@ -3007,9 +3007,22 @@ static struct logical_volume *_lvconvert_insert_thin_layer(struct logical_volume + if (!(thin_segtype = get_segtype_from_string(vg->cmd, SEG_TYPE_NAME_THIN))) + return_NULL; + ++ /* ++ * input lv foo (often linear) ++ * creates new lv foo_tpoolN (no seg) ++ * segment from foo is moved to foo_tpoolN ++ * new linear segment is created for foo that maps to foo_tpoolN ++ * returns foo_tpoolN ++ * ++ * In spite of the "pool" variable naming, pool_lv foo_tpoolN is *not* ++ * yet a pool type, but rather is whatever type the input lv was. ++ */ + if (!(pool_lv = insert_layer_for_lv(vg->cmd, lv, 0, "_tpool%d"))) + return_NULL; + ++ /* ++ * change lv foo to a thin LV using foo_tpoolN ++ */ + lv->status |= THIN_VOLUME | VIRTUAL; + lv_set_visible(pool_lv); + +@@ -3079,9 +3092,12 @@ static int _lvconvert_to_pool(struct cmd_context *cmd, + const char *pool_metadata_name; /* user-specified lv name */ + char converted_names[3*NAME_LEN]; /* preserve names of converted lv */ + struct segment_type *pool_segtype; /* thinpool or cachepool */ ++ const char *str_seg_type = to_cachepool ? SEG_TYPE_NAME_CACHE_POOL : SEG_TYPE_NAME_THIN_POOL; + struct lv_segment *seg; + unsigned int target_attr = ~0; + unsigned int activate_pool; ++ unsigned int lock_active_pool; ++ unsigned int lock_active_pool_done = 0; + unsigned int zero_metadata; + uint64_t meta_size; + uint32_t meta_extents; +@@ -3096,16 +3112,18 @@ static int _lvconvert_to_pool(struct cmd_context *cmd, + thin_discards_t discards; + thin_zero_t zero_new_blocks; + int error_when_full; +- int r = 0; ++ int end_error = 0; ++ int is_active; + + /* for handling lvmlockd cases */ + char *lockd_data_args = NULL; + char *lockd_meta_args = NULL; + char *lockd_data_name = NULL; + char *lockd_meta_name = NULL; ++ uint32_t lockd_data_flags = 0; ++ uint32_t lockd_meta_flags = 0; + struct id lockd_data_id; + struct id lockd_meta_id; +- const char *str_seg_type = to_cachepool ? SEG_TYPE_NAME_CACHE_POOL : SEG_TYPE_NAME_THIN_POOL; + + if (!_raid_split_image_conversion(lv)) + return_0; +@@ -3124,8 +3142,10 @@ static int _lvconvert_to_pool(struct cmd_context *cmd, + return 0; + } + +- /* Allow to have only thinpool active and restore it's active state. */ +- activate_pool = to_thinpool && lv_is_active(lv); ++ is_active = lv_is_active(lv); ++ ++ activate_pool = to_thinpool && is_active; ++ lock_active_pool = (to_thinpool || to_thin) && is_active; + + /* Wipe metadata_lv by default, but allow skipping this for cache pools. */ + zero_metadata = (to_cachepool) ? arg_int_value(cmd, zero_ARG, 1) : 1; +@@ -3356,20 +3376,11 @@ static int _lvconvert_to_pool(struct cmd_context *cmd, + } + } + +- /* +- * When the LV referenced by the original function arg "lv" +- * is layered +- * +- * pool_name pool name taken from lv arg +- * data_name sub lv name, generated +- * meta_name sub lv name, generated +- * +- * pool_lv new lv for pool object, created here +- * data_lv sub lv, was lv arg, now renamed +- * metadata_lv sub lv, existing or created here +- */ +- + if (to_thin) { ++ /* ++ * pool_lv is not yet a pool, when returned, pool_lv contains ++ * the segment that belonged to "lv". ++ */ + if (!(pool_lv = _lvconvert_insert_thin_layer(lv))) + goto_bad; + } else { +@@ -3383,6 +3394,17 @@ static int _lvconvert_to_pool(struct cmd_context *cmd, + pool_lv = lv; + } + ++ /* ++ * starts with pool_lv foo (not a pool yet) ++ * creates new data_lv foo_tdata ++ * segment from pool_lv foo is moved to data_lv foo_tdata ++ * pool_lv foo linear segment is created that maps to foo_tdata ++ * returns data_lv foo_tdata ++ * ++ * (In the to_thin case, the segment from the original lv is first ++ * moved to pool_lv by _lvconvert_insert_thin_layer, and now is ++ * moved to data_lv.) ++ */ + if (!(data_lv = insert_layer_for_lv(cmd, pool_lv, 0, + (to_cachepool ? "_cdata" : "_tdata")))) + goto_bad; +@@ -3390,33 +3412,15 @@ static int _lvconvert_to_pool(struct cmd_context *cmd, + data_lv->status |= (to_cachepool) ? CACHE_POOL_DATA : THIN_POOL_DATA; + data_lv->status |= LVM_WRITE; /* Pool data LV is writable */ + ++ /* ++ * pool_lv now becomes a pool type. ++ * FIXME: change variable naming to avoid this confusion. ++ */ + pool_lv->status |= (to_cachepool) ? CACHE_POOL : THIN_POOL; + + seg = first_seg(pool_lv); + seg->segtype = pool_segtype; + +- /* +- * Create a new lock for a thin pool LV. A cache pool LV has no lock. +- * Locks are removed from existing LVs that are being converted to +- * data and meta LVs (they are unlocked and deleted below.) +- */ +- if (vg_is_shared(vg)) { +- lv->lock_args = NULL; +- pool_lv->lock_args = NULL; +- data_lv->lock_args = NULL; +- metadata_lv->lock_args = NULL; +- +- if (!to_cachepool) { +- if (!strcmp(vg->lock_type, "sanlock")) +- pool_lv->lock_args = "pending"; +- else if (!strcmp(vg->lock_type, "dlm")) +- pool_lv->lock_args = "dlm"; +- else if (!strcmp(vg->lock_type, "idm")) +- pool_lv->lock_args = "idm"; +- /* The lock_args will be set in vg_write(). */ +- } +- } +- + /* Apply settings to the new pool seg */ + if (to_cachepool) { + if (!cache_set_params(seg, chunk_size, cache_metadata_format, cache_mode, policy_name, policy_settings)) +@@ -3453,87 +3457,130 @@ static int _lvconvert_to_pool(struct cmd_context *cmd, + if (!_lvconvert_attach_metadata_to_pool(seg, metadata_lv)) + goto_bad; + +- if (!handle_pool_metadata_spare(vg, +- metadata_lv->le_count, +- use_pvh, pool_metadata_spare)) +- goto_bad; ++ /* ++ * Create a new lock for a thin pool LV. A cache pool LV has no lock. ++ * Locks are removed from existing LVs that are being converted to ++ * data and meta LVs (they are unlocked and deleted below.) ++ * Acquire the new thin pool lock if the pool will remain active at ++ * the end of the command. ++ */ ++ if (vg_is_shared(vg)) { ++ lv->lock_args = NULL; ++ pool_lv->lock_args = NULL; ++ data_lv->lock_args = NULL; ++ metadata_lv->lock_args = NULL; + +- if (to_thin) { +- if (!lockd_lv(cmd, pool_lv, "ex", LDLV_PERSISTENT)) { +- log_error("Failed to lock pool LV %s.", display_lvname(pool_lv)); +- goto out; ++ if (!to_cachepool) { ++ if (!strcmp(vg->lock_type, "sanlock")) { ++ if (!lockd_init_lv_args(cmd, vg, pool_lv, ++ vg->lock_type, &pool_lv->lock_args)) { ++ log_error("Cannot allocate lock for new pool LV."); ++ goto_bad; ++ } ++ pool_lv->new_lock_args = 1; /* tells vg_revert to lockd_free_lv */ ++ } else if (!strcmp(vg->lock_type, "dlm")) { ++ pool_lv->lock_args = "dlm"; ++ } else if (!strcmp(vg->lock_type, "idm")) { ++ pool_lv->lock_args = "idm"; ++ } ++ ++ if (lock_active_pool) { ++ if (!lockd_lv(cmd, pool_lv, "ex", LDLV_PERSISTENT)) { ++ log_error("Failed to lock new pool LV %s.", display_lvname(pool_lv)); ++ goto_bad; ++ } ++ lock_active_pool_done = 1; ++ } + } ++ } ++ ++ if (to_thin) { + if (!lv_update_and_reload(lv)) + goto_bad; + } else { + if (!vg_write(vg) || !vg_commit(vg)) + goto_bad; ++ } + +- if (activate_pool) { +- if (!lockd_lv(cmd, pool_lv, "ex", LDLV_PERSISTENT)) { +- log_error("Failed to lock pool LV %s.", display_lvname(pool_lv)); +- goto out; +- } ++ /* ++ * The main conversion is successfully committed. If any subsequent ++ * steps fail (creating spare, activating, unlocking), we do not ++ * currently have the ability to undo the changes committed up to this ++ * point. Failures in the remaining steps can print an error and cause ++ * the command to exit with an error, but no partial revert of the ++ * completed steps is attempted. ++ */ ++ log_print_unless_silent("Converted %s to %s %s.", converted_names, ++ (to_cachepool) ? "cache" : "thin", ++ (to_thin) ? "volume" : "pool"); + +- if (!activate_lv(cmd, pool_lv)) { +- log_error("Failed to activate pool logical volume %s.", +- display_lvname(pool_lv)); +- +- /* Deactivate subvolumes */ +- if (!deactivate_lv(cmd, seg_lv(seg, 0))) +- log_error("Failed to deactivate pool data logical volume %s.", +- display_lvname(seg_lv(seg, 0))); +- if (!deactivate_lv(cmd, seg->metadata_lv)) +- log_error("Failed to deactivate pool metadata logical volume %s.", +- display_lvname(seg->metadata_lv)); +- goto out; +- } +- } ++ /* ++ * FIXME handle_pool_metadata_spare() calls vg_write() vg_commit() ++ * after creating a new lvolN, but then lvolN is renamed and hidden as ++ * [lvolN_pmspare] without any further vg_write(). So, there's an extra ++ * vg_write and vg_commit required here to cover the renaming/hiding. ++ */ ++ if (!handle_pool_metadata_spare(vg, metadata_lv->le_count, use_pvh, pool_metadata_spare) || ++ !vg_write(vg) || !vg_commit(vg)) { ++ log_error("Failed to set up spare metadata LV for thin pool."); ++ end_error = 1; + } + +- r = 1; +- +-out: +- if (r) +- log_print_unless_silent("Converted %s to %s %s.", +- converted_names, (to_cachepool) ? "cache" : "thin", +- (to_thin) ? "volume" : "pool"); ++ if (activate_pool && !activate_lv(cmd, pool_lv)) { ++ log_error("Failed to activate pool logical volume %s.", display_lvname(pool_lv)); ++ end_error = 1; ++ } + + /* + * Unlock and free the locks from existing LVs that became pool data + * and meta LVs. + */ + if (lockd_data_name) { +- if (!lockd_lv_name(cmd, vg, lockd_data_name, &lockd_data_id, lockd_data_args, "un", LDLV_PERSISTENT)) ++ if (!lockd_lv_name(cmd, vg, lockd_data_name, &lockd_data_id, lockd_data_args, "un", lockd_data_flags)) { + log_error("Failed to unlock pool data LV %s/%s", vg->name, lockd_data_name); +- lockd_free_lv(cmd, vg, lockd_data_name, &lockd_data_id, lockd_data_args); ++ end_error = 1; ++ } ++ if (!lockd_free_lv(cmd, vg, lockd_data_name, &lockd_data_id, lockd_data_args)) { ++ log_error("Failed to free lock for pool data LV %s/%s", vg->name, lockd_data_name); ++ end_error = 1; ++ } + } +- + if (lockd_meta_name) { +- if (!lockd_lv_name(cmd, vg, lockd_meta_name, &lockd_meta_id, lockd_meta_args, "un", LDLV_PERSISTENT)) ++ if (!lockd_lv_name(cmd, vg, lockd_meta_name, &lockd_meta_id, lockd_meta_args, "un", lockd_meta_flags)) { + log_error("Failed to unlock pool metadata LV %s/%s", vg->name, lockd_meta_name); +- lockd_free_lv(cmd, vg, lockd_meta_name, &lockd_meta_id, lockd_meta_args); ++ end_error = 1; ++ } ++ if (!lockd_free_lv(cmd, vg, lockd_meta_name, &lockd_meta_id, lockd_meta_args)) { ++ log_error("Failed to free lock for pool metadata LV %s/%s", vg->name, lockd_meta_name); ++ end_error = 1; ++ } + } +-bad: ++ + if (policy_settings) + dm_config_destroy(policy_settings); + +- return r; +-#if 0 +-revert_new_lv: +- /* TBD */ +- if (!pool_metadata_lv_name) { +- if (!deactivate_lv(cmd, metadata_lv)) { +- log_error("Failed to deactivate metadata lv."); +- return 0; +- } +- if (!lv_remove(metadata_lv) || !vg_write(vg) || !vg_commit(vg)) +- log_error("Manual intervention may be required to remove " +- "abandoned LV(s) before retrying."); ++ if (end_error) { ++ log_error("Manual intervention may be required to handle reported errors."); ++ return 0; + } + ++ return 1; ++ ++ /* ++ * Error exit path for failures that occur before the main conversion ++ * is committed. Failures that occur after the main conversion is ++ * committed should not exit here. There is some cleanup missing here. ++ */ ++bad: ++ if (lock_active_pool_done) ++ lockd_lv(cmd, pool_lv, "un", LDLV_PERSISTENT); ++ if (pool_lv && pool_lv->lock_args && pool_lv->new_lock_args) ++ lockd_free_lv(cmd, vg, pool_lv->name, &pool_lv->lvid.id[1], pool_lv->lock_args); ++ ++ if (policy_settings) ++ dm_config_destroy(policy_settings); ++ + return 0; +-#endif + } + + static int _cache_vol_attach(struct cmd_context *cmd, +-- +2.35.3 + diff --git a/0006-lvmlockd-let-lockd_init_lv_args-set-lock_args.patch b/0006-lvmlockd-let-lockd_init_lv_args-set-lock_args.patch new file mode 100644 index 0000000..c5ca8b4 --- /dev/null +++ b/0006-lvmlockd-let-lockd_init_lv_args-set-lock_args.patch @@ -0,0 +1,63 @@ +From ae13074a0a6ea7997cdb370cdd2185801646b2c5 Mon Sep 17 00:00:00 2001 +From: David Teigland +Date: Wed, 16 Aug 2023 13:24:36 -0500 +Subject: [PATCH 06/24] lvmlockd: let lockd_init_lv_args set lock_args + +Set the lock_args string in addition to doing initialization. +lvconvert calls lockd_init_lv_args() directly, skipping +the normal lockd_init_lv() which usually sets lock_args. +--- + lib/locking/lvmlockd.c | 9 +++++++-- + tools/lvconvert.c | 15 +++------------ + 2 files changed, 10 insertions(+), 14 deletions(-) + +diff --git a/lib/locking/lvmlockd.c b/lib/locking/lvmlockd.c +index d44b7333a..627aa2625 100644 +--- a/lib/locking/lvmlockd.c ++++ b/lib/locking/lvmlockd.c +@@ -2938,8 +2938,13 @@ int lockd_init_lv_args(struct cmd_context *cmd, struct volume_group *vg, + struct logical_volume *lv, + const char *lock_type, const char **lock_args) + { +- /* sanlock is the only lock type that sets per-LV lock_args. */ +- if (!strcmp(lock_type, "sanlock")) ++ if (!lock_type) ++ return 1; ++ if (!strcmp(lock_type, "dlm")) ++ *lock_args = "dlm"; ++ else if (!strcmp(lock_type, "idm")) ++ *lock_args = "idm"; ++ else if (!strcmp(lock_type, "sanlock")) + return _init_lv_sanlock(cmd, vg, lv->name, &lv->lvid.id[1], lock_args); + return 1; + } +diff --git a/tools/lvconvert.c b/tools/lvconvert.c +index 7c9540712..40e7a6871 100644 +--- a/tools/lvconvert.c ++++ b/tools/lvconvert.c +@@ -3471,19 +3471,10 @@ static int _lvconvert_to_pool(struct cmd_context *cmd, + metadata_lv->lock_args = NULL; + + if (!to_cachepool) { +- if (!strcmp(vg->lock_type, "sanlock")) { +- if (!lockd_init_lv_args(cmd, vg, pool_lv, +- vg->lock_type, &pool_lv->lock_args)) { +- log_error("Cannot allocate lock for new pool LV."); +- goto_bad; +- } +- pool_lv->new_lock_args = 1; /* tells vg_revert to lockd_free_lv */ +- } else if (!strcmp(vg->lock_type, "dlm")) { +- pool_lv->lock_args = "dlm"; +- } else if (!strcmp(vg->lock_type, "idm")) { +- pool_lv->lock_args = "idm"; ++ if (!lockd_init_lv_args(cmd, vg, pool_lv, vg->lock_type, &pool_lv->lock_args)) { ++ log_error("Cannot allocate lock for new pool LV."); ++ goto_bad; + } +- + if (lock_active_pool) { + if (!lockd_lv(cmd, pool_lv, "ex", LDLV_PERSISTENT)) { + log_error("Failed to lock new pool LV %s.", display_lvname(pool_lv)); +-- +2.35.3 + diff --git a/0007-lvmlockd-fix-lvconvert-to-thin-pool.patch b/0007-lvmlockd-fix-lvconvert-to-thin-pool.patch new file mode 100644 index 0000000..9d66d25 --- /dev/null +++ b/0007-lvmlockd-fix-lvconvert-to-thin-pool.patch @@ -0,0 +1,97 @@ +From 3e92798473a04bec26a91632e1436aa415c2bb3c Mon Sep 17 00:00:00 2001 +From: David Teigland +Date: Wed, 16 Aug 2023 15:00:47 -0500 +Subject: [PATCH 07/24] lvmlockd: fix lvconvert to thin-pool + +--- + tools/lvconvert.c | 37 ++++++++++++++++++++----------------- + 1 file changed, 20 insertions(+), 17 deletions(-) + +diff --git a/tools/lvconvert.c b/tools/lvconvert.c +index 40e7a6871..7d5057254 100644 +--- a/tools/lvconvert.c ++++ b/tools/lvconvert.c +@@ -3096,7 +3096,6 @@ static int _lvconvert_to_pool(struct cmd_context *cmd, + struct lv_segment *seg; + unsigned int target_attr = ~0; + unsigned int activate_pool; +- unsigned int lock_active_pool; + unsigned int lock_active_pool_done = 0; + unsigned int zero_metadata; + uint64_t meta_size; +@@ -3145,12 +3144,10 @@ static int _lvconvert_to_pool(struct cmd_context *cmd, + is_active = lv_is_active(lv); + + activate_pool = to_thinpool && is_active; +- lock_active_pool = (to_thinpool || to_thin) && is_active; + + /* Wipe metadata_lv by default, but allow skipping this for cache pools. */ + zero_metadata = (to_cachepool) ? arg_int_value(cmd, zero_ARG, 1) : 1; + +- /* An existing LV needs to have its lock freed once it becomes a data LV. */ + if (vg_is_shared(vg) && lv->lock_args) { + lockd_data_args = dm_pool_strdup(cmd->mem, lv->lock_args); + lockd_data_name = dm_pool_strdup(cmd->mem, lv->name); +@@ -3458,11 +3455,11 @@ static int _lvconvert_to_pool(struct cmd_context *cmd, + goto_bad; + + /* +- * Create a new lock for a thin pool LV. A cache pool LV has no lock. +- * Locks are removed from existing LVs that are being converted to +- * data and meta LVs (they are unlocked and deleted below.) +- * Acquire the new thin pool lock if the pool will remain active at +- * the end of the command. ++ * If the input LV is being converted to a thin pool, the input LV lock ++ * is used for the thin pool LV. If the input LV is being converted to ++ * a thin LV, a new lock is created for the thin pool and the lock from ++ * the input LV is freed. A cache pool LV has no lock, so the lock for ++ * the input LV is freed. + */ + if (vg_is_shared(vg)) { + lv->lock_args = NULL; +@@ -3470,18 +3467,25 @@ static int _lvconvert_to_pool(struct cmd_context *cmd, + data_lv->lock_args = NULL; + metadata_lv->lock_args = NULL; + +- if (!to_cachepool) { ++ if (to_thin) { + if (!lockd_init_lv_args(cmd, vg, pool_lv, vg->lock_type, &pool_lv->lock_args)) { + log_error("Cannot allocate lock for new pool LV."); + goto_bad; + } +- if (lock_active_pool) { +- if (!lockd_lv(cmd, pool_lv, "ex", LDLV_PERSISTENT)) { +- log_error("Failed to lock new pool LV %s.", display_lvname(pool_lv)); +- goto_bad; +- } +- lock_active_pool_done = 1; ++ } else if (to_thinpool) { ++ pool_lv->lock_args = lockd_data_args; ++ /* Don't free this lock below. */ ++ lockd_data_args = NULL; ++ lockd_data_name = NULL; ++ } ++ ++ /* Acquire the thin pool lock if the pool will remain active. */ ++ if ((to_thin || to_thinpool) && is_active) { ++ if (!lockd_lv(cmd, pool_lv, "ex", LDLV_PERSISTENT)) { ++ log_error("Failed to lock new pool LV %s.", display_lvname(pool_lv)); ++ goto_bad; + } ++ lock_active_pool_done = 1; + } + } + +@@ -3523,8 +3527,7 @@ static int _lvconvert_to_pool(struct cmd_context *cmd, + } + + /* +- * Unlock and free the locks from existing LVs that became pool data +- * and meta LVs. ++ * Unlock and free locks that are no longer used. + */ + if (lockd_data_name) { + if (!lockd_lv_name(cmd, vg, lockd_data_name, &lockd_data_id, lockd_data_args, "un", lockd_data_flags)) { +-- +2.35.3 + diff --git a/0008-lvconvert-run-error-path-code-only-for-shared-VG.patch b/0008-lvconvert-run-error-path-code-only-for-shared-VG.patch new file mode 100644 index 0000000..7105fea --- /dev/null +++ b/0008-lvconvert-run-error-path-code-only-for-shared-VG.patch @@ -0,0 +1,34 @@ +From 33b804a80e24d58e57936f7c5a6cbe7c77981483 Mon Sep 17 00:00:00 2001 +From: Zdenek Kabelac +Date: Thu, 17 Aug 2023 21:50:03 +0200 +Subject: [PATCH 08/24] lvconvert: run error path code only for shared VG + +Error path for locking only for share VG. +--- + tools/lvconvert.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/tools/lvconvert.c b/tools/lvconvert.c +index 7d5057254..49e9248a6 100644 +--- a/tools/lvconvert.c ++++ b/tools/lvconvert.c +@@ -3566,10 +3566,12 @@ static int _lvconvert_to_pool(struct cmd_context *cmd, + * committed should not exit here. There is some cleanup missing here. + */ + bad: +- if (lock_active_pool_done) +- lockd_lv(cmd, pool_lv, "un", LDLV_PERSISTENT); +- if (pool_lv && pool_lv->lock_args && pool_lv->new_lock_args) +- lockd_free_lv(cmd, vg, pool_lv->name, &pool_lv->lvid.id[1], pool_lv->lock_args); ++ if (vg_is_shared(vg)) { ++ if (lock_active_pool_done) ++ lockd_lv(cmd, pool_lv, "un", LDLV_PERSISTENT); ++ if (pool_lv && pool_lv->lock_args && pool_lv->new_lock_args) ++ lockd_free_lv(cmd, vg, pool_lv->name, &pool_lv->lvid.id[1], pool_lv->lock_args); ++ } + + if (policy_settings) + dm_config_destroy(policy_settings); +-- +2.35.3 + diff --git a/0009-vgchange-acquire-an-exclusive-VG-lock-for-refresh.patch b/0009-vgchange-acquire-an-exclusive-VG-lock-for-refresh.patch new file mode 100644 index 0000000..3a66e24 --- /dev/null +++ b/0009-vgchange-acquire-an-exclusive-VG-lock-for-refresh.patch @@ -0,0 +1,30 @@ +From b6ab049c3184edcb4d56789d32991bbf8c97de77 Mon Sep 17 00:00:00 2001 +From: wangzhiqiang +Date: Wed, 30 Aug 2023 15:47:42 -0500 +Subject: [PATCH 09/24] vgchange: acquire an exclusive VG lock for refresh + +Concurrent vgchange --refresh commands can lead to hung +tasks in dm code. + +Signed-off-by: wangzhiqiang +--- + tools/vgchange.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/tools/vgchange.c b/tools/vgchange.c +index e2d3dad02..8c1d605c6 100644 +--- a/tools/vgchange.c ++++ b/tools/vgchange.c +@@ -1008,7 +1008,8 @@ int vgchange(struct cmd_context *cmd, int argc, char **argv) + + if (update) + flags |= READ_FOR_UPDATE; +- else if (arg_is_set(cmd, activate_ARG)) ++ else if (arg_is_set(cmd, activate_ARG) || ++ arg_is_set(cmd, refresh_ARG)) + flags |= READ_FOR_ACTIVATE; + + if (!(handle = init_processing_handle(cmd, NULL))) { +-- +2.35.3 + diff --git a/0010-lvmlockd-client-mutex-ordering.patch b/0010-lvmlockd-client-mutex-ordering.patch new file mode 100644 index 0000000..f379227 --- /dev/null +++ b/0010-lvmlockd-client-mutex-ordering.patch @@ -0,0 +1,40 @@ +From cd17ccbc684590e8655888af6d6b0452287fd47d Mon Sep 17 00:00:00 2001 +From: David Teigland +Date: Thu, 31 Aug 2023 13:15:07 -0500 +Subject: [PATCH 10/24] lvmlockd: client mutex ordering + +Avoid deadlock between threads on mutexes (in theory.) +--- + daemons/lvmlockd/lvmlockd-core.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/daemons/lvmlockd/lvmlockd-core.c b/daemons/lvmlockd/lvmlockd-core.c +index 887226f1a..1261f6482 100644 +--- a/daemons/lvmlockd/lvmlockd-core.c ++++ b/daemons/lvmlockd/lvmlockd-core.c +@@ -4690,9 +4690,12 @@ static int dump_info(int *dump_len) + + /* + * clients ++ * Proper lock order is client_mutex then cl->mutex, ++ * but cl->mutex is already held so skip client info ++ * if it would block. + */ +- +- pthread_mutex_lock(&client_mutex); ++ if (pthread_mutex_trylock(&client_mutex)) ++ goto print_ls; + list_for_each_entry(cl, &client_list, list) { + ret = print_client(cl, "client", pos, len); + if (ret >= len - pos) { +@@ -4706,6 +4709,7 @@ static int dump_info(int *dump_len) + if (rv < 0) + return rv; + ++ print_ls: + /* + * lockspaces with their action/resource/lock info + */ +-- +2.35.3 + diff --git a/0011-filesystem-move-stat-after-open-check.patch b/0011-filesystem-move-stat-after-open-check.patch new file mode 100644 index 0000000..221e96b --- /dev/null +++ b/0011-filesystem-move-stat-after-open-check.patch @@ -0,0 +1,57 @@ +From b5b97c2b663565833218f68b196327ef63b1a114 Mon Sep 17 00:00:00 2001 +From: Zdenek Kabelac +Date: Thu, 31 Aug 2023 18:50:33 +0200 +Subject: [PATCH 11/24] filesystem: move stat after open check + +To avoid time-of-check-time-of-use clash, take the stat() +after successful open with fstat(). +Also add some debugs for failing sys calls. +--- + lib/device/filesystem.c | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +diff --git a/lib/device/filesystem.c b/lib/device/filesystem.c +index 53cbc2d02..29b57d0c9 100644 +--- a/lib/device/filesystem.c ++++ b/lib/device/filesystem.c +@@ -155,26 +155,26 @@ int fs_get_info(struct cmd_context *cmd, struct logical_volume *lv, + return 0; + } + +- if (stat(crypt_path, &st_crypt) < 0) { +- log_error("Failed to get crypt path %s", crypt_path); +- return 0; +- } +- + memset(&info, 0, sizeof(info)); + + log_print_unless_silent("Checking crypt device %s on LV %s.", + crypt_path, display_lvname(lv)); + + if ((fd = open(crypt_path, O_RDONLY)) < 0) { +- log_error("Failed to open crypt path %s", crypt_path); ++ log_error("Failed to open crypt path %s.", crypt_path); + return 0; + } +- if (ioctl(fd, BLKGETSIZE64, &info.crypt_dev_size_bytes) < 0) { +- log_error("Failed to get crypt device size %s", crypt_path); +- close(fd); ++ ++ if ((ret = fstat(fd, &st_crypt)) < 0) ++ log_sys_error("fstat", crypt_path); ++ else if ((ret = ioctl(fd, BLKGETSIZE64, &info.crypt_dev_size_bytes)) < 0) ++ log_error("Failed to get crypt device size %s.", crypt_path); ++ ++ if (close(fd)) ++ log_sys_debug("close", crypt_path); ++ ++ if (ret < 0) + return 0; +- } +- close(fd); + + if (!fs_get_blkid(crypt_path, &info)) { + log_error("No file system info from blkid for dm-crypt device %s on LV %s.", +-- +2.35.3 + diff --git a/0012-tests-check-for-writecache.patch b/0012-tests-check-for-writecache.patch new file mode 100644 index 0000000..1d65f4a --- /dev/null +++ b/0012-tests-check-for-writecache.patch @@ -0,0 +1,49 @@ +From 950edf73781807b07d97717b460ae682edb38fdf Mon Sep 17 00:00:00 2001 +From: Zdenek Kabelac +Date: Mon, 4 Sep 2023 17:32:26 +0200 +Subject: [PATCH 12/24] tests: check for writecache + +Writecache needs writecache kernel target to be present. +--- + test/shell/caching-snapshot.sh | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/test/shell/caching-snapshot.sh b/test/shell/caching-snapshot.sh +index d73f4ad06..854d8bad7 100644 +--- a/test/shell/caching-snapshot.sh ++++ b/test/shell/caching-snapshot.sh +@@ -22,6 +22,9 @@ lvm segtypes 2>/dev/null | grep writecache$ >/dev/null || { + aux have_cache 1 10 0 || skip + which mkfs.ext4 || skip + ++HAVE_WRITECACHE=1 ++aux have_writecache 1 0 0 || HAVE_WRITECACHE=0 ++ + mount_dir="mnt" + mkdir -p "$mount_dir" + +@@ -105,7 +108,10 @@ test_snap_remove() { + + test_snap_remove cache --cachepool + test_snap_remove cache --cachevol ++ ++if [ "$HAVE_WRITECACHE" = "1" ]; then + test_snap_remove writecache --cachevol ++fi + + # adding cache|writecache to an LV that has a snapshot + +@@ -143,7 +149,10 @@ test_caching_with_snap() { + + test_caching_with_snap cache --cachepool + test_caching_with_snap cache --cachevol ++ ++if [ "$HAVE_WRITECACHE" = "1" ]; then + test_caching_with_snap writecache --cachevol ++fi + + # adding cache|writecache to a snapshot is not allowed + +-- +2.35.3 + diff --git a/0013-lvresize-fix-32-bit-overflow-in-size-calculation.patch b/0013-lvresize-fix-32-bit-overflow-in-size-calculation.patch new file mode 100644 index 0000000..e55e41d --- /dev/null +++ b/0013-lvresize-fix-32-bit-overflow-in-size-calculation.patch @@ -0,0 +1,34 @@ +From 25618d71b57e380ab692b640419dc89a9c6fe20e Mon Sep 17 00:00:00 2001 +From: David Teigland +Date: Mon, 11 Sep 2023 12:18:12 -0500 +Subject: [PATCH 13/24] lvresize: fix 32 bit overflow in size calculation + +--- + lib/metadata/lv_manip.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c +index 9bec8b54d..23e04c3a8 100644 +--- a/lib/metadata/lv_manip.c ++++ b/lib/metadata/lv_manip.c +@@ -6445,7 +6445,7 @@ static int _fs_reduce(struct cmd_context *cmd, struct logical_volume *lv, + } + + /* extent_size units is SECTOR_SIZE (512) */ +- newsize_bytes_lv = lp->extents * lv->vg->extent_size * SECTOR_SIZE; ++ newsize_bytes_lv = (uint64_t) lp->extents * lv->vg->extent_size * SECTOR_SIZE; + newsize_bytes_fs = newsize_bytes_lv; + + /* +@@ -6591,7 +6591,7 @@ static int _fs_extend(struct cmd_context *cmd, struct logical_volume *lv, + */ + + /* extent_size units is SECTOR_SIZE (512) */ +- newsize_bytes_lv = lp->extents * lv->vg->extent_size * SECTOR_SIZE; ++ newsize_bytes_lv = (uint64_t) lp->extents * lv->vg->extent_size * SECTOR_SIZE; + newsize_bytes_fs = newsize_bytes_lv; + if (fsinfo.needs_crypt) { + newsize_bytes_fs -= fsinfo.crypt_offset_bytes; +-- +2.35.3 + diff --git a/0014-gcc-fix-warnings-for-x32-architecture.patch b/0014-gcc-fix-warnings-for-x32-architecture.patch new file mode 100644 index 0000000..8846bc5 --- /dev/null +++ b/0014-gcc-fix-warnings-for-x32-architecture.patch @@ -0,0 +1,44 @@ +From afb60167d6268a61d51b1a33efa741f46c7e73ee Mon Sep 17 00:00:00 2001 +From: Mikulas Patocka +Date: Wed, 6 Sep 2023 15:28:29 +0200 +Subject: [PATCH 14/24] gcc: fix warnings for x32 architecture + +Warning from x32 ABI compilation. +--- + lib/log/log.c | 2 +- + lib/metadata/vdo_manip.c | 6 +++--- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/lib/log/log.c b/lib/log/log.c +index 6dc269675..b654737f1 100644 +--- a/lib/log/log.c ++++ b/lib/log/log.c +@@ -515,7 +515,7 @@ static void _set_time_prefix(char *prefix, int buflen) + if (!len) + goto fail; + +- len = dm_snprintf(prefix + len, buflen - len, ".%06ld ", ts.tv_nsec/1000); ++ len = dm_snprintf(prefix + len, buflen - len, ".%06d ", (int)ts.tv_nsec/1000); + if (len < 0) + goto fail; + +diff --git a/lib/metadata/vdo_manip.c b/lib/metadata/vdo_manip.c +index d51ef2dbf..516d42d8b 100644 +--- a/lib/metadata/vdo_manip.c ++++ b/lib/metadata/vdo_manip.c +@@ -522,9 +522,9 @@ static int _get_sysinfo_memory(uint64_t *total_mb, uint64_t *available_mb) + if (sysinfo(&si) != 0) + return 0; + +- log_debug("Sysinfo free:%lu bufferram:%lu sharedram:%lu freehigh:%lu unit:%u.", +- si.freeram >> 20, si.bufferram >> 20, si.sharedram >> 20, +- si.freehigh >> 20, si.mem_unit); ++ log_debug("Sysinfo free:%llu bufferram:%llu sharedram:%llu freehigh:%llu unit:%u.", ++ (unsigned long long)si.freeram >> 20, (unsigned long long)si.bufferram >> 20, (unsigned long long)si.sharedram >> 20, ++ (unsigned long long)si.freehigh >> 20, si.mem_unit); + + *available_mb = ((uint64_t)(si.freeram + si.bufferram) * si.mem_unit) >> 30; + *total_mb = si.totalram >> 30; +-- +2.35.3 + diff --git a/0015-gcc-warning-missing-braces-around-initializer.patch b/0015-gcc-warning-missing-braces-around-initializer.patch new file mode 100644 index 0000000..e1d8e05 --- /dev/null +++ b/0015-gcc-warning-missing-braces-around-initializer.patch @@ -0,0 +1,26 @@ +From ae65e71b3d519ed99f0bab6a595d6d255e0635bb Mon Sep 17 00:00:00 2001 +From: Zdenek Kabelac +Date: Tue, 12 Sep 2023 16:40:26 +0200 +Subject: [PATCH 15/24] gcc: warning: missing braces around initializer + +Fix warning emitted by some older gcc... +--- + tools/lvconvert.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/lvconvert.c b/tools/lvconvert.c +index 49e9248a6..aa601d4ca 100644 +--- a/tools/lvconvert.c ++++ b/tools/lvconvert.c +@@ -6514,7 +6514,7 @@ static int _lvconvert_integrity_single(struct cmd_context *cmd, + struct logical_volume *lv, + struct processing_handle *handle) + { +- struct integrity_settings settings = { 0 }; ++ struct integrity_settings settings = { .tag_size = 0 }; + int ret; + + if (!integrity_mode_set(arg_str_value(cmd, raidintegritymode_ARG, NULL), &settings)) +-- +2.35.3 + diff --git a/0016-test-improve-aux-teardown.patch b/0016-test-improve-aux-teardown.patch new file mode 100644 index 0000000..849bf00 --- /dev/null +++ b/0016-test-improve-aux-teardown.patch @@ -0,0 +1,53 @@ +From fbbf796dd89007fe57a3c7043f27aed2fbf0775c Mon Sep 17 00:00:00 2001 +From: Zdenek Kabelac +Date: Wed, 13 Sep 2023 00:39:33 +0200 +Subject: [PATCH 16/24] 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 +--- + test/lib/aux.sh | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/test/lib/aux.sh b/test/lib/aux.sh +index 3f66e9290..4474dc72c 100644 +--- a/test/lib/aux.sh ++++ b/test/lib/aux.sh +@@ -239,8 +239,8 @@ prepare_lvmpolld() { + echo $! > LOCAL_LVMPOLLD + for i in {200..0} ; do + test -e "$TESTDIR/lvmpolld.socket" && break +- echo -n .; +- sleep .1; ++ echo -n . ++ sleep .1 + done # wait for the socket + test "$i" -gt 0 || die "Startup of lvmpolld is too slow." + echo ok +@@ -395,10 +395,10 @@ teardown_devs_prefixed() { + # 2nd. loop is trying --force removal which can possibly 'unstuck' some bloked operations + for i in 0 1; do + test "$i" = 1 && test "$stray" = 0 && break # no stray device removal ++ local progress=1 + + while :; do + local sortby="name" +- local progress=0 + + # HACK: sort also by minors - so we try to close 'possibly later' created device first + test "$i" = 0 || sortby="-minor" +@@ -426,6 +426,7 @@ teardown_devs_prefixed() { + + udev_wait + wait ++ progress=0 + done # looping till there are some removed devices + done + } +-- +2.35.3 + diff --git a/0017-tests-aux-try-with-extra-sleep.patch b/0017-tests-aux-try-with-extra-sleep.patch new file mode 100644 index 0000000..34cc662 --- /dev/null +++ b/0017-tests-aux-try-with-extra-sleep.patch @@ -0,0 +1,26 @@ +From cf8a0c94fff754e4b6a504a430e53439d67b6ca0 Mon Sep 17 00:00:00 2001 +From: Zdenek Kabelac +Date: Wed, 13 Sep 2023 23:27:55 +0200 +Subject: [PATCH 17/24] 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. +--- + test/lib/aux.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/test/lib/aux.sh b/test/lib/aux.sh +index 4474dc72c..816a13223 100644 +--- a/test/lib/aux.sh ++++ b/test/lib/aux.sh +@@ -424,6 +424,7 @@ teardown_devs_prefixed() { + + test "$progress" = 1 || break + ++ sleep .1 + udev_wait + wait + progress=0 +-- +2.35.3 + diff --git a/0018-tests-aux-using-singl-lvmconf-call.patch b/0018-tests-aux-using-singl-lvmconf-call.patch new file mode 100644 index 0000000..23f9463 --- /dev/null +++ b/0018-tests-aux-using-singl-lvmconf-call.patch @@ -0,0 +1,27 @@ +From cb34be9ba90613cd49f4822fc118cecfc93ac897 Mon Sep 17 00:00:00 2001 +From: Zdenek Kabelac +Date: Thu, 14 Sep 2023 01:41:45 +0200 +Subject: [PATCH 18/24] tests: aux using singl lvmconf call + +lvmconf can handle multiple options in a single pass. +--- + test/lib/aux.sh | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/test/lib/aux.sh b/test/lib/aux.sh +index 816a13223..20dbecec2 100644 +--- a/test/lib/aux.sh ++++ b/test/lib/aux.sh +@@ -1444,8 +1444,7 @@ extend_filter_md() { + for rx in "$@"; do + filter=$(echo "$filter" | sed -e "s:\\[:[ \"$rx\", :") + done +- lvmconf "$filter" +- lvmconf "devices/scan = [ \"$DM_DEV_DIR\", \"/dev\" ]" ++ lvmconf "$filter" "devices/scan = [ \"$DM_DEV_DIR\", \"/dev\" ]" + } + + extend_filter_LVMTEST() { +-- +2.35.3 + diff --git a/0019-tests-missing-to-check-for-writecache-support.patch b/0019-tests-missing-to-check-for-writecache-support.patch new file mode 100644 index 0000000..e7fb060 --- /dev/null +++ b/0019-tests-missing-to-check-for-writecache-support.patch @@ -0,0 +1,49 @@ +From da95bb6883810863a394525c9a66196b7b0dda21 Mon Sep 17 00:00:00 2001 +From: Zdenek Kabelac +Date: Wed, 13 Sep 2023 23:23:47 +0200 +Subject: [PATCH 19/24] tests: missing to check for writecache support + +Ono more case requires writecache presence. +--- + test/shell/caching-snapshot.sh | 11 ++++------- + 1 file changed, 4 insertions(+), 7 deletions(-) + +diff --git a/test/shell/caching-snapshot.sh b/test/shell/caching-snapshot.sh +index 854d8bad7..b31cb520f 100644 +--- a/test/shell/caching-snapshot.sh ++++ b/test/shell/caching-snapshot.sh +@@ -72,7 +72,8 @@ test_snap_create() { + + test_snap_create cache --cachepool + test_snap_create cache --cachevol +-test_snap_create writecache --cachevol ++ ++[ "$HAVE_WRITECACHE" = "1" ] && test_snap_create writecache --cachevol + + # removing cache|writecache while snapshot exists + +@@ -109,9 +110,7 @@ test_snap_remove() { + test_snap_remove cache --cachepool + test_snap_remove cache --cachevol + +-if [ "$HAVE_WRITECACHE" = "1" ]; then +-test_snap_remove writecache --cachevol +-fi ++[ "$HAVE_WRITECACHE" = "1" ] && test_snap_remove writecache --cachevol + + # adding cache|writecache to an LV that has a snapshot + +@@ -150,9 +149,7 @@ test_caching_with_snap() { + test_caching_with_snap cache --cachepool + test_caching_with_snap cache --cachevol + +-if [ "$HAVE_WRITECACHE" = "1" ]; then +-test_caching_with_snap writecache --cachevol +-fi ++[ "$HAVE_WRITECACHE" = "1" ] && test_caching_with_snap writecache --cachevol + + # adding cache|writecache to a snapshot is not allowed + +-- +2.35.3 + diff --git a/0020-tests-pvmove-large-disk-area.patch b/0020-tests-pvmove-large-disk-area.patch new file mode 100644 index 0000000..10df181 --- /dev/null +++ b/0020-tests-pvmove-large-disk-area.patch @@ -0,0 +1,40 @@ +From befc30b610ed3a648f967e50cea752d0f5a09073 Mon Sep 17 00:00:00 2001 +From: Zdenek Kabelac +Date: Wed, 13 Sep 2023 23:39:08 +0200 +Subject: [PATCH 20/24] tests: pvmove large disk area + +With some faster test hw machine we need to make this test +a bit more resource consuming. +--- + test/shell/pvmove-abort-all.sh | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/test/shell/pvmove-abort-all.sh b/test/shell/pvmove-abort-all.sh +index 872db041e..081c02911 100644 +--- a/test/shell/pvmove-abort-all.sh ++++ b/test/shell/pvmove-abort-all.sh +@@ -26,7 +26,7 @@ aux target_at_least dm-mirror 1 10 0 || skip + # Throttle mirroring + aux throttle_dm_mirror || skip + +-aux prepare_pvs 6 60 ++aux prepare_pvs 6 90 + + vgcreate -s 512k $vg "$dev1" "$dev2" + pvcreate --metadatacopies 0 "$dev3" +@@ -41,9 +41,9 @@ for backgroundarg in "-b" "" ; + do + + # Create multisegment LV +-lvcreate -an -Zn -l30 -n $lv1 $vg "$dev1" +-lvcreate -an -Zn -l30 -n $lv2 $vg "$dev2" +-lvcreate -an -Zn -l30 -n $lv1 $vg1 "$dev4" ++lvcreate -an -Zn -l60 -n $lv1 $vg "$dev1" ++lvcreate -an -Zn -l60 -n $lv2 $vg "$dev2" ++lvcreate -an -Zn -l60 -n $lv1 $vg1 "$dev4" + lvextend -l+30 -n $vg1/$lv1 "$dev5" + + cmd1=(pvmove -i1 $backgroundarg $mode "$dev1" "$dev3") +-- +2.35.3 + diff --git a/0021-tests-enforce-full-fs-check.patch b/0021-tests-enforce-full-fs-check.patch new file mode 100644 index 0000000..f743d7a --- /dev/null +++ b/0021-tests-enforce-full-fs-check.patch @@ -0,0 +1,25 @@ +From 8257181f9e4e54505de158a98d54c8a11b127553 Mon Sep 17 00:00:00 2001 +From: Zdenek Kabelac +Date: Wed, 13 Sep 2023 23:40:16 +0200 +Subject: [PATCH 21/24] tests: enforce full fs check + +--- + test/shell/lvresize-fs-crypt.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/shell/lvresize-fs-crypt.sh b/test/shell/lvresize-fs-crypt.sh +index 966870d5d..302fd5fc9 100644 +--- a/test/shell/lvresize-fs-crypt.sh ++++ b/test/shell/lvresize-fs-crypt.sh +@@ -139,7 +139,7 @@ dd if=/dev/zero of="$mount_dir/zeros1" bs=1M count=10 oflag=direct + df --output=size "$mount_dir" |tee df1 + # resize only the fs (to 256M), not the crypt dev or LV + umount "$mount_dir" +-fsck -n /dev/mapper/$cr ++fsck -fn /dev/mapper/$cr + resize2fs /dev/mapper/$cr 262144k + mount /dev/mapper/$cr "$mount_dir" + # this lvresize will not resize the fs (which is already reduced +-- +2.35.3 + diff --git a/0022-tests-update-for-work-in-fake-dev-environment.patch b/0022-tests-update-for-work-in-fake-dev-environment.patch new file mode 100644 index 0000000..a7646d8 --- /dev/null +++ b/0022-tests-update-for-work-in-fake-dev-environment.patch @@ -0,0 +1,588 @@ +From 9683478371c60e78920c22cb4f5ca14b39bb9fcb Mon Sep 17 00:00:00 2001 +From: Zdenek Kabelac +Date: Thu, 14 Sep 2023 00:51:58 +0200 +Subject: [PATCH 22/24] 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. +--- + test/shell/devicesfile-vpd-ids.sh | 328 +++++++++++++++--------------- + 1 file changed, 164 insertions(+), 164 deletions(-) + +diff --git a/test/shell/devicesfile-vpd-ids.sh b/test/shell/devicesfile-vpd-ids.sh +index 9a12f49f9..37fb6b79f 100644 +--- a/test/shell/devicesfile-vpd-ids.sh ++++ b/test/shell/devicesfile-vpd-ids.sh +@@ -16,12 +16,10 @@ SKIP_WITH_LVMPOLLD=1 + + . lib/inittest + +-test "$DM_DEV_DIR" = "/dev" || skip "Only works with /dev access -> make check LVM_TEST_DEVDIR=/dev" +- +-aux lvmconf 'devices/use_devicesfile = 1' ++SYS_DIR="sys" + # requires trailing / to match dm +-aux lvmconf 'devices/device_id_sysfs_dir = "/test/sys/"' +-SYS_DIR="/test/sys" ++aux lvmconf "devices/device_id_sysfs_dir = \"$PWD/$SYS_DIR/\"" \ ++ "devices/use_devicesfile = 1" + + # These values match the values encoded in the binary blob + # written to dev1_vpd_pg83 +@@ -34,7 +32,7 @@ DEV1_NAA2=naa.600a098000000002ac18542400000dbd + DEV1_NAA3=naa.553b13644430344b4e3f486d32647962 + + create_base() { +- mkdir -p $SYS_DIR/dev/block ++ mkdir -p "$SYS_DIR/dev/block" + + echo -n "0083 009c 0201 0020 4c56 4d54 5354 2020 \ + 204c 554e 2038 3039 7741 4c56 4d54 5354 \ +@@ -45,39 +43,36 @@ create_base() { + 0000 0dbd 0114 0004 0101 0005 0115 0004 \ + 0000 03ec 0328 0028 6e61 612e 3535 3342 \ + 3133 3634 3434 3330 3334 3442 3445 3346 \ +- 3438 3644 3332 3634 3739 3632 0000 0000" | xxd -r -p > $SYS_DIR/dev1_vpd_pg83 ++ 3438 3644 3332 3634 3739 3632 0000 0000" | xxd -r -p > "$SYS_DIR/dev1_vpd_pg83" + } + + remove_base() { +- rm $SYS_DIR/dev1_vpd_pg83 +- rmdir $SYS_DIR/dev/block +- rmdir $SYS_DIR/dev +- rmdir $SYS_DIR ++ rm "$SYS_DIR/dev1_vpd_pg83" ++ rmdir "$SYS_DIR/dev/block" ++ rmdir "$SYS_DIR/dev" ++ rmdir "$SYS_DIR" + } + + setup_sysfs() { +- mkdir -p $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device +- echo $1 > $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid +- cp $SYS_DIR/dev1_vpd_pg83 $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/vpd_pg83 ++ mkdir -p "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device" ++ echo "$1" > "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid" ++ cp "$SYS_DIR/dev1_vpd_pg83" "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/vpd_pg83" + } + + cleanup_sysfs() { +- rm -f $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid +- rm -f $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/vpd_pg83 +- rmdir $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device || true +- rmdir $SYS_DIR/dev/block/$MAJOR1:$MINOR1 || true ++ rm -f "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid" ++ rm -f "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/vpd_pg83" ++ rmdir "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device" || true ++ rmdir "$SYS_DIR/dev/block/$MAJOR1:$MINOR1" || true + } + ++aux prepare_scsi_debug_dev 16 || skip + +-modprobe scsi_debug dev_size_mb=16 num_tgts=1 +-sleep 2 + # Get scsi device name created by scsi_debug. + # SD = sdh + # DEV1 = /dev/sdh +-SD=$(grep -H scsi_debug /sys/block/sd*/device/model | cut -f4 -d /); +-echo $SD +-DEV1=/dev/$SD +-echo $DEV1 ++DEV1=$(< SCSI_DEBUG_DEV) ++echo "Using scsi_debug device: $DEV1" + + DFDIR="$LVM_SYSTEM_DIR/devices" + mkdir -p "$DFDIR" || true +@@ -87,22 +82,23 @@ touch $DF + + pvcreate "$DEV1" + vgcreate $vg "$DEV1" +-MAJOR1=`pvs "$DEV1" --noheading -o major | tr -d - | awk '{print $1}'` +-MINOR1=`pvs "$DEV1" --noheading -o minor | tr -d - | awk '{print $1}'` +-PVID1=`pvs "$DEV1" --noheading -o uuid | tr -d - | awk '{print $1}'` ++eval "$(pvs --noheading --nameprefixes -o major,minor,uuid "$DEV1")" ++MAJOR1=$LVM2_PV_MAJOR ++MINOR1=$LVM2_PV_MINOR ++PVID1=${LVM2_PV_UUID//-/} + + create_base + + # No sys/wwid, lvm uses wwid from sys/vpd + +-setup_sysfs $DEV1_NAA ++setup_sysfs "$DEV1_NAA" + # no sys/wwid is reported +-rm $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid +-rm $DF ++rm "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid" ++rm "$DF" + lvmdevices --adddev "$DEV1" +-cat $DF ++cat "$DF" + pvs "$DEV1" +-grep $DEV1_NAA $DF ++grep "$DEV1_NAA" "$DF" + cleanup_sysfs + + # Kernel changes the type printed from sys/wwid from t10 to naa +@@ -113,15 +109,15 @@ cleanup_sysfs + # reporting pvs should still find the dev based on using vpd data + # and find the t10 value there + +-setup_sysfs $DEV1_T10 +-rm $DF ++setup_sysfs "$DEV1_T10" ++rm "$DF" + lvmdevices --adddev "$DEV1" +-cat $DF +-grep sys_wwid $DF +-grep $DEV1_T10 $DF ++cat "$DF" ++grep sys_wwid "$DF" ++grep "$DEV1_T10" "$DF" + pvs "$DEV1" + # kernel changes what it reports from sys/wwid +-echo $DEV1_NAA > $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid ++echo "$DEV1_NAA" > "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid" + # lvm finds the original t10 id in vpd + pvs "$DEV1" + cleanup_sysfs +@@ -132,229 +128,231 @@ cleanup_sysfs + # df entry uses the specified type + # reporting pvs should show the pv + +-setup_sysfs $DEV1_T10 +-rm $DF ++setup_sysfs "$DEV1_T10" ++rm "$DF" + lvmdevices --adddev "$DEV1" --deviceidtype wwid_naa +-cat $DF +-grep wwid_naa $DF +-grep $DEV1_NAA $DF ++cat "$DF" ++grep wwid_naa "$DF" ++grep "$DEV1_NAA" "$DF" + pvs "$DEV1" + lvmdevices --deldev "$DEV1" + lvmdevices --addpvid "$PVID1" --deviceidtype wwid_naa +-cat $DF +-grep $DEV1_NAA $DF ++cat "$DF" ++grep "$DEV1_NAA" "$DF" + pvs "$DEV1" + lvmdevices --deldev "$DEV1" + lvmdevices --adddev "$DEV1" --deviceidtype wwid_eui +-cat $DF +-grep wwid_eui $DF +-grep $DEV1_EUI $DF ++cat "$DF" ++grep wwid_eui "$DF" ++grep "$DEV1_EUI" "$DF" + pvs "$DEV1" + cleanup_sysfs + +-# Any of the vpd wwids can be used in the devices file ++# Any of the vpd wwids can be used in the devices file + # with type sys_wwid and the device will be matched to + # it by finding that wwid in the vpd data. + +-setup_sysfs $DEV1_NAA +-rm $DF ++setup_sysfs "$DEV1_NAA" ++rm "$DF" + lvmdevices --adddev "$DEV1" +-cat $DF +-rm $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid ++cat "$DF" ++rm "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid" + pvs "$DEV1" + cleanup_sysfs + +-setup_sysfs $DEV1_NAA2 +-rm $DF ++setup_sysfs "$DEV1_NAA2" ++rm "$DF" + lvmdevices --adddev "$DEV1" +-cat $DF +-rm $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid ++cat "$DF" ++rm "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid" + pvs "$DEV1" + cleanup_sysfs + +-setup_sysfs $DEV1_NAA3 +-rm $DF ++setup_sysfs "$DEV1_NAA3" ++rm "$DF" + lvmdevices --adddev "$DEV1" +-cat $DF +-rm $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid ++cat "$DF" ++rm "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid" + pvs "$DEV1" + cleanup_sysfs + +-setup_sysfs $DEV1_EUI +-rm $DF ++setup_sysfs "$DEV1_EUI" ++rm "$DF" + lvmdevices --adddev "$DEV1" +-cat $DF +-rm $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid ++cat "$DF" ++rm "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid" + pvs "$DEV1" + cleanup_sysfs + +-setup_sysfs $DEV1_T10 +-rm $DF ++setup_sysfs "$DEV1_T10" ++rm "$DF" + lvmdevices --adddev "$DEV1" +-cat $DF +-rm $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid ++cat "$DF" ++rm "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid" + pvs "$DEV1" + cleanup_sysfs + + # Test nvme wwid that starts with "nvme" instead of naa/eui/t10 +-rm $DF ++rm "$DF" + aux wipefs_a "$DEV1" +-mkdir -p $SYS_DIR/dev/block/$MAJOR1:$MINOR1/ +-echo "nvme.111111111111111111122222222222333333333333333-44444444444444444445555555555556666666666666666662-00000001" > $SYS_DIR/dev/block/$MAJOR1:$MINOR1/wwid ++mkdir -p "$SYS_DIR/dev/block/$MAJOR1:$MINOR1" ++echo "nvme.111111111111111111122222222222333333333333333-44444444444444444445555555555556666666666666666662-00000001" > "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/wwid" + lvmdevices --adddev "$DEV1" +-cat $DF ++cat "$DF" + vgcreate $vg "$DEV1" + lvcreate -l1 -an $vg +-cat $DF ++cat "$DF" + pvs -o+deviceidtype,deviceid "$DEV1" |tee out + grep sys_wwid out + grep nvme.111 out +-grep sys_wwid $DF +-grep nvme.111 $DF ++grep sys_wwid "$DF" ++grep nvme.111 "$DF" + lvmdevices --deldev "$DEV1" + not lvmdevices --adddev "$DEV1" --deviceidtype wwid_eui + lvmdevices --adddev "$DEV1" --deviceidtype sys_wwid + lvmdevices | grep nvme.111 + lvremove -y $vg +-sleep 1 ++sleep .1 + lvs $vg + vgremove $vg +-rm $SYS_DIR/dev/block/$MAJOR1:$MINOR1/wwid ++rm "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/wwid" + cleanup_sysfs + + # Test t10 wwid containing quote +-rm $DF ++rm "$DF" + aux wipefs_a "$DEV1" +-mkdir -p $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device +-echo "t10.ATA_2.5\"_SATA_SSD_1112-A___111111111111" > $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid ++mkdir -p "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device" ++echo "t10.ATA_2.5\"_SATA_SSD_1112-A___111111111111" > "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid" + lvmdevices --adddev "$DEV1" +-cat $DF ++cat "$DF" + vgcreate $vg "$DEV1" + lvcreate -l1 -an $vg +-cat $DF ++cat "$DF" + # check wwid string in metadata output + pvs -o+deviceidtype,deviceid "$DEV1" |tee out + grep sys_wwid out + # the quote is removed after the 5 + grep 2.5_SATA_SSD out + # check wwid string in system.devices +-grep sys_wwid $DF ++grep sys_wwid "$DF" + # the quote is removed after the 5 +-grep 2.5_SATA_SSD $DF ++grep 2.5_SATA_SSD "$DF" + lvremove -y $vg + vgremove $vg +-rm $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid ++rm "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid" + cleanup_sysfs + + # Test t10 wwid with trailing space and line feed at the end +-rm $DF ++rm "$DF" + aux wipefs_a "$DEV1" +-mkdir -p $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device ++mkdir -p "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device" + echo -n "7431 302e 4154 4120 2020 2020 5642 4f58 \ + 2048 4152 4444 4953 4b20 2020 2020 2020 \ + 2020 2020 2020 2020 2020 2020 2020 2020 \ + 2020 2020 5642 3963 3130 6433 3138 2d31 \ +-3838 6439 6562 6320 0a" | xxd -r -p > $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid +-cat $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid ++3838 6439 6562 6320 0a" | xxd -r -p > "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid" ++cat "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid" + lvmdevices --adddev "$DEV1" +-cat $DF ++cat "$DF" + vgcreate $vg "$DEV1" + lvcreate -l1 -an $vg +-cat $DF ++cat "$DF" + # check wwid string in metadata output + pvs -o+deviceidtype,deviceid "$DEV1" |tee out + grep sys_wwid out + # check wwid string in system.devices +-grep sys_wwid $DF ++grep sys_wwid "$DF" + lvremove -y $vg + vgremove $vg +-rm $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid ++rm "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid" + cleanup_sysfs + + # Test t10 wwid with trailing space at the end that was created by 9.0/9.1 +-rm $DF ++rm "$DF" + aux wipefs_a "$DEV1" +-mkdir -p $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device ++mkdir -p "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device" + echo -n "7431 302e 4154 4120 2020 2020 5642 4f58 \ + 2048 4152 4444 4953 4b20 2020 2020 2020 \ + 2020 2020 2020 2020 2020 2020 2020 2020 \ + 2020 2020 5642 3963 3130 6433 3138 2d31 \ +-3838 6439 6562 6320 0a" | xxd -r -p > $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid +-cat $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid ++3838 6439 6562 6320 0a" | xxd -r -p > "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid" ++cat "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid" + lvmdevices --adddev "$DEV1" +-cat $DF ++cat "$DF" + vgcreate $vg "$DEV1" +-PVID1=`pvs "$DEV1" --noheading -o uuid | tr -d - | awk '{print $1}'` ++eval "$(pvs --noheading --nameprefixes -o uuid "$DEV1")" ++PVID1=${LVM2_PV_UUID//-/} + T10_WWID_RHEL91="t10.ATA_____VBOX_HARDDISK___________________________VB9c10d318-188d9ebc_" + lvcreate -l1 -an $vg +-cat $DF ++cat "$DF" + # check wwid string in metadata output + pvs -o+deviceidtype,deviceid "$DEV1" |tee out + grep sys_wwid out + # check wwid string in system.devices +-grep sys_wwid $DF ++grep sys_wwid "$DF" + # Replace IDNAME with the IDNAME that 9.0/9.1 created from this wwid +-cat $DF | grep -v IDNAME > $DFTMP +-cat $DFTMP +-echo "IDTYPE=sys_wwid IDNAME=t10.ATA_____VBOX_HARDDISK___________________________VB9c10d318-188d9ebc_ DEVNAME=${DEV1} PVID=${PVID1}" >> $DFTMP +-cp $DFTMP $DF +-cat $DF ++cat "$DF" | grep -v IDNAME > "$DFTMP" ++cat "$DFTMP" ++echo "IDTYPE=sys_wwid IDNAME=t10.ATA_____VBOX_HARDDISK___________________________VB9c10d318-188d9ebc_ DEVNAME=${DEV1} PVID=${PVID1}" >> "$DFTMP" ++cp "$DFTMP" "$DF" ++cat "$DF" + vgs + pvs + pvs -o+deviceidtype,deviceid "$DEV1" + # Removing the trailing _ which should then work +-cat $DF | grep -v IDNAME > $DFTMP +-cat $DFTMP +-echo "IDTYPE=sys_wwid IDNAME=t10.ATA_____VBOX_HARDDISK___________________________VB9c10d318-188d9ebc DEVNAME=${DEV1} PVID=${PVID1}" >> $DFTMP +-cp $DFTMP $DF +-cat $DF ++cat "$DF" | grep -v IDNAME > "$DFTMP" ++cat "$DFTMP" ++echo "IDTYPE=sys_wwid IDNAME=t10.ATA_____VBOX_HARDDISK___________________________VB9c10d318-188d9ebc DEVNAME=${DEV1} PVID=${PVID1}" >> "$DFTMP" ++cp "$DFTMP" "$DF" ++cat "$DF" + vgs + pvs + pvs -o+deviceidtype,deviceid "$DEV1" + lvremove -y $vg + vgremove $vg +-rm $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid ++rm "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid" + cleanup_sysfs + + # test a t10 wwid that has actual trailing underscore which + # is followed by a trailing space. +-rm $DF ++rm "$DF" + aux wipefs_a "$DEV1" +-mkdir -p $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device ++mkdir -p "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device" + echo -n "7431 302e 4154 4120 2020 2020 5642 4f58 \ + 2048 4152 4444 4953 4b20 2020 2020 2020 \ + 2020 2020 2020 2020 2020 2020 2020 2020 \ + 2020 2020 5642 3963 3130 6433 3138 2d31 \ +-3838 6439 6562 5f20 0a" | xxd -r -p > $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid +-cat $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid ++3838 6439 6562 5f20 0a" | xxd -r -p > "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid" ++cat "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid" + # The wwid has an actual underscore char (5f) followed by a space char (20) + # 9.1 converts the trailing space to an underscore + T10_WWID_RHEL91="t10.ATA_____VBOX_HARDDISK___________________________VB9c10d318-188d9eb__" + # 9.2 ignores the trailing space + T10_WWID_RHEL92="t10.ATA_____VBOX_HARDDISK___________________________VB9c10d318-188d9eb_" + lvmdevices --adddev "$DEV1" +-cat $DF ++cat "$DF" + vgcreate $vg "$DEV1" +-PVID1=`pvs "$DEV1" --noheading -o uuid | tr -d - | awk '{print $1}'` ++eval "$(pvs --noheading --nameprefixes -o uuid "$DEV1")" ++PVID1=${LVM2_PV_UUID//-/} + lvcreate -l1 -an $vg +-cat $DF ++cat "$DF" + # check wwid string in metadata output + pvs -o+deviceidtype,deviceid "$DEV1" |tee out + grep sys_wwid out + # check wwid string in system.devices +-grep sys_wwid $DF ++grep sys_wwid "$DF" + # Replace IDNAME with the IDNAME that 9.0/9.1 created from this wwid +-cat $DF | grep -v IDNAME > $DFTMP +-cat $DFTMP +-echo "IDTYPE=sys_wwid IDNAME=${T10_WWID_RHEL91} DEVNAME=${DEV1} PVID=${PVID1}" >> $DFTMP +-cp $DFTMP $DF +-cat $DF ++cat "$DF" | grep -v IDNAME > "$DFTMP" ++cat "$DFTMP" ++echo "IDTYPE=sys_wwid IDNAME=${T10_WWID_RHEL91} DEVNAME=${DEV1} PVID=${PVID1}" >> "$DFTMP" ++cp "$DFTMP" "$DF" ++cat "$DF" + vgs + pvs + pvs -o+deviceidtype,deviceid "$DEV1" + lvremove -y $vg + vgremove $vg +-rm $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid ++rm "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid" + cleanup_sysfs + + # +@@ -363,67 +361,70 @@ cleanup_sysfs + # underscores are understood. + # + +-rm $DF ++rm "$DF" + aux wipefs_a "$DEV1" +-mkdir -p $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device +-echo -n " s123 456 " > $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/serial ++mkdir -p "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device" ++echo -n " s123 456 " > "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/serial" + lvmdevices --adddev "$DEV1" +-cat $DF +-grep "IDNAME=s123__456 DEVNAME" $DF ++cat "$DF" ++grep "IDNAME=s123__456 DEVNAME" "$DF" + vgcreate $vg "$DEV1" +-PVID1=`pvs "$DEV1" --noheading -o uuid | tr -d - | awk '{print $1}'` +-cat $DF | grep -v IDNAME > $DFTMP +-cat $DFTMP +-echo "IDTYPE=sys_serial IDNAME=__s123__456__ DEVNAME=${DEV1} PVID=${PVID1}" >> $DFTMP +-cp $DFTMP $DF +-cat $DF ++eval "$(pvs --noheading --nameprefixes -o uuid "$DEV1")" ++PVID1=${LVM2_PV_UUID//-/} ++cat "$DF" | grep -v IDNAME > "$DFTMP" ++cat "$DFTMP" ++echo "IDTYPE=sys_serial IDNAME=__s123__456__ DEVNAME=${DEV1} PVID=${PVID1}" >> "$DFTMP" ++cp "$DFTMP" "$DF" ++cat "$DF" + vgs + pvs -o+deviceidtype,deviceid "$DEV1" + lvremove -y $vg + vgremove $vg +-rm $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/serial ++rm "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/serial" + cleanup_sysfs + +-rm $DF ++rm "$DF" + aux wipefs_a "$DEV1" +-mkdir -p $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device +-echo -n " t10.123 456 " > $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid ++mkdir -p "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device" ++echo -n " t10.123 456 " > "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid" + lvmdevices --adddev "$DEV1" +-cat $DF +-grep "IDNAME=t10.123_456 DEVNAME" $DF ++cat "$DF" ++grep "IDNAME=t10.123_456 DEVNAME" "$DF" + vgcreate $vg "$DEV1" +-PVID1=`pvs "$DEV1" --noheading -o uuid | tr -d - | awk '{print $1}'` +-cat $DF | grep -v IDNAME > $DFTMP +-cat $DFTMP +-echo "IDTYPE=sys_wwid IDNAME=__t10.123__456__ DEVNAME=${DEV1} PVID=${PVID1}" >> $DFTMP +-cp $DFTMP $DF +-cat $DF ++eval "$(pvs --noheading --nameprefixes -o uuid "$DEV1")" ++PVID1=${LVM2_PV_UUID//-/} ++cat "$DF" | grep -v IDNAME > "$DFTMP" ++cat "$DFTMP" ++echo "IDTYPE=sys_wwid IDNAME=__t10.123__456__ DEVNAME=${DEV1} PVID=${PVID1}" >> "$DFTMP" ++cp "$DFTMP" "$DF" ++cat "$DF" + vgs + pvs -o+deviceidtype,deviceid "$DEV1" + lvremove -y $vg + vgremove $vg +-rm $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid ++rm "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid" + cleanup_sysfs + +-rm $DF ++rm "$DF" + aux wipefs_a "$DEV1" +-mkdir -p $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device +-echo -n " naa.123 456 " > $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid ++mkdir -p "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device" ++echo -n " naa.123 456 " > "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid" + lvmdevices --adddev "$DEV1" +-cat $DF +-grep "IDNAME=naa.123__456 DEVNAME" $DF ++cat "$DF" ++grep "IDNAME=naa.123__456 DEVNAME" "$DF" + vgcreate $vg "$DEV1" +-PVID1=`pvs "$DEV1" --noheading -o uuid | tr -d - | awk '{print $1}'` +-cat $DF | grep -v IDNAME > $DFTMP +-cat $DFTMP +-echo "IDTYPE=sys_wwid IDNAME=__naa.123__456__ DEVNAME=${DEV1} PVID=${PVID1}" >> $DFTMP +-cp $DFTMP $DF +-cat $DF ++eval "$(pvs --noheading --nameprefixes -o uuid "$DEV1")" ++PVID1=${LVM2_PV_UUID//-/} ++cat "$DF" | grep -v IDNAME > "$DFTMP" ++cat "$DFTMP" ++echo "IDTYPE=sys_wwid IDNAME=__naa.123__456__ DEVNAME=${DEV1} PVID=${PVID1}" >> "$DFTMP" ++cp "$DFTMP" "$DF" ++cat "$DF" + vgs + pvs -o+deviceidtype,deviceid "$DEV1" + lvremove -y $vg + vgremove $vg +-rm $SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid ++rm "$SYS_DIR/dev/block/$MAJOR1:$MINOR1/device/wwid" + cleanup_sysfs + + +@@ -433,4 +434,3 @@ cleanup_sysfs + # This would let the user specify the second naa wwid. + + remove_base +-rmmod scsi_debug || true +-- +2.35.3 + diff --git a/0023-tests-skip-test-when-lvmdbusd-runs-on-the-system.patch b/0023-tests-skip-test-when-lvmdbusd-runs-on-the-system.patch new file mode 100644 index 0000000..52bd5fd --- /dev/null +++ b/0023-tests-skip-test-when-lvmdbusd-runs-on-the-system.patch @@ -0,0 +1,27 @@ +From a55bd2ddc1ca21ca6fb44df58d7287f619cb54f6 Mon Sep 17 00:00:00 2001 +From: Zdenek Kabelac +Date: Thu, 14 Sep 2023 01:42:29 +0200 +Subject: [PATCH 23/24] tests: skip test when lvmdbusd runs on the system + +lvmdbusd changes $RUNDIR results. +--- + test/shell/duplicate-pvs-md0.sh | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/test/shell/duplicate-pvs-md0.sh b/test/shell/duplicate-pvs-md0.sh +index ea800cf5a..9c1005b0b 100644 +--- a/test/shell/duplicate-pvs-md0.sh ++++ b/test/shell/duplicate-pvs-md0.sh +@@ -27,6 +27,9 @@ _clear_online_files() { + + . lib/inittest + ++# Running lvmdbusd with its fullreport scannnig changes $RUNDIR results ++pgrep lvmdbusd && skip "Test cannot work, while there is running lvmdbusd." ++ + MD_LEVEL=${MD_LEVEL-0} + + aux prepare_devs 4 10 +-- +2.35.3 + diff --git a/0024-tests-better-slowdown.patch b/0024-tests-better-slowdown.patch new file mode 100644 index 0000000..98cb54a --- /dev/null +++ b/0024-tests-better-slowdown.patch @@ -0,0 +1,38 @@ +From dc31f8bdd8d6685c04802a023b769fe9310f1c91 Mon Sep 17 00:00:00 2001 +From: Zdenek Kabelac +Date: Wed, 23 Aug 2023 13:47:06 +0200 +Subject: [PATCH 24/24] tests: better slowdown + +--- + test/shell/lvconvert-mirror.sh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/test/shell/lvconvert-mirror.sh b/test/shell/lvconvert-mirror.sh +index 17ed033b2..461d14748 100644 +--- a/test/shell/lvconvert-mirror.sh ++++ b/test/shell/lvconvert-mirror.sh +@@ -323,10 +323,10 @@ SHOULD= + aux throttle_dm_mirror || SHOULD=should + + # Use large enough mirror that takes time to sychronize with small regionsize +-lvcreate -aey -L30 -Zn -Wn --type mirror --regionsize 16k -m2 -n $lv1 $vg "$dev1" "$dev2" "$dev4" "$dev3:$DEVRANGE" ++lvcreate -aey -L20 -Zn -Wn --type mirror --regionsize 4k -m2 -n $lv1 $vg "$dev1" "$dev2" "$dev4" "$dev3:$DEVRANGE" + $SHOULD not lvconvert -m-1 $vg/$lv1 "$dev1" 2>&1 | tee out + aux restore_dm_mirror +-grep "not in-sync" out ++$SHOULD grep "not in-sync" out + + lvconvert $vg/$lv1 # wait + +@@ -341,7 +341,7 @@ lvremove -ff $vg + aux throttle_dm_mirror || : + # No parallel lvconverts on a single LV please + # Use big enough mirror size and small regionsize to run on all test machines succesfully +-lvcreate -aey -Zn -Wn -L30 --type mirror --regionsize 16k -m1 -n $lv1 $vg "$dev1" "$dev2" "$dev3:0-8" ++lvcreate -aey -Zn -Wn -L20 --type mirror --regionsize 4k -m1 -n $lv1 $vg "$dev1" "$dev2" "$dev3:0-8" + check mirror $vg $lv1 + check mirror_legs $vg $lv1 2 + +-- +2.35.3 + diff --git a/LVM2.2.03.22.tgz b/LVM2.2.03.22.tgz new file mode 100644 index 0000000..c232e9c --- /dev/null +++ b/LVM2.2.03.22.tgz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4c5a6923bd1ace7ce04474608a84937ce053ba91b1ace9f0b0017268e732dc7c +size 2755031 diff --git a/LVM2.2.03.22.tgz.asc b/LVM2.2.03.22.tgz.asc new file mode 100644 index 0000000..5d90987 --- /dev/null +++ b/LVM2.2.03.22.tgz.asc @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCAAdFiEE1QGkeEQK4v0TChvouREkMeUJA58FAmTKUZsACgkQuREkMeUJ +A5+Z1A//eTi65tos1se3+iivR+K1soXQLagU3WdwgOUbPu5amjipNZ6iMWCuGLOH +XleuHRGQb0ytnkRwlUeYgUkcaFqbofH9FmY5Hugp20BE+8P3bfeAX5a5ApsoU0wF +fY+XlSyuq3waFAM7XadxTgiOqWNT4Y+CnO3IUfAlkupOZi2h+00U8FlroIZdLqKR +919CpIyh9obPxvvQeE30vNQVA8jUazG7pkq9J/bVFf4ZYqJ1AieDFQ05dqAvdO4e +I8A/0Hc6n5OZBgbK1eX8EvpYuQOd5YYVFtsLoYzCl6Q1AZ5hviddifqxwnSHyPX7 +iXt82ppRBIEO500QK/R+6ZAu1qF7S5ZVQMvWuSQM4hYwxJfipFaWDljpS2Gc8x8h +YIB7BSbNJMFu1Qf1iE/I8yqTt7x+Q/zL8paat5P5ZpsD//tG/CAWyfcml7ieTGDY +yoMuIY8GzAFYYzSWtubQEJx75E757cexOeZu5oiDfjSU6JxYFzoNWoF79NUVzTgU +bscvzWnibIjGpDoSD6aCjjmmNbbpnSALjUdKnUlt+KDR72u66KDssTQOpbg/W17T +Ghxe+I0kF8FObSD9T7CockCx81dqS7lrq8jLkMmAk9TKzr4OPi8mMjCMqGha+swg +Z/Sy/z/V7BAdknyRvg4ZQKxrA+9rRizt/xMlgpnRY8nvk+8VgYw= +=yBW6 +-----END PGP SIGNATURE----- diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..f58f8a2 --- /dev/null +++ b/_multibuild @@ -0,0 +1,4 @@ + + devicemapper + lockd + diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..1251383 --- /dev/null +++ b/baselibs.conf @@ -0,0 +1,7 @@ +libdevmapper1_03 + conflicts "device-mapper- < " +libdevmapper-event1_03 + conflicts "device-mapper- < " +device-mapper-devel + requires "libdevmapper1_03- = " + requires "libdevmapper-event1_03- = " diff --git a/bug-1012973_simplify-special-case-for-md-in-69-dm-lvm-rules.patch b/bug-1012973_simplify-special-case-for-md-in-69-dm-lvm-rules.patch new file mode 100644 index 0000000..ca952c1 --- /dev/null +++ b/bug-1012973_simplify-special-case-for-md-in-69-dm-lvm-rules.patch @@ -0,0 +1,66 @@ +From 5633a8ad6522f0f1340ef35c2f3943a3b20cc200 Mon Sep 17 00:00:00 2001 +From: NeilBrown +Date: Wed, 4 Jan 2017 14:20:53 +1100 +Subject: [PATCH] Simplify special-case for md in 69-dm-lvm.rules.in + +This special casing brings little value. It appears to attempt to +determine if the array is active yet or not, and to skip +processing if the array has not yet been started. +However, if the array hasn't been started, then "blkid" will +not have been able to read a signature, so: + ENV{ID_FS_TYPE}!="LVM2_member|LVM1_member", GOTO="lvm_end" +will have caused all this code to be skipped. + +Further, this code causes incorrect behaviour in at least one case. +It assumes that the first "add" event should be ignored, as it will be +followed by a "change" event which indicates the array coming on line. +This is consistent with how the kernel sends events, but not always +consistent with how this script sees event. +Specifically: if the initrd has "mdadm" support installed, but not +"lvm2" support, then the initial "add" and "change" events will +happen while the initrd is in charge and this file is not available. +Once the root filesystem is mountd, this file will be available +and "udevadm trigger --action=add" will be run. +So the first and only event seen by this script for an md device will be +"add", and it will incorrectly ignore it. + +So replace the special handling with code that simply jumps to lvm_scan +on any 'add' or 'change' event. + +Signed-off-by: NeilBrown + +2023-09-18: +udev/69-dm-lvm-metadata.rules was removed in v2_03_09 and 69-dm-lvm.rules.in +should be modified instead. The subject of this patch should be modified too. +NOTE: the updated patch may let shell/duplicate-pvs-md0.sh fail because +we change timing of lvm_scan in the rule file. + +Signed-off-by: Glass Su + +--- + udev/69-dm-lvm.rules.in | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/udev/69-dm-lvm.rules.in b/udev/69-dm-lvm.rules.in +index 3ec50a5cb878..45fdad444562 100644 +--- a/udev/69-dm-lvm.rules.in ++++ b/udev/69-dm-lvm.rules.in +@@ -35,12 +35,11 @@ ENV{DM_UDEV_PRIMARY_SOURCE_FLAG}=="1", ENV{DM_ACTIVATION}=="1", GOTO="lvm_scan" + GOTO="lvm_end" + + # MD device: ++# Need to scan on both 'add' and 'change' + LABEL="next" + KERNEL!="md[0-9]*", GOTO="next" +-IMPORT{db}="LVM_MD_PV_ACTIVATED" +-ACTION=="add", ENV{LVM_MD_PV_ACTIVATED}=="1", GOTO="lvm_scan" +-ACTION=="change", ENV{LVM_MD_PV_ACTIVATED}!="1", TEST=="md/array_state", ENV{LVM_MD_PV_ACTIVATED}="1", GOTO="lvm_scan" +-ACTION=="add", KERNEL=="md[0-9]*p[0-9]*", GOTO="lvm_scan" ++ACTION=="add", GOTO="lvm_scan" ++ACTION=="change", GOTO="lvm_scan" + GOTO="lvm_end" + + # Loop device: +-- +2.42.0 + diff --git a/bug-1037309_Makefile-skip-compliling-daemons-lvmlockd-directory.patch b/bug-1037309_Makefile-skip-compliling-daemons-lvmlockd-directory.patch new file mode 100644 index 0000000..d69a789 --- /dev/null +++ b/bug-1037309_Makefile-skip-compliling-daemons-lvmlockd-directory.patch @@ -0,0 +1,47 @@ +From 6cfd57627c7c8b1aee4cf8164d88e206660bf753 Mon Sep 17 00:00:00 2001 +From: Eric Ren +Date: Tue, 4 Jul 2017 20:11:17 +0800 +Subject: [PATCH] build: skip compliling daemons/lvmlockd directory + +bsc#1037309 + +Signed-off-by: Eric Ren +--- + configure | 3 ++- + daemons/Makefile.in | 6 +++--- + 2 files changed, 5 insertions(+), 4 deletions(-) + +diff --git a/configure b/configure +index 0bb5b3dbc6ca..ea657178076b 100755 +--- a/configure ++++ b/configure +@@ -12023,7 +12023,8 @@ fi + printf "%s\n" "$BUILD_LVMPOLLD" >&6; } + + ################################################################################ +-BUILD_LVMLOCKD=no ++#BUILD_LVMLOCKD=no ++BUILD_LVMLOCKD=yes + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build lvmlockdsanlock" >&5 + printf %s "checking whether to build lvmlockdsanlock... " >&6; } +diff --git a/daemons/Makefile.in b/daemons/Makefile.in +index e548b1556478..642d839c046f 100644 +--- a/daemons/Makefile.in ++++ b/daemons/Makefile.in +@@ -32,9 +32,9 @@ ifeq ("@BUILD_LVMPOLLD@", "yes") + SUBDIRS += lvmpolld + endif + +-ifeq ("@BUILD_LVMLOCKD@", "yes") +- SUBDIRS += lvmlockd +-endif ++#ifeq ("@BUILD_LVMLOCKD@", "yes") ++# SUBDIRS += lvmlockd ++#endif + + ifeq ("@BUILD_LVMDBUSD@", "yes") + SUBDIRS += lvmdbusd +-- +2.42.0 + diff --git a/bug-1184124-link-tests-as-PIE.patch b/bug-1184124-link-tests-as-PIE.patch new file mode 100644 index 0000000..4e334e5 --- /dev/null +++ b/bug-1184124-link-tests-as-PIE.patch @@ -0,0 +1,12 @@ +diff --git a/test/Makefile.in b/test/Makefile.in +index 20e97ebd0f4d..d4d3ce9f6dc7 100644 +--- a/test/Makefile.in ++++ b/test/Makefile.in +@@ -31,6 +31,7 @@ LVM_TEST_RESULTS ?= results + SOURCES := lib/not.c lib/harness.c lib/dmsecuretest.c + CXXSOURCES := lib/runner.cpp + CXXFLAGS += $(EXTRA_EXEC_CFLAGS) ++LDFLAGS += -pie + + CLEAN_DIRS += dbus/__pycache__ $(LVM_TEST_RESULTS) + ifneq (.,$(firstword $(srcdir))) diff --git a/bug-1184687_Add-nolvm-for-kernel-cmdline.patch b/bug-1184687_Add-nolvm-for-kernel-cmdline.patch new file mode 100644 index 0000000..67d142d --- /dev/null +++ b/bug-1184687_Add-nolvm-for-kernel-cmdline.patch @@ -0,0 +1,46 @@ +From 6ebef9ad80ee156285a61d413b5265de9c0aa2ae Mon Sep 17 00:00:00 2001 +From: Heming Zhao +Date: Wed, 21 Apr 2021 11:17:36 +0800 +Subject: [PATCH] Add "nolvm" for kernel cmdline + +This patch is inspried by multipath patch cd3184e107c8 ("Add +support for "multipath=off" and "nompath" on kernel cmdline") + +This new item for disabling lvm2 startup from kernel command +line. One of usecases is in rescue mode, disabling lvm2 will +allow user to enable lvm2 devices by manual. + +Signed-off-by: Heming Zhao + +2023-09-07: +The file udev/69-dm-lvm-metad.rules.in has been removed since v2_03_19. +So remove the change of above file. + +Signed-off-by: Glass Su + +--- + +diff -Nupr a/scripts/lvm2-pvscan.service.in b/scripts/lvm2-pvscan.service.in +--- a/scripts/lvm2-pvscan.service.in 2022-09-02 14:05:03.706825230 +0800 ++++ b/scripts/lvm2-pvscan.service.in 2022-09-02 14:04:09.115063287 +0800 +@@ -7,6 +7,7 @@ BindsTo=dev-block-%i.device + After=multipathd.service + Before=shutdown.target + Conflicts=shutdown.target ++ConditionKernelCommandLine=!nolvm + + [Service] + Type=oneshot +diff -Nupr a/udev/69-dm-lvm.rules.in b/udev/69-dm-lvm.rules.in +--- a/udev/69-dm-lvm.rules.in 2022-09-02 14:04:51.074880312 +0800 ++++ b/udev/69-dm-lvm.rules.in 2022-09-02 14:07:19.978230990 +0800 +@@ -10,6 +10,9 @@ SUBSYSTEM!="block", GOTO="lvm_end" + + ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", GOTO="lvm_end" + ++IMPORT{cmdline}="nolvm" ++ENV{nolvm}=="?*", GOTO="lvm_end" ++ + # Only process devices already marked as a PV - this requires blkid to be called before. + ENV{ID_FS_TYPE}!="LVM2_member", GOTO="lvm_end" + ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="lvm_end" diff --git a/bug-1214071-blkdeactivate_calls_wrong_mountpoint.patch b/bug-1214071-blkdeactivate_calls_wrong_mountpoint.patch new file mode 100644 index 0000000..67e8c05 --- /dev/null +++ b/bug-1214071-blkdeactivate_calls_wrong_mountpoint.patch @@ -0,0 +1,20 @@ +From: Heming Zhao +Date: Sun, 20 Aug 2023 11:41:00 +0800 + +This patch is for 'bsc#1214071 - blkdeactivate calls wrong mountpoint cmd'. +Current 12sp5, 15sp2, 15sp3, 15sp4 & 15sp5 need to fix. + +Signed-off-by: Heming Zhao + +diff -Nupr a/scripts/blkdeactivate.sh.in b/scripts/blkdeactivate.sh.in +--- a/scripts/blkdeactivate.sh.in 2023-08-20 10:23:36.744082346 +0800 ++++ b/scripts/blkdeactivate.sh.in 2023-08-20 10:23:59.544161133 +0800 +@@ -35,7 +35,7 @@ DEV_DIR="/dev" + SYS_BLK_DIR="/sys/block" + + MDADM="/sbin/mdadm" +-MOUNTPOINT="/bin/mountpoint" ++MOUNTPOINT="/usr/bin/mountpoint" + MPATHD="/sbin/multipathd" + UMOUNT="/bin/umount" + VDO="/bin/vdo" diff --git a/bug-935623_dmeventd-fix-dso-name-wrong-compare.patch b/bug-935623_dmeventd-fix-dso-name-wrong-compare.patch new file mode 100644 index 0000000..4cfb082 --- /dev/null +++ b/bug-935623_dmeventd-fix-dso-name-wrong-compare.patch @@ -0,0 +1,36 @@ +From d5246ee0d534677439cf4af780422fbb2c9068b2 Mon Sep 17 00:00:00 2001 +From: Liuhua Wang +Date: Thu, 9 Jul 2015 15:44:20 +0800 +Subject: [PATCH] dmeventd: fix dso name wrong compare + +dso_name is thought as not empty and doesn't create monitor thread, +because lvm sets empty dso_name with "-". + +Signed-off-by: Liuhua Wang +References: bnc#935623 +--- + daemons/dmeventd/dmeventd.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git LVM2.2.02.120.orig/daemons/dmeventd/dmeventd.c LVM2.2.02.120/daemons/dmeventd/dmeventd.c +index e8d1e3b..3b1952c 100644 +--- LVM2.2.02.120.orig/daemons/dmeventd/dmeventd.c ++++ LVM2.2.02.120/daemons/dmeventd/dmeventd.c +@@ -1218,12 +1218,12 @@ static int _want_registered_device(char *dso_name, char *device_uuid, + struct thread_status *thread) + { + /* If DSO names and device paths are equal. */ +- if (dso_name && device_uuid) ++ if (dso_name && strcmp(dso_name, "-") && device_uuid) + return !strcmp(dso_name, thread->dso_data->dso_name) && + !strcmp(device_uuid, thread->device.uuid); + + /* If DSO names are equal. */ +- if (dso_name) ++ if (dso_name && strcmp(dso_name, "-")) + return !strcmp(dso_name, thread->dso_data->dso_name); + + /* If device paths are equal. */ +-- +1.8.4.5 + diff --git a/bug-998893_make_pvscan_service_after_multipathd.patch b/bug-998893_make_pvscan_service_after_multipathd.patch new file mode 100644 index 0000000..a353a84 --- /dev/null +++ b/bug-998893_make_pvscan_service_after_multipathd.patch @@ -0,0 +1,23 @@ +From 0da043466ace27eb483114c87ce81feaf00ed682 Mon Sep 17 00:00:00 2001 +From: Eric Ren +Date: Thu, 6 Apr 2017 11:22:30 +0800 +Subject: [PATCH] systemd service: make pvscan service after multipathd + +bsc#998893 +Signed-off-by: Eric Ren + +2020-05-13: +lvm2-lvmetad had been removed, so this patch was modified too. +Signed-off-by: Heming zhao +--- + +diff -Nupr a/scripts/lvm2-pvscan.service.in b/scripts/lvm2-pvscan.service.in +--- a/scripts/lvm2-pvscan.service.in 2020-05-13 11:28:58.290210992 +0800 ++++ b/scripts/lvm2-pvscan.service.in 2020-05-13 11:29:42.997788967 +0800 +@@ -4,6 +4,7 @@ Documentation=man:pvscan(8) + DefaultDependencies=no + StartLimitIntervalSec=0 + BindsTo=dev-block-%i.device ++After=multipathd.service + Before=shutdown.target + Conflicts=shutdown.target diff --git a/cmirrord_remove_date_time_from_compilation.patch b/cmirrord_remove_date_time_from_compilation.patch new file mode 100644 index 0000000..393178d --- /dev/null +++ b/cmirrord_remove_date_time_from_compilation.patch @@ -0,0 +1,16 @@ +cmirrord: Do not compile in Data and Time to avoid build retriggering in obs + +Signed-off-by: Thomas Renninger + +Index: LVM2.2.02.139/daemons/cmirrord/clogd.c +=================================================================== +--- LVM2.2.02.139.orig/daemons/cmirrord/clogd.c ++++ LVM2.2.02.139/daemons/cmirrord/clogd.c +@@ -78,7 +78,6 @@ int main(int argc, char *argv[]) + kill(getppid(), SIGTERM); + + LOG_PRINT("Starting cmirrord:"); +- LOG_PRINT(" Built: "__DATE__" "__TIME__"\n"); + LOG_DBG(" Compiled with debugging."); + + while (!exit_now) { diff --git a/fate-309425_display-dm-name-for-lv-name.patch b/fate-309425_display-dm-name-for-lv-name.patch new file mode 100644 index 0000000..b4db08a --- /dev/null +++ b/fate-309425_display-dm-name-for-lv-name.patch @@ -0,0 +1,56 @@ +--- + lib/config/config_settings.h | 3 +++ + lib/config/defaults.h | 1 + + lib/display/display.c | 13 +++++++++---- + 3 files changed, 13 insertions(+), 4 deletions(-) + +Index: LVM2.2.02.170/lib/config/config_settings.h +=================================================================== +--- LVM2.2.02.170.orig/lib/config/config_settings.h ++++ LVM2.2.02.170/lib/config/config_settings.h +@@ -1039,6 +1039,9 @@ cfg(global_fsadm_executable_CFG, "fsadm_ + "The full path to the fsadm command.\n" + "LVM uses this command to help with lvresize -r operations.\n") + ++cfg(global_display_dm_name_for_lv_name_CFG, "display_dm_name_for_lv_name", global_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_BOOL, DEFAULT_DISPLAY_DM_NAME_FOR_LV_NAME, vsn(2, 2, 98), NULL, 0, NULL, ++ "Display dm name for lv name.\n") ++ + cfg(global_system_id_source_CFG, "system_id_source", global_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_SYSTEM_ID_SOURCE, vsn(2, 2, 117), NULL, 0, NULL, + "The method LVM uses to set the local system ID.\n" + "Volume Groups can also be given a system ID (by vgcreate, vgchange,\n" +Index: LVM2.2.02.170/lib/config/defaults.h +=================================================================== +--- LVM2.2.02.170.orig/lib/config/defaults.h ++++ LVM2.2.02.170/lib/config/defaults.h +@@ -33,6 +33,7 @@ + #define DEFAULT_OBTAIN_DEVICE_LIST_FROM_UDEV 0 + #define DEFAULT_EXTERNAL_DEVICE_INFO_SOURCE "none" + #define DEFAULT_SYSFS_SCAN 1 ++#define DEFAULT_DISPLAY_DM_NAME_FOR_LV_NAME 0 + #define DEFAULT_MD_COMPONENT_DETECTION 1 + #define DEFAULT_FW_RAID_COMPONENT_DETECTION 0 + #define DEFAULT_MD_CHUNK_ALIGNMENT 1 +Index: LVM2.2.02.170/lib/display/display.c +=================================================================== +--- LVM2.2.02.170.orig/lib/display/display.c ++++ LVM2.2.02.170/lib/display/display.c +@@ -413,10 +413,15 @@ int lvdisplay_full(struct cmd_context *c + lv->vg->cmd->dev_dir, lv->vg->name, lv->name); + else if (lv_is_visible(lv)) { + /* Thin pool does not have /dev/vg/name link */ +- if (!lv_is_thin_pool(lv)) +- log_print("LV Path %s%s/%s", +- lv->vg->cmd->dev_dir, +- lv->vg->name, lv->name); ++ if (!lv_is_thin_pool(lv)) { ++ if (find_config_tree_bool(cmd, global_display_dm_name_for_lv_name_CFG, NULL)) { ++ log_print("LV Path %smapper/%s-%s", lv->vg->cmd->dev_dir, ++ lv->vg->name, lv->name); ++ } else { ++ log_print("LV Path %s%s/%s", lv->vg->cmd->dev_dir, ++ lv->vg->name, lv->name); ++ } ++ } + log_print("LV Name %s", lv->name); + } else + log_print("Internal LV Name %s", lv->name); diff --git a/fate-31841-01_fsadm-add-support-to-resize-check-btrfs-filesystem.patch b/fate-31841-01_fsadm-add-support-to-resize-check-btrfs-filesystem.patch new file mode 100644 index 0000000..2195e2b --- /dev/null +++ b/fate-31841-01_fsadm-add-support-to-resize-check-btrfs-filesystem.patch @@ -0,0 +1,191 @@ +From 29562a0f53dad77d5d62f5d8b3bf29401d619867 Mon Sep 17 00:00:00 2001 +From: Heming Zhao +Date: Wed, 30 Jun 2021 18:34:27 +0800 +Subject: [PATCH 1/3] fsadm: add support to resize & check btrfs filesystem +To: lvm-devel@redhat.com, + zkabelac@redhat.com, + teigland@redhat.com + +resize: +btrfs volume may spanning across multiple block devices. resize action should +specific subvolume to not to break the filesystem on LV about to get resized +with lvresize. + +this patch finds the mount point first and resizes the filesystem after +getting the device id since there are maybe several devices underneath btrfs +filesystem + +check: +check the data integrity. +this patch mounts the device first and then runs `btrfs filesystem scrub +start -B` command + +refer legacy patches: +- Ondrej Kozina + https://listman.redhat.com/archives/lvm-devel/2012-November/msg00052.html +- Lidong Zhong + https://listman.redhat.com/archives/lvm-devel/2015-March/msg00053.html + +Signed-off-by: Heming Zhao +--- + scripts/fsadm.sh | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 86 insertions(+), 2 deletions(-) + +diff --git a/scripts/fsadm.sh b/scripts/fsadm.sh +index 9ae422f55edf..a7345c503f77 100755 +--- a/scripts/fsadm.sh ++++ b/scripts/fsadm.sh +@@ -22,6 +22,7 @@ + # ext2/ext3/ext4: resize2fs, tune2fs + # reiserfs: resize_reiserfs, reiserfstune + # xfs: xfs_growfs, xfs_info ++# btrfs: btrfs + # + # Return values: + # 0 success +@@ -59,6 +60,7 @@ XFS_CHECK="xfs_check" + # XFS_REPAIR -n is used when XFS_CHECK is not found + XFS_REPAIR="xfs_repair" + CRYPTSETUP="cryptsetup" ++BTRFS="btrfs" + + # user may override lvm location by setting LVM_BINARY + LVM=${LVM_BINARY:-lvm} +@@ -78,6 +80,9 @@ BLOCKCOUNT= + MOUNTPOINT= + MOUNTED= + REMOUNT= ++FINDMNT= ++UUID= ++BTRFS_DEVID= + PROCDIR="/proc" + PROCMOUNTS="$PROCDIR/mounts" + PROCSELFMOUNTINFO="$PROCDIR/self/mountinfo" +@@ -237,6 +242,33 @@ detect_fs() { + verbose "\"$FSTYPE\" filesystem found on \"$VOLUME\"." + } + ++check_findmnt() { ++ FINDMNT=$(which findmnt 2>$NULL) ++ test -n "$FINDMNT" ++} ++ ++detect_fs_uuid() { ++ UUID=$($BLKID -o value -c $NULL -s UUID "$VOLUME" 2>$NULL) ++ test -n "$UUID" ++} ++ ++#find the mountpoint of this device ++detect_mounted_findmnt() { ++ local TMP ++ local STR_IFS=$IFS ++ IFS=" $(echo -n -e '\t')" ++ ++ read -r TMP<$NULL | $GREP "$UUID") ++EOF ++ ++ TMP=${TMP##*TARGET=\"} ++ TMP=${TMP%%\"*} ++ MOUNTED=$TMP ++ test -n "$MOUNTED" ++ ++ IFS=$STR_IFS ++} + + # Check that passed mounted MAJOR:MINOR is not matching $MAJOR:MINOR of resized $VOLUME + validate_mounted_major_minor() { +@@ -365,7 +397,11 @@ detect_mounted_with_proc_mounts() { + # check if the given device is already mounted and where + # FIXME: resolve swap usage and device stacking + detect_mounted() { +- if test -e "$PROCSELFMOUNTINFO"; then ++ if test "$FSTYPE" = "btrfs" ; then ++ check_findmnt || error "Need 'findmnt' utility to work with btrfs filesystem" ++ detect_fs_uuid || verbose "Can't get fs UUID from \"$VOLUME\" volume" ++ detect_mounted_findmnt ++ elif test -e "$PROCSELFMOUNTINFO"; then + detect_mounted_with_proc_self_mountinfo + elif test -e "$PROCMOUNTS"; then + detect_mounted_with_proc_mounts +@@ -662,6 +698,47 @@ resize_crypt() { + dry "$CRYPTSETUP" resize "$1" --size $CRYPT_RESIZE_BLOCKS || error "$CRYPTSETUP failed to resize device $1" + } + ++######################## ++# Resize btrfs filesystem ++# - mounted for upsize/downsize ++# - cannot resize when unmounted ++######################## ++resize_btrfs() { ++ detect_mounted ++ MOUNTPOINT=$MOUNTED ++ if [ -z "$MOUNTED" ]; then ++ MOUNTPOINT=$TEMPDIR ++ temp_mount || error "Cannot mount Btrfs filesystem" ++ fi ++ ++ verbose "Parsing $BTRFS filesystem show \"$MOUNTPOINT\"" ++ for i in $(LC_ALL=C "$BTRFS" filesystem show "$MOUNTPOINT"); do ++ case "$i" in ++ *"$VOLUME") BTRFS_DEVID=${i##*devid};; ++ esac ++ done ++ ++ # If dev doesn't locate in "/dev", 'btrfs filesystem show' will mistakely ++ # report path. Below is a work around to get correct lvm dev path. ++ if [ -z "$BTRFS_DEVID" ];then ++ for i in $(LC_ALL=C "$BTRFS" filesystem show "$MOUNTPOINT"); do ++ case "$i" in ++ *" path "*) ++ path_str=${i##*path} ++ path_str=$(echo $path_str|sed 's/^[ \t]*//g'|sed 's/[ \t]*$'//g) ++ result=$(echo $VOLUME | grep -E "${path_str}$") ++ test -n "$result" && BTRFS_DEVID=${i##*devid} ++ ;; ++ esac ++ done ++ fi ++ BTRFS_DEVID=${BTRFS_DEVID%%size*} ++ BTRFS_DEVID=$(echo $BTRFS_DEVID|sed 's/^[ \t]*//g'|sed 's/[ \t]*$'//g) ++ decode_size $1 1 ++ verbose "Resizing filesystem on device \"$VOLUME\" to $NEWSIZE bytes(btrfs devid: $BTRFS_DEVID) " ++ dry "$BTRFS" filesystem resize "$BTRFS_DEVID":"$NEWSIZE" "$MOUNTPOINT" ++} ++ + #################### + # Resize filesystem + #################### +@@ -685,6 +762,7 @@ resize() { + "crypto_LUKS") + which "$CRYPTSETUP" >"$NULL" 2>&1 || error "$CRYPTSETUP utility required to resize LUKS volume" + CMD=resize_luks ;; ++ "btrfs") CMD=resize_btrfs ;; + *) error "Filesystem \"$FSTYPE\" on device \"$VOLUME\" is not supported by this tool." ;; + esac + +@@ -762,6 +840,12 @@ check() { + which "$CRYPTSETUP" >"$NULL" 2>&1 || error "$CRYPTSETUP utility required." + check_luks || error "Crypto luks check failed." + ;; ++ "btrfs") #mount the device first and then run scrub ++ MOUNTPOINT=$TEMPDIR ++ temp_mount || error "Cannot mount btrfs filesystem" ++ dry "$BTRFS" scrub start -B "$VOLUME" ++ test "$MOUNTPOINT" = "$TEMPDIR" && MOUNTPOINT="" temp_umount ++ ;; + *) + error "Filesystem \"$FSTYPE\" on device \"$VOLUME\" is not supported by this tool." ;; + esac +@@ -780,7 +864,7 @@ test -n "${FSADM_RUNNING-}" && exit 0 + for i in "$TUNE_EXT" "$RESIZE_EXT" "$TUNE_REISER" "$RESIZE_REISER" \ + "$TUNE_XFS" "$RESIZE_XFS" "$MOUNT" "$UMOUNT" "$MKDIR" \ + "$RMDIR" "$BLOCKDEV" "$BLKID" "$GREP" "$READLINK" \ +- "$DATE" "$FSCK" "$XFS_CHECK" "$XFS_REPAIR" "$LVM" ; do ++ "$DATE" "$FSCK" "$XFS_CHECK" "$XFS_REPAIR" "$LVM" "$BTRFS" ; do + test -n "$i" || error "Required command definitions in the script are missing!" + done + +-- +1.8.3.1 + diff --git a/fate-31841-02_man-add-support-for-btrfs.patch b/fate-31841-02_man-add-support-for-btrfs.patch new file mode 100644 index 0000000..3a21806 --- /dev/null +++ b/fate-31841-02_man-add-support-for-btrfs.patch @@ -0,0 +1,38 @@ +From 34c04711e6c2a926b335c746643da7d4b5bba33e Mon Sep 17 00:00:00 2001 +From: Heming Zhao +Date: Wed, 30 Jun 2021 18:39:10 +0800 +Subject: [PATCH 2/3] man: add support for btrfs +To: lvm-devel@redhat.com, + zkabelac@redhat.com, + teigland@redhat.com + +Signed-off-by: Heming Zhao +--- + man/fsadm.8_main | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/man/fsadm.8_main b/man/fsadm.8_main +index dfff5bb97021..ad924ac3a304 100644 +--- a/man/fsadm.8_main ++++ b/man/fsadm.8_main +@@ -31,6 +31,7 @@ It tries to use the same API for + .BR ext2 , + .BR ext3 , + .BR ext4 , ++.BR btrfs , + .BR ReiserFS + and + .BR XFS +@@ -119,6 +120,9 @@ Defaults to "\fI/dev\fP" and must be an absolute path. + .BR tune2fs (8), + .BR resize2fs (8), + .P ++.BR btrfs (8), ++.BR btrfs-scrub (8), ++.P + .BR reiserfstune (8), + .BR resize_reiserfs (8), + .P +-- +1.8.3.1 + diff --git a/fate-31841-03_tests-new-test-suite-of-fsadm-for-btrfs.patch b/fate-31841-03_tests-new-test-suite-of-fsadm-for-btrfs.patch new file mode 100644 index 0000000..8ead3cf --- /dev/null +++ b/fate-31841-03_tests-new-test-suite-of-fsadm-for-btrfs.patch @@ -0,0 +1,205 @@ +From 24ec9af4513890b2ab1a6f3683e8aba007a3c983 Mon Sep 17 00:00:00 2001 +From: Heming Zhao +Date: Wed, 30 Jun 2021 18:41:42 +0800 +Subject: [PATCH] tests: new test suite of fsadm for btrfs + +refer legacy patche: +- Ondrej Kozina + https://listman.redhat.com/archives/lvm-devel/2012-November/msg00055.html + +Signed-off-by: Heming Zhao + +2023-09-08: +LVs should be resized to 64M after each test. + +Signed-off-by: Su Yue +--- + test/shell/fsadm-btrfs.sh | 176 ++++++++++++++++++++++++++++++++++++++ + 1 file changed, 176 insertions(+) + create mode 100644 test/shell/fsadm-btrfs.sh + +diff --git a/test/shell/fsadm-btrfs.sh b/test/shell/fsadm-btrfs.sh +new file mode 100644 +index 000000000000..c1b65036efb2 +--- /dev/null ++++ b/test/shell/fsadm-btrfs.sh +@@ -0,0 +1,176 @@ ++#!/usr/bin/env bash ++ ++# Copyright (C) 2012 Red Hat, Inc. All rights reserved. ++# This copyrighted material is made available to anyone wishing to use, ++# modify, copy, or redistribute it subject to the terms and conditions ++# of the GNU General Public License v.2. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software Foundation, ++# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ ++test_description='Exercise fsadm btrfs resize' ++ ++. lib/inittest ++ ++aux prepare_vg 1 1024 ++ ++# set to "skip" to avoid testing given fs and test warning result ++# i.e. check_btrfs=skip ++check_btrfs= ++ ++which mkfs.btrfs || check_btrfs=${check_btrfs:-mkfs.btrfs} ++which btrfs || check_btrfs=${check_btrfs:-btrfs} ++ ++vg_lv=$vg/$lv1 ++vg_lv2=$vg/${lv1}bar ++vg_lv3=$vg/${lv1}bar2 ++dev_vg_lv="$DM_DEV_DIR/$vg_lv" ++dev_vg_lv2="$DM_DEV_DIR/$vg_lv2" ++dev_vg_lv3="$DM_DEV_DIR/$vg_lv3" ++mount_dir="mnt" ++mount_space_dir="mnt space dir" ++# for recursive call ++export LVM_BINARY=$(which lvm) ++ ++test ! -d "$mount_dir" && mkdir "$mount_dir" ++test ! -d "$mount_space_dir" && mkdir "$mount_space_dir" ++ ++cleanup_mounted_and_teardown() ++{ ++ umount "$mount_dir" || true ++ umount "$mount_space_dir" || true ++ aux teardown ++} ++ ++reset_lvs() ++{ ++ # Since we call mkfs.btrfs with '-f', lvreduce to 64M is enough ++ lvreduce -L64M -nf $vg_lv || true ++ lvreduce -L64M -nf $vg_lv2 || true ++ lvreduce -L64M -nf $vg_lv3 || true ++} ++ ++check_missing_btrfs() ++{ ++ eval local t=$check_btrfs ++ test -z "$t" && return 0 ++ test "$t" = skip && return 1 ++ # trick for warning test ++ echo "WARNING: fsadm test skipped btrfs tests, $t tool is missing" ++ return 1 ++} ++ ++fscheck_btrfs() { ++ btrfsck "$1" ++} ++scrub_btrfs() { ++ btrfs scrub start -B "$1" ++} ++ ++# btrfs minimal size calculation is complex, we use 64M here. ++lvcreate -n $lv1 -L64M $vg ++lvcreate -n ${lv1}bar -L64M $vg ++lvcreate -n ${lv1}bar2 -L64M $vg ++trap 'cleanup_mounted_and_teardown' EXIT ++ ++single_device_test() { ++ mkfs.btrfs -m single "$dev_vg_lv" ++ mkfs.btrfs -m single "$dev_vg_lv2" ++ ++ # kernel limits 256 MB as minimal btrfs resizable size ++ # you can grow fs from 30MB->256MB ++ # but you can't grow from 30MB->180MB ++ fsadm --lvresize resize $vg_lv 256M ++ fsadm --lvresize resize $vg_lv2 256M ++ ++ not fsadm -y --lvresize resize $vg_lv 200M ++ lvresize -L+10M -r $vg_lv ++ lvreduce -L256M -r $vg_lv ++ fscheck_btrfs $dev_vg_lv ++ ++ mount "$dev_vg_lv" "$mount_dir" ++ mount "$dev_vg_lv2" "$mount_space_dir" ++ ++ not fsadm -y --lvresize resize $vg_lv 200M ++ lvresize -L+10M -r $vg_lv ++ lvreduce -L256M -r $vg_lv ++ scrub_btrfs $dev_vg_lv ++ umount "$mount_dir" ++ ++ not fsadm -y --lvresize resize $vg_lv2 200M ++ lvresize -L+10M -r $vg_lv2 ++ lvreduce -L256M -r $vg_lv2 ++ scrub_btrfs $dev_vg_lv2 ++ umount "$mount_space_dir" ++} ++ ++multiple_devices_test() { ++ mkfs.btrfs -m single -d single -f "$dev_vg_lv" "$dev_vg_lv2" "$dev_vg_lv3" ++ ++ fsadm -y --lvresize resize $vg_lv 256M ++ fsadm -y --lvresize resize $vg_lv2 256M ++ fsadm -y --lvresize resize $vg_lv3 256M ++ ++ # check if fsadm is able to get/resize btrfs on ++ # the right device ++ lvresize -L+150M $vg_lv ++ fsadm -y resize $vg_lv 300M ++ # no space to extend, so failed ++ not fsadm -y resize $vg_lv2 300M ++ not fsadm -y resize $vg_lv3 300M ++ lvreduce -y -L256M -r $vg_lv ++ ++ lvresize -L+150M $vg_lv2 ++ fsadm -y resize $vg_lv2 300M ++ not fsadm -y resize $vg_lv3 300M ++ not fsadm -y resize $vg_lv 300M ++ lvreduce -y -L256M -r $vg_lv2 ++ ++ lvresize -L+150M $vg_lv3 ++ fsadm -y resize $vg_lv3 300M ++ not fsadm -y resize $vg_lv2 300M ++ not fsadm -y resize $vg_lv 300M ++ lvreduce -y -L256M -r $vg_lv3 ++ fscheck_btrfs $dev_vg_lv ++ ++ # repeat with mounted fs ++ mount "$dev_vg_lv" "$mount_dir" ++ mount "$dev_vg_lv2" "$mount_space_dir" ++ ++ lvresize -L300M $vg_lv ++ fsadm -y resize $vg_lv 300M ++ not fsadm -y resize $vg_lv2 300M ++ not fsadm -y resize $vg_lv3 300M ++ lvreduce -y -L256M -r $vg_lv ++ ++ lvresize -L300M $vg_lv2 ++ fsadm -y resize $vg_lv2 300M ++ not fsadm -y resize $vg_lv3 300M ++ not fsadm -y resize $vg_lv 300M ++ lvreduce -y -L256M -r $vg_lv2 ++ ++ lvresize -L300M $vg_lv3 ++ fsadm -y resize $vg_lv3 300M ++ not fsadm -y resize $vg_lv2 300M ++ not fsadm -y resize $vg_lv 300M ++ lvreduce -y -L256M -r $vg_lv3 ++ ++ scrub_btrfs $dev_vg_lv ++ umount "$mount_dir" ++ umount "$mount_space_dir" ++ ++ lvresize -nf -L300M $vg_lv ++ lvresize -nf -L300M $vg_lv2 ++} ++ ++if check_missing_btrfs; then ++ ++ single_device_test ++ # after each test, reset_lv_size should be called to make sure ++ # all lvs are in same state/size. ++ reset_lvs ++ multiple_devices_test ++fi ++ ++vgremove -ff $vg +-- +2.35.3 + diff --git a/lvm.conf b/lvm.conf new file mode 100644 index 0000000..5ddd5bb --- /dev/null +++ b/lvm.conf @@ -0,0 +1,2465 @@ +# This is an example configuration file for the LVM2 system. +# It contains the default settings that would be used if there was no +# /etc/lvm/lvm.conf file. +# +# Refer to 'man lvm.conf' for further information including the file layout. +# +# Refer to 'man lvm.conf' for information about how settings configured in +# this file are combined with built-in values and command line options to +# arrive at the final values used by LVM. +# +# Refer to 'man lvmconfig' for information about displaying the built-in +# and configured values used by LVM. +# +# If a default value is set in this file (not commented out), then a +# new version of LVM using this file will continue using that value, +# even if the new version of LVM changes the built-in default value. +# +# To put this file in a different directory and override /etc/lvm set +# the environment variable LVM_SYSTEM_DIR before running the tools. +# +# N.B. Take care that each setting only appears once if uncommenting +# example settings in this file. + + +# Configuration section config. +# How LVM configuration settings are handled. +config { + + # Configuration option config/checks. + # If enabled, any LVM configuration mismatch is reported. + # This implies checking that the configuration key is understood by + # LVM and that the value of the key is the proper type. If disabled, + # any configuration mismatch is ignored and the default value is used + # without any warning (a message about the configuration key not being + # found is issued in verbose mode only). + # This configuration option has an automatic default value. + # checks = 1 + + # Configuration option config/abort_on_errors. + # Abort the LVM process if a configuration mismatch is found. + # This configuration option has an automatic default value. + # abort_on_errors = 0 + + # Configuration option config/profile_dir. + # Directory where LVM looks for configuration profiles. + # This configuration option has an automatic default value. + # profile_dir = "/etc/lvm/profile" +} + +# Configuration section devices. +# How LVM uses block devices. +devices { + + # Configuration option devices/dir. + # Directory in which to create volume group device nodes. + # Commands also accept this as a prefix on volume group names. + # This configuration option is advanced. + # This configuration option has an automatic default value. + # dir = "/dev" + + # Configuration option devices/scan. + # Directories containing device nodes to use with LVM. + # This configuration option is advanced. + # This configuration option has an automatic default value. + # scan = [ "/dev" ] + + # Configuration option devices/obtain_device_list_from_udev. + # Obtain the list of available devices from udev. + # This avoids opening or using any inapplicable non-block devices or + # subdirectories found in the udev directory. Any device node or + # symlink not managed by udev in the udev directory is ignored. This + # setting applies only to the udev-managed device directory; other + # directories will be scanned fully. LVM needs to be compiled with + # udev support for this setting to apply. + # This configuration option has an automatic default value. + # obtain_device_list_from_udev = 0 + obtain_device_list_from_udev = 1 + + # Configuration option devices/external_device_info_source. + # Enable device information from udev. + # If set to "udev", lvm will supplement its own native device information + # with information from libudev. This can potentially improve the detection + # of MD component devices and multipath component devices. + # This configuration option has an automatic default value. + # external_device_info_source = "none" + external_device_info_source = "udev" + + # Configuration option devices/hints. + # Use a local file to remember which devices have PVs on them. + # Some commands will use this as an optimization to reduce device + # scanning, and will only scan the listed PVs. Removing the hint file + # will cause lvm to generate a new one. Disable hints if PVs will + # be copied onto devices using non-lvm commands, like dd. + # + # Accepted values: + # all + # Use all hints. + # none + # Use no hints. + # + # This configuration option has an automatic default value. + # hints = "all" + + # Configuration option devices/preferred_names. + # Select which path name to display for a block device. + # If multiple path names exist for a block device, and LVM needs to + # display a name for the device, the path names are matched against + # each item in this list of regular expressions. The first match is + # used. Try to avoid using undescriptive /dev/dm-N names, if present. + # If no preferred name matches, or if preferred_names are not defined, + # the following built-in preferences are applied in order until one + # produces a preferred name: + # Prefer names with path prefixes in the order of: + # /dev/mapper, /dev/disk, /dev/dm-*, /dev/block. + # Prefer the name with the least number of slashes. + # Prefer a name that is a symlink. + # Prefer the path with least value in lexicographical order. + # + # Example + # preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ] + # + # This configuration option does not have a default value defined. + + # Configuration option devices/use_devicesfile. + # Enable or disable the use of a devices file. + # When enabled, lvm will only use devices that + # are lised in the devices file. A devices file will + # be used, regardless of this setting, when the --devicesfile + # option is set to a specific file name. + # This configuration option has an automatic default value. + # use_devicesfile = 0 + + # Configuration option devices/devicesfile. + # The name of the system devices file, listing devices that LVM should use. + # This should not be used to select a non-system devices file. + # The --devicesfile option is intended for alternative devices files. + # This configuration option has an automatic default value. + # devicesfile = "system.devices" + + # Configuration option devices/search_for_devnames. + # Look outside of the devices file for missing devname entries. + # A devname entry is used for a device that does not have a stable + # device id, e.g. wwid, so the unstable device name is used as + # the device id. After reboot, or if the device is reattached, + # the device name may change, in which case lvm will not find + # the expected PV on the device listed in the devices file. + # This setting controls whether lvm will search other devices, + # outside the devices file, to look for the missing PV on a + # renamed device. If "none", lvm will not look at other devices, + # and the PV may appear to be missing. If "auto", lvm will look + # at other devices, but only those that are likely to have the PV. + # If "all", lvm will look at all devices on the system. + # This configuration option has an automatic default value. + # search_for_devnames = "auto" + + # Configuration option devices/filter. + # Limit the block devices that are used by LVM commands. + # This is a list of regular expressions used to accept or reject block + # device path names. Each regex is delimited by a vertical bar '|' + # (or any character) and is preceded by 'a' to accept the path, or + # by 'r' to reject the path. The first regex in the list to match the + # path is used, producing the 'a' or 'r' result for the device. + # When multiple path names exist for a block device, if any path name + # matches an 'a' pattern before an 'r' pattern, then the device is + # accepted. If all the path names match an 'r' pattern first, then the + # device is rejected. Unmatching path names do not affect the accept + # or reject decision. If no path names for a device match a pattern, + # then the device is accepted. Be careful mixing 'a' and 'r' patterns, + # as the combination might produce unexpected results (test changes.) + # Run vgscan after changing the filter to regenerate the cache. + # + # Example + # Accept every block device: + # filter = [ "a|.*|" ] + # Reject the cdrom drive: + # filter = [ "r|/dev/cdrom|" ] + # Work with just loopback devices, e.g. for testing: + # filter = [ "a|loop|", "r|.*|" ] + # Accept all loop devices and ide drives except hdc: + # filter = [ "a|loop|", "r|/dev/hdc|", "a|/dev/ide|", "r|.*|" ] + # Use anchors to be very specific: + # filter = [ "a|^/dev/hda8$|", "r|.*|" ] + # + # This configuration option has an automatic default value. + # filter = [ "a|.*|" ] + # Below filter was used in SUSE/openSUSE before lvm2-2.03. It conflicts + # with lvm2-2.02.180+, so comment out in lvm2-2.03 release. + # filter = [ "r|/dev/.*/by-path/.*|", "r|/dev/.*/by-id/.*|", "r|/dev/fd.*|", "r|/dev/cdrom|", "a/.*/" ] + + # Configuration option devices/global_filter. + # Limit the block devices that are used by LVM system components. + # Because devices/filter may be overridden from the command line, it is + # not suitable for system-wide device filtering, e.g. udev. + # Use global_filter to hide devices from these LVM system components. + # The syntax is the same as devices/filter. Devices rejected by + # global_filter are not opened by LVM. + # This configuration option has an automatic default value. + # global_filter = [ "a|.*|" ] + + # Configuration option devices/types. + # List of additional acceptable block device types. + # These are of device type names from /proc/devices, followed by the + # maximum number of partitions. + # + # Example + # types = [ "fd", 16 ] + # + # This configuration option is advanced. + # This configuration option does not have a default value defined. + + # Configuration option devices/sysfs_scan. + # Restrict device scanning to block devices appearing in sysfs. + # This is a quick way of filtering out block devices that are not + # present on the system. sysfs must be part of the kernel and mounted.) + # This configuration option has an automatic default value. + # sysfs_scan = 1 + + # Configuration option devices/scan_lvs. + # Scan LVM LVs for layered PVs, allowing LVs to be used as PVs. + # When 1, LVM will detect PVs layered on LVs, and caution must be + # taken to avoid a host accessing a layered VG that may not belong + # to it, e.g. from a guest image. This generally requires excluding + # the LVs with device filters. Also, when this setting is enabled, + # every LVM command will scan every active LV on the system (unless + # filtered), which can cause performance problems on systems with + # many active LVs. When this setting is 0, LVM will not detect or + # use PVs that exist on LVs, and will not allow a PV to be created on + # an LV. The LVs are ignored using a built in device filter that + # identifies and excludes LVs. + # This configuration option has an automatic default value. + # scan_lvs = 0 + + # Configuration option devices/multipath_component_detection. + # Ignore devices that are components of DM multipath devices. + # This configuration option has an automatic default value. + # multipath_component_detection = 1 + + # Configuration option devices/multipath_wwids_file. + # The path to the multipath wwids file used for multipath component detection. + # Set this to an empty string to disable the use of the multipath wwids file. + # This configuration option has an automatic default value. + # multipath_wwids_file = "/etc/multipath/wwids" + + # Configuration option devices/md_component_detection. + # Enable detection and exclusion of MD component devices. + # An MD component device is a block device that MD uses as part + # of a software RAID virtual device. When an LVM PV is created + # on an MD device, LVM must only use the top level MD device as + # the PV, and should ignore the underlying component devices. + # In cases where the MD superblock is located at the end of the + # component devices, it is more difficult for LVM to consistently + # identify an MD component, see the md_component_checks setting. + # This configuration option has an automatic default value. + # md_component_detection = 1 + + # Configuration option devices/md_component_checks. + # The checks LVM should use to detect MD component devices. + # MD component devices are block devices used by MD software RAID. + # + # Accepted values: + # auto + # LVM will skip scanning the end of devices when it has other + # indications that the device is not an MD component. + # start + # LVM will only scan the start of devices for MD superblocks. + # This does not incur extra I/O by LVM. + # full + # LVM will scan the start and end of devices for MD superblocks. + # This requires an extra read at the end of devices. + # + # This configuration option has an automatic default value. + # md_component_checks = "auto" + + # Configuration option devices/fw_raid_component_detection. + # Ignore devices that are components of firmware RAID devices. + # LVM must use an external_device_info_source other than none for this + # detection to execute. + # This configuration option has an automatic default value. + # fw_raid_component_detection = 0 + + # Configuration option devices/md_chunk_alignment. + # Align the start of a PV data area with md device's stripe-width. + # This applies if a PV is placed directly on an md device. + # default_data_alignment will be overridden if it is not aligned + # with the value detected for this setting. + # This setting is overridden by data_alignment_detection, + # data_alignment, and the --dataalignment option. + # This configuration option has an automatic default value. + # md_chunk_alignment = 1 + + # Configuration option devices/default_data_alignment. + # Align the start of a PV data area with this number of MiB. + # Set to 1 for 1MiB, 2 for 2MiB, etc. Set to 0 to disable. + # This setting is overridden by data_alignment and the --dataalignment + # option. + # This configuration option has an automatic default value. + # default_data_alignment = 1 + + # Configuration option devices/data_alignment_detection. + # Align the start of a PV data area with sysfs io properties. + # The start of a PV data area will be a multiple of minimum_io_size or + # optimal_io_size exposed in sysfs. minimum_io_size is the smallest + # request the device can perform without incurring a read-modify-write + # penalty, e.g. MD chunk size. optimal_io_size is the device's + # preferred unit of receiving I/O, e.g. MD stripe width. + # minimum_io_size is used if optimal_io_size is undefined (0). + # If md_chunk_alignment is enabled, that detects the optimal_io_size. + # default_data_alignment and md_chunk_alignment will be overridden + # if they are not aligned with the value detected for this setting. + # This setting is overridden by data_alignment and the --dataalignment + # option. + # This configuration option has an automatic default value. + # data_alignment_detection = 1 + + # Configuration option devices/data_alignment. + # Align the start of a PV data area with this number of KiB. + # When non-zero, this setting overrides default_data_alignment. + # Set to 0 to disable, in which case default_data_alignment + # is used to align the first PE in units of MiB. + # This setting is overridden by the --dataalignment option. + # This configuration option has an automatic default value. + # data_alignment = 0 + + # Configuration option devices/data_alignment_offset_detection. + # Shift the start of an aligned PV data area based on sysfs information. + # After a PV data area is aligned, it will be shifted by the + # alignment_offset exposed in sysfs. This offset is often 0, but may + # be non-zero. Certain 4KiB sector drives that compensate for windows + # partitioning will have an alignment_offset of 3584 bytes (sector 7 + # is the lowest aligned logical block, the 4KiB sectors start at + # LBA -1, and consequently sector 63 is aligned on a 4KiB boundary). + # This setting is overridden by the --dataalignmentoffset option. + # This configuration option has an automatic default value. + # data_alignment_offset_detection = 1 + + # Configuration option devices/ignore_suspended_devices. + # Ignore DM devices that have I/O suspended while scanning devices. + # Otherwise, LVM waits for a suspended device to become accessible. + # This should only be needed in recovery situations. + # This configuration option has an automatic default value. + # ignore_suspended_devices = 0 + + # Configuration option devices/ignore_lvm_mirrors. + # Do not scan 'mirror' LVs to avoid possible deadlocks. + # This avoids possible deadlocks when using the 'mirror' segment type. + # This setting determines whether LVs using the 'mirror' segment type + # are scanned for LVM labels. This affects the ability of mirrors to + # be used as physical volumes. If this setting is enabled, it is + # impossible to create VGs on top of mirror LVs, i.e. to stack VGs on + # mirror LVs. If this setting is disabled, allowing mirror LVs to be + # scanned, it may cause LVM processes and I/O to the mirror to become + # blocked. This is due to the way that the mirror segment type handles + # failures. In order for the hang to occur, an LVM command must be run + # just after a failure and before the automatic LVM repair process + # takes place, or there must be failures in multiple mirrors in the + # same VG at the same time with write failures occurring moments before + # a scan of the mirror's labels. The 'mirror' scanning problems do not + # apply to LVM RAID types like 'raid1' which handle failures in a + # different way, making them a better choice for VG stacking. + # This configuration option has an automatic default value. + # ignore_lvm_mirrors = 1 + + # Configuration option devices/require_restorefile_with_uuid. + # Allow use of pvcreate --uuid without requiring --restorefile. + # This configuration option has an automatic default value. + # require_restorefile_with_uuid = 1 + + # Configuration option devices/pv_min_size. + # Minimum size in KiB of block devices which can be used as PVs. + # In a clustered environment all nodes must use the same value. + # Any value smaller than 512KiB is ignored. The previous built-in + # value was 512. + # This configuration option has an automatic default value. + # pv_min_size = 2048 + + # Configuration option devices/issue_discards. + # Issue discards to PVs that are no longer used by an LV. + # Discards are sent to an LV's underlying physical volumes when the LV + # is no longer using the physical volumes' space, e.g. lvremove, + # lvreduce. Discards inform the storage that a region is no longer + # used. Storage that supports discards advertise the protocol-specific + # way discards should be issued by the kernel (TRIM, UNMAP, or + # WRITE SAME with UNMAP bit set). Not all storage will support or + # benefit from discards, but SSDs and thinly provisioned LUNs + # generally do. If enabled, discards will only be issued if both the + # storage and kernel provide support. + # This configuration option has an automatic default value. + # issue_discards = 0 + issue_discards = 1 + + # Configuration option devices/allow_changes_with_duplicate_pvs. + # Allow VG modification while a PV appears on multiple devices. + # When a PV appears on multiple devices, LVM attempts to choose the + # best device to use for the PV. If the devices represent the same + # underlying storage, the choice has minimal consequence. If the + # devices represent different underlying storage, the wrong choice + # can result in data loss if the VG is modified. Disabling this + # setting is the safest option because it prevents modifying a VG + # or activating LVs in it while a PV appears on multiple devices. + # Enabling this setting allows the VG to be used as usual even with + # uncertain devices. + # This configuration option has an automatic default value. + # allow_changes_with_duplicate_pvs = 0 + + # Configuration option devices/allow_mixed_block_sizes. + # Allow PVs in the same VG with different logical block sizes. + # When allowed, the user is responsible to ensure that an LV is + # using PVs with matching block sizes when necessary. + # This configuration option has an automatic default value. + # allow_mixed_block_sizes = 0 +} + +# Configuration section allocation. +# How LVM selects space and applies properties to LVs. +allocation { + + # Configuration option allocation/cling_tag_list. + # Advise LVM which PVs to use when searching for new space. + # When searching for free space to extend an LV, the 'cling' allocation + # policy will choose space on the same PVs as the last segment of the + # existing LV. If there is insufficient space and a list of tags is + # defined here, it will check whether any of them are attached to the + # PVs concerned and then seek to match those PV tags between existing + # extents and new extents. + # + # Example + # Use the special tag "@*" as a wildcard to match any PV tag: + # cling_tag_list = [ "@*" ] + # LVs are mirrored between two sites within a single VG, and + # PVs are tagged with either @site1 or @site2 to indicate where + # they are situated: + # cling_tag_list = [ "@site1", "@site2" ] + # + # This configuration option does not have a default value defined. + + # Configuration option allocation/maximise_cling. + # Use a previous allocation algorithm. + # Changes made in version 2.02.85 extended the reach of the 'cling' + # policies to detect more situations where data can be grouped onto + # the same disks. This setting can be used to disable the changes + # and revert to the previous algorithm. + # This configuration option has an automatic default value. + # maximise_cling = 1 + + # Configuration option allocation/use_blkid_wiping. + # Use blkid to detect and erase existing signatures on new PVs and LVs. + # The blkid library can detect more signatures than the native LVM + # detection code, but may take longer. LVM needs to be compiled with + # blkid wiping support for this setting to apply. LVM native detection + # code is currently able to recognize: MD device signatures, + # swap signature, and LUKS signatures. To see the list of signatures + # recognized by blkid, check the output of the 'blkid -k' command. + # This configuration option has an automatic default value. + # use_blkid_wiping = 1 + + # Configuration option allocation/wipe_signatures_when_zeroing_new_lvs. + # Look for and erase any signatures while zeroing a new LV. + # The --wipesignatures option overrides this setting. + # Zeroing is controlled by the -Z/--zero option, and if not specified, + # zeroing is used by default if possible. Zeroing simply overwrites the + # first 4KiB of a new LV with zeroes and does no signature detection or + # wiping. Signature wiping goes beyond zeroing and detects exact types + # and positions of signatures within the whole LV. It provides a + # cleaner LV after creation as all known signatures are wiped. The LV + # is not claimed incorrectly by other tools because of old signatures + # from previous use. The number of signatures that LVM can detect + # depends on the detection code that is selected (see + # use_blkid_wiping.) Wiping each detected signature must be confirmed. + # When this setting is disabled, signatures on new LVs are not detected + # or erased unless the --wipesignatures option is used directly. + # This configuration option has an automatic default value. + # wipe_signatures_when_zeroing_new_lvs = 1 + + # Configuration option allocation/mirror_logs_require_separate_pvs. + # Mirror logs and images will always use different PVs. + # The default setting changed in version 2.02.85. + # This configuration option has an automatic default value. + # mirror_logs_require_separate_pvs = 0 + + # Configuration option allocation/raid_stripe_all_devices. + # Stripe across all PVs when RAID stripes are not specified. + # If enabled, all PVs in the VG or on the command line are used for + # raid0/4/5/6/10 when the command does not specify the number of + # stripes to use. + # This was the default behaviour until release 2.02.162. + # This configuration option has an automatic default value. + # raid_stripe_all_devices = 0 + + # Configuration option allocation/cache_pool_metadata_require_separate_pvs. + # Cache pool metadata and data will always use different PVs. + # This configuration option has an automatic default value. + # cache_pool_metadata_require_separate_pvs = 0 + + # Configuration option allocation/cache_metadata_format. + # Sets default metadata format for new cache. + # + # Accepted values: + # 0 Automatically detected best available format + # 1 Original format + # 2 Improved 2nd. generation format + # + # This configuration option has an automatic default value. + # cache_metadata_format = 0 + + # Configuration option allocation/cache_mode. + # The default cache mode used for new cache. + # + # Accepted values: + # writethrough + # Data blocks are immediately written from the cache to disk. + # writeback + # Data blocks are written from the cache back to disk after some + # delay to improve performance. + # + # This setting replaces allocation/cache_pool_cachemode. + # This configuration option has an automatic default value. + # cache_mode = "writethrough" + + # Configuration option allocation/cache_policy. + # The default cache policy used for new cache volume. + # Since kernel 4.2 the default policy is smq (Stochastic multiqueue), + # otherwise the older mq (Multiqueue) policy is selected. + # This configuration option does not have a default value defined. + + # Configuration section allocation/cache_settings. + # Settings for the cache policy. + # See documentation for individual cache policies for more info. + # This configuration section has an automatic default value. + # cache_settings { + # } + + # Configuration option allocation/cache_pool_chunk_size. + # The minimal chunk size in KiB for cache pool volumes. + # Using a chunk_size that is too large can result in wasteful use of + # the cache, where small reads and writes can cause large sections of + # an LV to be mapped into the cache. However, choosing a chunk_size + # that is too small can result in more overhead trying to manage the + # numerous chunks that become mapped into the cache. The former is + # more of a problem than the latter in most cases, so the default is + # on the smaller end of the spectrum. Supported values range from + # 32KiB to 1GiB in multiples of 32. + # This configuration option does not have a default value defined. + + # Configuration option allocation/cache_pool_max_chunks. + # The maximum number of chunks in a cache pool. + # For cache target v1.9 the recommended maximumm is 1000000 chunks. + # Using cache pool with more chunks may degrade cache performance. + # This configuration option does not have a default value defined. + + # Configuration option allocation/thin_pool_metadata_require_separate_pvs. + # Thin pool metadata and data will always use different PVs. + # This configuration option has an automatic default value. + # thin_pool_metadata_require_separate_pvs = 0 + + # Configuration option allocation/thin_pool_crop_metadata. + # Older version of lvm2 cropped pool's metadata size to 15.81 GiB. + # This is slightly less then the actual maximum 15.88 GiB. + # For compatibility with older version and use of cropped size set to 1. + # This configuration option has an automatic default value. + # thin_pool_crop_metadata = 0 + + # Configuration option allocation/thin_pool_zero. + # Thin pool data chunks are zeroed before they are first used. + # Zeroing with a larger thin pool chunk size reduces performance. + # This configuration option has an automatic default value. + # thin_pool_zero = 1 + + # Configuration option allocation/thin_pool_discards. + # The discards behaviour of thin pool volumes. + # + # Accepted values: + # ignore + # nopassdown + # passdown + # + # This configuration option has an automatic default value. + # thin_pool_discards = "passdown" + + # Configuration option allocation/thin_pool_chunk_size_policy. + # The chunk size calculation policy for thin pool volumes. + # + # Accepted values: + # generic + # If thin_pool_chunk_size is defined, use it. Otherwise, calculate + # the chunk size based on estimation and device hints exposed in + # sysfs - the minimum_io_size. The chunk size is always at least + # 64KiB. + # performance + # If thin_pool_chunk_size is defined, use it. Otherwise, calculate + # the chunk size for performance based on device hints exposed in + # sysfs - the optimal_io_size. The chunk size is always at least + # 512KiB. + # + # This configuration option has an automatic default value. + # thin_pool_chunk_size_policy = "generic" + + # Configuration option allocation/zero_metadata. + # Zero whole metadata area before use with thin or cache pool. + # This configuration option has an automatic default value. + # zero_metadata = 1 + + # Configuration option allocation/thin_pool_chunk_size. + # The minimal chunk size in KiB for thin pool volumes. + # Larger chunk sizes may improve performance for plain thin volumes, + # however using them for snapshot volumes is less efficient, as it + # consumes more space and takes extra time for copying. When unset, + # lvm tries to estimate chunk size starting from 64KiB. Supported + # values are in the range 64KiB to 1GiB. + # This configuration option does not have a default value defined. + + # Configuration option allocation/physical_extent_size. + # Default physical extent size in KiB to use for new VGs. + # This configuration option has an automatic default value. + # physical_extent_size = 4096 + + # Configuration option allocation/vdo_use_compression. + # Enables or disables compression when creating a VDO volume. + # Compression may be disabled if necessary to maximize performance + # or to speed processing of data that is unlikely to compress. + # This configuration option has an automatic default value. + # vdo_use_compression = 1 + + # Configuration option allocation/vdo_use_deduplication. + # Enables or disables deduplication when creating a VDO volume. + # Deduplication may be disabled in instances where data is not expected + # to have good deduplication rates but compression is still desired. + # This configuration option has an automatic default value. + # vdo_use_deduplication = 1 + + # Configuration option allocation/vdo_use_metadata_hints. + # Enables or disables whether VDO volume should tag its latency-critical + # writes with the REQ_SYNC flag. Some device mapper targets such as dm-raid5 + # process writes with this flag at a higher priority. + # This configuration option has an automatic default value. + # vdo_use_metadata_hints = 1 + + # Configuration option allocation/vdo_minimum_io_size. + # The minimum IO size for VDO volume to accept, in bytes. + # Valid values are 512 or 4096. The recommended value is 4096. + # This configuration option has an automatic default value. + # vdo_minimum_io_size = 4096 + + # Configuration option allocation/vdo_block_map_cache_size_mb. + # Specifies the amount of memory in MiB allocated for caching block map + # pages for VDO volume. The value must be a multiple of 4096 and must be + # at least 128MiB and less than 16TiB. The cache must be at least 16MiB + # per logical thread. Note that there is a memory overhead of 15%. + # This configuration option has an automatic default value. + # vdo_block_map_cache_size_mb = 128 + + # Configuration option allocation/vdo_block_map_period. + # The speed with which the block map cache writes out modified block map pages. + # A smaller era length is likely to reduce the amount time spent rebuilding, + # at the cost of increased block map writes during normal operation. + # The maximum and recommended value is 16380; the minimum value is 1. + # This configuration option has an automatic default value. + # vdo_block_map_period = 16380 + + # Configuration option allocation/vdo_check_point_frequency. + # The default check point frequency for VDO volume. + # This configuration option has an automatic default value. + # vdo_check_point_frequency = 0 + + # Configuration option allocation/vdo_use_sparse_index. + # Enables sparse indexing for VDO volume. + # This configuration option has an automatic default value. + # vdo_use_sparse_index = 0 + + # Configuration option allocation/vdo_index_memory_size_mb. + # Specifies the amount of index memory in MiB for VDO volume. + # The value must be at least 256MiB and at most 1TiB. + # This configuration option has an automatic default value. + # vdo_index_memory_size_mb = 256 + + # Configuration option allocation/vdo_slab_size_mb. + # Specifies the size in MiB of the increment by which a VDO is grown. + # Using a smaller size constrains the total maximum physical size + # that can be accommodated. Must be a power of two between 128MiB and 32GiB. + # This configuration option has an automatic default value. + # vdo_slab_size_mb = 2048 + + # Configuration option allocation/vdo_ack_threads. + # Specifies the number of threads to use for acknowledging + # completion of requested VDO I/O operations. + # The value must be at in range [0..100]. + # This configuration option has an automatic default value. + # vdo_ack_threads = 1 + + # Configuration option allocation/vdo_bio_threads. + # Specifies the number of threads to use for submitting I/O + # operations to the storage device of VDO volume. + # The value must be in range [1..100]. + # Each additional thread after the first will use an additional 18MiB of RAM, + # plus 1.12 MiB of RAM per megabyte of configured read cache size. + # This configuration option has an automatic default value. + # vdo_bio_threads = 4 + + # Configuration option allocation/vdo_bio_rotation. + # Specifies the number of I/O operations to enqueue for each bio-submission + # thread before directing work to the next. The value must be in range [1..1024]. + # This configuration option has an automatic default value. + # vdo_bio_rotation = 64 + + # Configuration option allocation/vdo_cpu_threads. + # Specifies the number of threads to use for CPU-intensive work such as + # hashing or compression for VDO volume. The value must be in range [1..100]. + # This configuration option has an automatic default value. + # vdo_cpu_threads = 2 + + # Configuration option allocation/vdo_hash_zone_threads. + # Specifies the number of threads across which to subdivide parts of the VDO + # processing based on the hash value computed from the block data. + # The value must be at in range [0..100]. + # vdo_hash_zone_threads, vdo_logical_threads and vdo_physical_threads must be + # either all zero or all non-zero. + # This configuration option has an automatic default value. + # vdo_hash_zone_threads = 1 + + # Configuration option allocation/vdo_logical_threads. + # Specifies the number of threads across which to subdivide parts of the VDO + # processing based on the hash value computed from the block data. + # A logical thread count of 9 or more will require explicitly specifying + # a sufficiently large block map cache size, as well. + # The value must be in range [0..60]. + # vdo_hash_zone_threads, vdo_logical_threads and vdo_physical_threads must be + # either all zero or all non-zero. + # This configuration option has an automatic default value. + # vdo_logical_threads = 1 + + # Configuration option allocation/vdo_physical_threads. + # Specifies the number of threads across which to subdivide parts of the VDO + # processing based on physical block addresses. + # Each additional thread after the first will use an additional 10MiB of RAM. + # The value must be in range [0..16]. + # vdo_hash_zone_threads, vdo_logical_threads and vdo_physical_threads must be + # either all zero or all non-zero. + # This configuration option has an automatic default value. + # vdo_physical_threads = 1 + + # Configuration option allocation/vdo_write_policy. + # Specifies the write policy: + # auto - VDO will check the storage device and determine whether it supports flushes. + # If it does, VDO will run in async mode, otherwise it will run in sync mode. + # sync - Writes are acknowledged only after data is stably written. + # This policy is not supported if the underlying storage is not also synchronous. + # async - Writes are acknowledged after data has been cached for writing to stable storage. + # Data which has not been flushed is not guaranteed to persist in this mode. + # async-unsafe - Writes are handled like 'async' but there is no guarantee of the atomicity async provides. + # This mode should only be used for better performance when atomicity is not required. + # This configuration option has an automatic default value. + # vdo_write_policy = "auto" + + # Configuration option allocation/vdo_max_discard. + # Specified the maximum size of discard bio accepted, in 4096 byte blocks. + # I/O requests to a VDO volume are normally split into 4096-byte blocks, + # and processed up to 2048 at a time. However, discard requests to a VDO volume + # can be automatically split to a larger size, up to 4096-byte blocks + # in a single bio, and are limited to 1500 at a time. + # Increasing this value may provide better overall performance, at the cost of + # increased latency for the individual discard requests. + # The default and minimum is 1. The maximum is UINT_MAX / 4096. + # This configuration option has an automatic default value. + # vdo_max_discard = 1 + + # Configuration option allocation/vdo_pool_header_size. + # Specified the emptry header size in KiB at the front and end of vdo pool device. + # This configuration option has an automatic default value. + # vdo_pool_header_size = 512 +} + +# Configuration section log. +# How LVM log information is reported. +log { + + # Configuration option log/report_command_log. + # Enable or disable LVM log reporting. + # If enabled, LVM will collect a log of operations, messages, + # per-object return codes with object identification and associated + # error numbers (errnos) during LVM command processing. Then the + # log is either reported solely or in addition to any existing + # reports, depending on LVM command used. If it is a reporting command + # (e.g. pvs, vgs, lvs, lvm fullreport), then the log is reported in + # addition to any existing reports. Otherwise, there's only log report + # on output. For all applicable LVM commands, you can request that + # the output has only log report by using --logonly command line + # option. Use log/command_log_cols and log/command_log_sort settings + # to define fields to display and sort fields for the log report. + # You can also use log/command_log_selection to define selection + # criteria used each time the log is reported. + # This configuration option has an automatic default value. + # report_command_log = 0 + + # Configuration option log/command_log_sort. + # List of columns to sort by when reporting command log. + # See --logonly --configreport log -o help + # for the list of possible fields. + # This configuration option has an automatic default value. + # command_log_sort = "log_seq_num" + + # Configuration option log/command_log_cols. + # List of columns to report when reporting command log. + # See --logonly --configreport log -o help + # for the list of possible fields. + # This configuration option has an automatic default value. + # command_log_cols = "log_seq_num,log_type,log_context,log_object_type,log_object_name,log_object_id,log_object_group,log_object_group_id,log_message,log_errno,log_ret_code" + + # Configuration option log/command_log_selection. + # Selection criteria used when reporting command log. + # You can define selection criteria that are applied each + # time log is reported. This way, it is possible to control the + # amount of log that is displayed on output and you can select + # only parts of the log that are important for you. To define + # selection criteria, use fields from log report. See also + # --logonly --configreport log -S help for the + # list of possible fields and selection operators. You can also + # define selection criteria for log report on command line directly + # using --configreport log -S + # which has precedence over log/command_log_selection setting. + # For more information about selection criteria in general, see + # lvm(8) man page. + # This configuration option has an automatic default value. + # command_log_selection = "!(log_type=status && message=success)" + + # Configuration option log/verbose. + # Controls the messages sent to stdout or stderr. + # This configuration option has an automatic default value. + # verbose = 0 + + # Configuration option log/silent. + # Suppress all non-essential messages from stdout. + # This has the same effect as -qq. When enabled, the following commands + # still produce output: dumpconfig, lvdisplay, lvmdiskscan, lvs, pvck, + # pvdisplay, pvs, version, vgcfgrestore -l, vgdisplay, vgs. + # Non-essential messages are shifted from log level 4 to log level 5 + # for syslog and lvm2_log_fn purposes. + # Any 'yes' or 'no' questions not overridden by other arguments are + # suppressed and default to 'no'. + # This configuration option has an automatic default value. + # silent = 0 + + # Configuration option log/syslog. + # Send log messages through syslog. + # This configuration option has an automatic default value. + # syslog = 0 + syslog = 1 + + # Configuration option log/file. + # Write error and debug log messages to a file specified here. + # This configuration option does not have a default value defined. + # file = "/var/log/lvm2.log" + + # Configuration option log/journal. + # Record lvm information in the systemd journal. + # command: record commands that are run. + # output: record default output from commands. + # debug: record debug messages from commands. + # This configuration option has an automatic default value. + # journal = [ ] + + # Configuration option log/overwrite. + # Overwrite the log file each time the program is run. + # This configuration option has an automatic default value. + # overwrite = 0 + + # Configuration option log/level. + # The level of log messages that are sent to the log file or syslog. + # There are 6 syslog-like log levels currently in use: 2 to 7 inclusive. + # 7 is the most verbose (LOG_DEBUG). + # This configuration option has an automatic default value. + # level = 0 + + # Configuration option log/indent. + # Indent messages according to their severity. + # This configuration option has an automatic default value. + # indent = 0 + indent = 1 + + # Configuration option log/command_names. + # Display the command name on each line of output. + # This configuration option has an automatic default value. + # command_names = 0 + + # Configuration option log/prefix. + # A prefix to use before the log message text. + # (After the command name, if selected). + # Two spaces allows you to see/grep the severity of each message. + # To make the messages look similar to the original LVM tools use: + # indent = 0, command_names = 1, prefix = " -- " + # This configuration option has an automatic default value. + # prefix = " " + + # Configuration option log/activation. + # Log messages during activation. + # Don't use this in low memory situations (can deadlock). + # This configuration option has an automatic default value. + # activation = 0 + + # Configuration option log/debug_classes. + # Select log messages by class. + # Some debugging messages are assigned to a class and only appear in + # debug output if the class is listed here. Classes currently + # available: memory, devices, io, activation, allocation, + # metadata, cache, locking, lvmpolld. Use "all" to see everything. + # This configuration option has an automatic default value. + # debug_classes = [ "memory", "devices", "io", "activation", "allocation", "metadata", "cache", "locking", "lvmpolld", "dbus" ] + + # Configuration option log/debug_file_fields. + # The fields included in debug output written to log file. + # Use "all" to include everything (the default). + # This configuration option is advanced. + # This configuration option has an automatic default value. + # debug_file_fields = [ "time", "command", "fileline", "message" ] + + # Configuration option log/debug_output_fields. + # The fields included in debug output written to stderr. + # Use "all" to include everything (the default). + # This configuration option is advanced. + # This configuration option has an automatic default value. + # debug_output_fields = [ "time", "command", "fileline", "message" ] +} + +# Configuration section backup. +# How LVM metadata is backed up and archived. +# In LVM, a 'backup' is a copy of the metadata for the current system, +# and an 'archive' contains old metadata configurations. They are +# stored in a human readable text format. +backup { + + # Configuration option backup/backup. + # Maintain a backup of the current metadata configuration. + # Think very hard before turning this off! + # This configuration option has an automatic default value. + # backup = 1 + + # Configuration option backup/backup_dir. + # Location of the metadata backup files. + # Remember to back up this directory regularly! + # This configuration option has an automatic default value. + # backup_dir = "/etc/lvm/backup" + + # Configuration option backup/archive. + # Maintain an archive of old metadata configurations. + # Think very hard before turning this off. + # This configuration option has an automatic default value. + # archive = 1 + + # Configuration option backup/archive_dir. + # Location of the metdata archive files. + # Remember to back up this directory regularly! + # This configuration option has an automatic default value. + # archive_dir = "/etc/lvm/archive" + + # Configuration option backup/retain_min. + # Minimum number of archives to keep. + # This configuration option has an automatic default value. + # retain_min = 10 + + # Configuration option backup/retain_days. + # Minimum number of days to keep archive files. + # This configuration option has an automatic default value. + # retain_days = 30 +} + +# Configuration section shell. +# Settings for running LVM in shell (readline) mode. +shell { + + # Configuration option shell/history_size. + # Number of lines of history to store in ~/.lvm_history. + # This configuration option has an automatic default value. + # history_size = 100 +} + +# Configuration section global. +# Miscellaneous global LVM settings. +global { + + # Configuration option global/umask. + # The file creation mask for any files and directories created. + # Interpreted as octal if the first digit is zero. + # This configuration option has an automatic default value. + # umask = 077 + + # Configuration option global/test. + # No on-disk metadata changes will be made in test mode. + # Equivalent to having the -t option on every command. + # This configuration option has an automatic default value. + # test = 0 + + # Configuration option global/units. + # Default value for --units argument. + # This configuration option has an automatic default value. + # units = "r" + units = "h" + + # Configuration option global/si_unit_consistency. + # Distinguish between powers of 1024 and 1000 bytes. + # The LVM commands distinguish between powers of 1024 bytes, + # e.g. KiB, MiB, GiB, and powers of 1000 bytes, e.g. KB, MB, GB. + # If scripts depend on the old behaviour, disable this setting + # temporarily until they are updated. + # This configuration option has an automatic default value. + # si_unit_consistency = 1 + + # Configuration option global/suffix. + # Display unit suffix for sizes. + # This setting has no effect if the units are in human-readable form + # (global/units = "h") in which case the suffix is always displayed. + # This configuration option has an automatic default value. + # suffix = 1 + + # Configuration option global/activation. + # Enable/disable communication with the kernel device-mapper. + # Disable to use the tools to manipulate LVM metadata without + # activating any logical volumes. If the device-mapper driver + # is not present in the kernel, disabling this should suppress + # the error messages. + # This configuration option has an automatic default value. + # activation = 1 + + # Configuration option global/proc. + # Location of proc filesystem. + # This configuration option is advanced. + # This configuration option has an automatic default value. + # proc = "/proc" + + # Configuration option global/etc. + # Location of /etc system configuration directory. + # This configuration option has an automatic default value. + # etc = "/etc" + + # Configuration option global/wait_for_locks. + # When disabled, fail if a lock request would block. + # This configuration option has an automatic default value. + # wait_for_locks = 1 + + # Configuration option global/locking_dir. + # Directory to use for LVM command file locks. + # Local non-LV directory that holds file-based locks while commands are + # in progress. A directory like /tmp that may get wiped on reboot is OK. + # This configuration option has an automatic default value. + # locking_dir = "/run/lock/lvm" + + # Configuration option global/prioritise_write_locks. + # Allow quicker VG write access during high volume read access. + # When there are competing read-only and read-write access requests for + # a volume group's metadata, instead of always granting the read-only + # requests immediately, delay them to allow the read-write requests to + # be serviced. Without this setting, write access may be stalled by a + # high volume of read-only requests. This option only affects file locks. + # This configuration option has an automatic default value. + # prioritise_write_locks = 1 + + # Configuration option global/library_dir. + # Search this directory first for shared libraries. + # This configuration option does not have a default value defined. + + # Configuration option global/abort_on_internal_errors. + # Abort a command that encounters an internal error. + # Treat any internal errors as fatal errors, aborting the process that + # encountered the internal error. Please only enable for debugging. + # This configuration option has an automatic default value. + # abort_on_internal_errors = 0 + + # Configuration option global/metadata_read_only. + # No operations that change on-disk metadata are permitted. + # Additionally, read-only commands that encounter metadata in need of + # repair will still be allowed to proceed exactly as if the repair had + # been performed (except for the unchanged vg_seqno). Inappropriate + # use could mess up your system, so seek advice first! + # This configuration option has an automatic default value. + # metadata_read_only = 0 + + # Configuration option global/mirror_segtype_default. + # The segment type used by the short mirroring option -m. + # The --type mirror|raid1 option overrides this setting. + # + # Accepted values: + # mirror + # The original RAID1 implementation from LVM/DM. It is + # characterized by a flexible log solution (core, disk, mirrored), + # and by the necessity to block I/O while handling a failure. + # There is an inherent race in the dmeventd failure handling logic + # with snapshots of devices using this type of RAID1 that in the + # worst case could cause a deadlock. (Also see + # devices/ignore_lvm_mirrors.) + # raid1 + # This is a newer RAID1 implementation using the MD RAID1 + # personality through device-mapper. It is characterized by a + # lack of log options. (A log is always allocated for every + # device and they are placed on the same device as the image, + # so no separate devices are required.) This mirror + # implementation does not require I/O to be blocked while + # handling a failure. This mirror implementation is not + # cluster-aware and cannot be used in a shared (active/active) + # fashion in a cluster. + # + # This configuration option has an automatic default value. + # mirror_segtype_default = "raid1" + + # Configuration option global/support_mirrored_mirror_log. + # Enable mirrored 'mirror' log type for testing. + # + # This type is deprecated to create or convert to but can + # be enabled to test that activation of existing mirrored + # logs and conversion to disk/core works. + # + # Not supported for regular operation! + # This configuration option has an automatic default value. + # support_mirrored_mirror_log = 0 + + # Configuration option global/raid10_segtype_default. + # The segment type used by the -i -m combination. + # The --type raid10|mirror option overrides this setting. + # The --stripes/-i and --mirrors/-m options can both be specified + # during the creation of a logical volume to use both striping and + # mirroring for the LV. There are two different implementations. + # + # Accepted values: + # raid10 + # LVM uses MD's RAID10 personality through DM. This is the + # preferred option. + # mirror + # LVM layers the 'mirror' and 'stripe' segment types. The layering + # is done by creating a mirror LV on top of striped sub-LVs, + # effectively creating a RAID 0+1 array. The layering is suboptimal + # in terms of providing redundancy and performance. + # + # This configuration option has an automatic default value. + # raid10_segtype_default = "raid10" + + # Configuration option global/sparse_segtype_default. + # The segment type used by the -V -L combination. + # The --type snapshot|thin option overrides this setting. + # The combination of -V and -L options creates a sparse LV. There are + # two different implementations. + # + # Accepted values: + # snapshot + # The original snapshot implementation from LVM/DM. It uses an old + # snapshot that mixes data and metadata within a single COW + # storage volume and performs poorly when the size of stored data + # passes hundreds of MB. + # thin + # A newer implementation that uses thin provisioning. It has a + # bigger minimal chunk size (64KiB) and uses a separate volume for + # metadata. It has better performance, especially when more data + # is used. It also supports full snapshots. + # + # This configuration option has an automatic default value. + # sparse_segtype_default = "thin" + + # Configuration option global/lvdisplay_shows_full_device_path. + # Enable this to reinstate the previous lvdisplay name format. + # The default format for displaying LV names in lvdisplay was changed + # in version 2.02.89 to show the LV name and path separately. + # Previously this was always shown as /dev/vgname/lvname even when that + # was never a valid path in the /dev filesystem. + # This configuration option has an automatic default value. + # lvdisplay_shows_full_device_path = 0 + + # Configuration option global/event_activation. + # Disable event based autoactivation commands. + # WARNING: setting this to zero may cause machine startup to fail. + # Previously, setting this to zero would enable static autoactivation + # services (via the lvm2-activation-generator), but the autoactivation + # services and generator have been removed. + # This configuration option has an automatic default value. + # event_activation = 1 + + # Configuration option global/use_aio. + # Use async I/O when reading and writing devices. + # This configuration option has an automatic default value. + # use_aio = 1 + + # Configuration option global/use_lvmlockd. + # Use lvmlockd for locking among hosts using LVM on shared storage. + # Applicable only if LVM is compiled with lockd support in which + # case there is also lvmlockd(8) man page available for more + # information. + # This configuration option has an automatic default value. + use_lvmlockd = 0 + + # Configuration option global/lvmlockd_lock_retries. + # Retry lvmlockd lock requests this many times. + # Applicable only if LVM is compiled with lockd support + # This configuration option has an automatic default value. + # lvmlockd_lock_retries = 3 + + # Configuration option global/sanlock_lv_extend. + # Size in MiB to extend the internal LV holding sanlock locks. + # The internal LV holds locks for each LV in the VG, and after enough + # LVs have been created, the internal LV needs to be extended. lvcreate + # will automatically extend the internal LV when needed by the amount + # specified here. Setting this to 0 disables the automatic extension + # and can cause lvcreate to fail. Applicable only if LVM is compiled + # with lockd support + # This configuration option has an automatic default value. + # sanlock_lv_extend = 256 + + # Configuration option global/lvmlockctl_kill_command. + # The command that lvmlockctl --kill should use to force LVs offline. + # The lvmlockctl --kill command is run when a shared VG has lost + # access to locks (e.g. when sanlock has lost access to storage.) + # An empty string means that there will be no automatic attempt by + # lvmlockctl --kill to forcibly shut down LVs in the VG, and the user + # can manually intervene as described in lvmlockd(8). + # The VG name will be appended to the command specified here. + # This configuration option has an automatic default value. + # lvmlockctl_kill_command = "" + + # Configuration option global/thin_check_executable. + # The full path to the thin_check command. + # LVM uses this command to check that a thin metadata device is in a + # usable state. When a thin pool is activated and after it is + # deactivated, this command is run. Activation will only proceed if + # the command has an exit status of 0. Set to "" to skip this check. + # (Not recommended.) Also see thin_check_options. + # (See package device-mapper-persistent-data or thin-provisioning-tools) + # This configuration option has an automatic default value. + # thin_check_executable = "/usr/sbin/thin_check" + + # Configuration option global/thin_dump_executable. + # The full path to the thin_dump command. + # LVM uses this command to dump thin pool metadata. + # (See package device-mapper-persistent-data or thin-provisioning-tools) + # This configuration option has an automatic default value. + # thin_dump_executable = "/usr/sbin/thin_dump" + + # Configuration option global/thin_repair_executable. + # The full path to the thin_repair command. + # LVM uses this command to repair a thin metadata device if it is in + # an unusable state. Also see thin_repair_options. + # (See package device-mapper-persistent-data or thin-provisioning-tools) + # This configuration option has an automatic default value. + # thin_repair_executable = "/usr/sbin/thin_repair" + + # Configuration option global/thin_check_options. + # List of options passed to the thin_check command. + # With thin_check version 2.1 or newer you can add the option + # --ignore-non-fatal-errors to let it pass through ignorable errors + # and fix them later. With thin_check version 3.2 or newer you should + # include the option --clear-needs-check-flag. + # This configuration option has an automatic default value. + # thin_check_options = [ "-q", "--clear-needs-check-flag" ] + + # Configuration option global/thin_repair_options. + # List of options passed to the thin_repair command. + # This configuration option has an automatic default value. + # thin_repair_options = [ "" ] + + # Configuration option global/thin_disabled_features. + # Features to not use in the thin driver. + # This can be helpful for testing, or to avoid using a feature that is + # causing problems. Features include: block_size, discards, + # discards_non_power_2, external_origin, metadata_resize, + # external_origin_extend, error_if_no_space. + # + # Example + # thin_disabled_features = [ "discards", "block_size" ] + # + # This configuration option does not have a default value defined. + + # Configuration option global/cache_disabled_features. + # Features to not use in the cache driver. + # This can be helpful for testing, or to avoid using a feature that is + # causing problems. Features include: policy_mq, policy_smq, metadata2. + # + # Example + # cache_disabled_features = [ "policy_smq" ] + # + # This configuration option does not have a default value defined. + + # Configuration option global/cache_check_executable. + # The full path to the cache_check command. + # LVM uses this command to check that a cache metadata device is in a + # usable state. When a cached LV is activated and after it is + # deactivated, this command is run. Activation will only proceed if the + # command has an exit status of 0. Set to "" to skip this check. + # (Not recommended.) Also see cache_check_options. + # (See package device-mapper-persistent-data or thin-provisioning-tools) + # This configuration option has an automatic default value. + # cache_check_executable = "/usr/sbin/cache_check" + + # Configuration option global/cache_dump_executable. + # The full path to the cache_dump command. + # LVM uses this command to dump cache pool metadata. + # (See package device-mapper-persistent-data or thin-provisioning-tools) + # This configuration option has an automatic default value. + # cache_dump_executable = "/usr/sbin/cache_dump" + + # Configuration option global/cache_repair_executable. + # The full path to the cache_repair command. + # LVM uses this command to repair a cache metadata device if it is in + # an unusable state. Also see cache_repair_options. + # (See package device-mapper-persistent-data or thin-provisioning-tools) + # This configuration option has an automatic default value. + # cache_repair_executable = "/usr/sbin/cache_repair" + + # Configuration option global/cache_check_options. + # List of options passed to the cache_check command. + # With cache_check version 5.0 or newer you should include the option + # --clear-needs-check-flag. + # This configuration option has an automatic default value. + # cache_check_options = [ "-q", "--clear-needs-check-flag" ] + + # Configuration option global/cache_repair_options. + # List of options passed to the cache_repair command. + # This configuration option has an automatic default value. + # cache_repair_options = [ "" ] + + # Configuration option global/vdo_format_executable. + # The full path to the vdoformat command. + # LVM uses this command to initial data volume for VDO type logical volume + # This configuration option has an automatic default value. + # vdo_format_executable = "/usr/bin/vdoformat" + + # Configuration option global/vdo_format_options. + # List of options passed added to standard vdoformat command. + # This configuration option has an automatic default value. + # vdo_format_options = [ "" ] + + # Configuration option global/vdo_disabled_features. + # Features to not use in the vdo driver. + # This can be helpful for testing, or to avoid using a feature that is + # causing problems. Features include: online_rename + # + # Example + # vdo_disabled_features = [ "online_rename" ] + # + # This configuration option does not have a default value defined. + + # Configuration option global/fsadm_executable. + # The full path to the fsadm command. + # LVM uses this command to help with lvresize -r operations. + # This configuration option has an automatic default value. + # fsadm_executable = "/sbin/fsadm" + + # Configuration option global/system_id_source. + # The method LVM uses to set the local system ID. + # Volume Groups can also be given a system ID (by vgcreate, vgchange, + # or vgimport.) A VG on shared storage devices is accessible only to + # the host with a matching system ID. See 'man lvmsystemid' for + # information on limitations and correct usage. + # + # Accepted values: + # none + # The host has no system ID. + # lvmlocal + # Obtain the system ID from the system_id setting in the 'local' + # section of an lvm configuration file, e.g. lvmlocal.conf. + # uname + # Set the system ID from the hostname (uname) of the system. + # System IDs beginning localhost are not permitted. + # appmachineid + # Use an LVM-specific derivation of the local machine-id as the + # system ID. See 'man machine-id'. + # machineid + # Use the contents of the machine-id file to set the system ID + # (appmachineid is recommended.) + # file + # Use the contents of another file (system_id_file) to set the + # system ID. + # + # This configuration option has an automatic default value. + # system_id_source = "none" + + # Configuration option global/system_id_file. + # The full path to the file containing a system ID. + # This is used when system_id_source is set to 'file'. + # Comments starting with the character # are ignored. + # This configuration option does not have a default value defined. + + # Configuration option global/use_lvmpolld. + # Use lvmpolld to supervise long running LVM commands. + # When enabled, control of long running LVM commands is transferred + # from the original LVM command to the lvmpolld daemon. This allows + # the operation to continue independent of the original LVM command. + # After lvmpolld takes over, the LVM command displays the progress + # of the ongoing operation. lvmpolld itself runs LVM commands to + # manage the progress of ongoing operations. lvmpolld can be used as + # a native systemd service, which allows it to be started on demand, + # and to use its own control group. When this option is disabled, LVM + # commands will supervise long running operations by forking themselves. + # Applicable only if LVM is compiled with lvmpolld support. + # This configuration option has an automatic default value. + # use_lvmpolld = 0 + use_lvmpolld = 1 + + # Configuration option global/notify_dbus. + # Enable D-Bus notification from LVM commands. + # When enabled, an LVM command that changes PVs, changes VG metadata, + # or changes the activation state of an LV will send a notification. + # This configuration option has an automatic default value. + # notify_dbus = 1 + + # Configuration option global/io_memory_size. + # The amount of memory in KiB that LVM allocates to perform disk io. + # LVM performance may benefit from more io memory when there are many + # disks or VG metadata is large. Increasing this size may be necessary + # when a single copy of VG metadata is larger than the current setting. + # This value should usually not be decreased from the default; setting + # it too low can result in lvm failing to read VGs. + # This configuration option has an automatic default value. + # io_memory_size = 8192 +} + +# Configuration section activation. +activation { + + # Configuration option activation/checks. + # Perform internal checks of libdevmapper operations. + # Useful for debugging problems with activation. Some of the checks may + # be expensive, so it's best to use this only when there seems to be a + # problem. + # This configuration option has an automatic default value. + # checks = 0 + + # Configuration option activation/udev_sync. + # Use udev notifications to synchronize udev and LVM. + # The --noudevsync option overrides this setting. + # When disabled, LVM commands will not wait for notifications from + # udev, but continue irrespective of any possible udev processing in + # the background. Only use this if udev is not running or has rules + # that ignore the devices LVM creates. If enabled when udev is not + # running, and LVM processes are waiting for udev, run the command + # 'dmsetup udevcomplete_all' to wake them up. + # This configuration option has an automatic default value. + # udev_sync = 1 + + # Configuration option activation/udev_rules. + # Use udev rules to manage LV device nodes and symlinks. + # When disabled, LVM will manage the device nodes and symlinks for + # active LVs itself. Manual intervention may be required if this + # setting is changed while LVs are active. + # This configuration option has an automatic default value. + # udev_rules = 1 + + # Configuration option activation/verify_udev_operations. + # Use extra checks in LVM to verify udev operations. + # This enables additional checks (and if necessary, repairs) on entries + # in the device directory after udev has completed processing its + # events. Useful for diagnosing problems with LVM/udev interactions. + # This configuration option has an automatic default value. + # verify_udev_operations = 0 + + # Configuration option activation/retry_deactivation. + # Retry failed LV deactivation. + # If LV deactivation fails, LVM will retry for a few seconds before + # failing. This may happen because a process run from a quick udev rule + # temporarily opened the device. + # This configuration option has an automatic default value. + # retry_deactivation = 1 + + # Configuration option activation/missing_stripe_filler. + # Method to fill missing stripes when activating an incomplete LV. + # Using 'error' will make inaccessible parts of the device return I/O + # errors on access. Using 'zero' will return success (and zero) on I/O + # You can instead use a device path, in which case, + # that device will be used in place of missing stripes. Using anything + # other than 'error' with mirrored or snapshotted volumes is likely to + # result in data corruption. + # This configuration option is advanced. + # This configuration option has an automatic default value. + # missing_stripe_filler = "error" + + # Configuration option activation/use_linear_target. + # Use the linear target to optimize single stripe LVs. + # When disabled, the striped target is used. The linear target is an + # optimised version of the striped target that only handles a single + # stripe. + # This configuration option has an automatic default value. + # use_linear_target = 1 + + # Configuration option activation/reserved_stack. + # Stack size in KiB to reserve for use while devices are suspended. + # Insufficent reserve risks I/O deadlock during device suspension. + # This configuration option has an automatic default value. + # reserved_stack = 64 + + # Configuration option activation/reserved_memory. + # Memory size in KiB to reserve for use while devices are suspended. + # Insufficent reserve risks I/O deadlock during device suspension. + # This configuration option has an automatic default value. + # reserved_memory = 8192 + + # Configuration option activation/process_priority. + # Nice value used while devices are suspended. + # Use a high priority so that LVs are suspended + # for the shortest possible time. + # This configuration option has an automatic default value. + # process_priority = -18 + + # Configuration option activation/volume_list. + # Only LVs selected by this list are activated. + # If this list is defined, an LV is only activated if it matches an + # entry in this list. If this list is undefined, it imposes no limits + # on LV activation (all are allowed). + # + # Accepted values: + # vgname + # The VG name is matched exactly and selects all LVs in the VG. + # vgname/lvname + # The VG name and LV name are matched exactly and selects the LV. + # @tag + # Selects an LV if the specified tag matches a tag set on the LV + # or VG. + # @* + # Selects an LV if a tag defined on the host is also set on the LV + # or VG. See tags/hosttags. If any host tags exist but volume_list + # is not defined, a default single-entry list containing '@*' + # is assumed. + # + # Example + # volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ] + # + # This configuration option does not have a default value defined. + + # Configuration option activation/auto_activation_volume_list. + # A list of VGs or LVs that should be autoactivated. + # Autoactivation is an activation command run with -aay, + # i.e. vgchange -aay, lvchange -aay, or pvscan --cache -aay. + # When this list is defined, an autoactivation command will only + # activate LVs included in the list. If this list is undefined, + # it has no effect. If this list is defined but empty, then no + # LVs will be autoactivated. LVs can be included in the list by + # LV name, VG name (applies to all LVs in the VG), or tag name. + # VGs and LVs can also have an autoactivation property set in + # metadata, see --setautoactivation. LVs included in this list + # will not be autoactivated if the VG or LV autoactivation + # property is disabled (see vgs or lvs "-o autoactivation"). + # The volume_list setting and the "activation skip" property + # also apply to autoactivation. + # The -aay option is meant to be used by activation commands that + # are run automatically by the system, e.g. from systemd services. + # + # Accepted values: + # vgname + # The VG name is matched exactly and selects all LVs in the VG. + # vgname/lvname + # The VG name and LV name are matched exactly and selects the LV. + # @tag + # Selects an LV if the specified tag matches a tag set on the LV + # or VG. + # @* + # Selects an LV if a tag defined on the host is also set on the LV + # or VG. See tags/hosttags. If any host tags exist but volume_list + # is not defined, a default single-entry list containing '@*' + # is assumed. + # + # Example + # auto_activation_volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ] + # + # This configuration option does not have a default value defined. + + # Configuration option activation/read_only_volume_list. + # LVs in this list are activated in read-only mode. + # If this list is defined, each LV that is to be activated is checked + # against this list, and if it matches, it is activated in read-only + # mode. This overrides the permission setting stored in the metadata, + # e.g. from --permission rw. + # + # Accepted values: + # vgname + # The VG name is matched exactly and selects all LVs in the VG. + # vgname/lvname + # The VG name and LV name are matched exactly and selects the LV. + # @tag + # Selects an LV if the specified tag matches a tag set on the LV + # or VG. + # @* + # Selects an LV if a tag defined on the host is also set on the LV + # or VG. See tags/hosttags. If any host tags exist but volume_list + # is not defined, a default single-entry list containing '@*' + # is assumed. + # + # Example + # read_only_volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ] + # + # This configuration option does not have a default value defined. + + # Configuration option activation/raid_region_size. + # Size in KiB of each raid or mirror synchronization region. + # The clean/dirty state of data is tracked for each region. + # The value is rounded down to a power of two if necessary, and + # is ignored if it is not a multiple of the machine memory page size. + # This configuration option has an automatic default value. + # raid_region_size = 2048 + + # Configuration option activation/error_when_full. + # Return errors if a thin pool runs out of space. + # The --errorwhenfull option overrides this setting. + # When enabled, writes to thin LVs immediately return an error if the + # thin pool is out of data space. When disabled, writes to thin LVs + # are queued if the thin pool is out of space, and processed when the + # thin pool data space is extended. New thin pools are assigned the + # behavior defined here. + # This configuration option has an automatic default value. + # error_when_full = 0 + + # Configuration option activation/readahead. + # Setting to use when there is no readahead setting in metadata. + # + # Accepted values: + # none + # Disable readahead. + # auto + # Use default value chosen by kernel. + # + # This configuration option has an automatic default value. + # readahead = "auto" + + # Configuration option activation/raid_fault_policy. + # Defines how a device failure in a RAID LV is handled. + # This includes LVs that have the following segment types: + # raid1, raid4, raid5*, and raid6*. + # If a device in the LV fails, the policy determines the steps + # performed by dmeventd automatically, and the steps perfomed by the + # manual command lvconvert --repair --use-policies. + # Automatic handling requires dmeventd to be monitoring the LV. + # + # Accepted values: + # warn + # Use the system log to warn the user that a device in the RAID LV + # has failed. It is left to the user to run lvconvert --repair + # manually to remove or replace the failed device. As long as the + # number of failed devices does not exceed the redundancy of the LV + # (1 device for raid4/5, 2 for raid6), the LV will remain usable. + # allocate + # Attempt to use any extra physical volumes in the VG as spares and + # replace faulty devices. + # + # This configuration option has an automatic default value. + # raid_fault_policy = "warn" + + # Configuration option activation/mirror_image_fault_policy. + # Defines how a device failure in a 'mirror' LV is handled. + # An LV with the 'mirror' segment type is composed of mirror images + # (copies) and a mirror log. A disk log ensures that a mirror LV does + # not need to be re-synced (all copies made the same) every time a + # machine reboots or crashes. If a device in the LV fails, this policy + # determines the steps perfomed by dmeventd automatically, and the steps + # performed by the manual command lvconvert --repair --use-policies. + # Automatic handling requires dmeventd to be monitoring the LV. + # + # Accepted values: + # remove + # Simply remove the faulty device and run without it. If the log + # device fails, the mirror would convert to using an in-memory log. + # This means the mirror will not remember its sync status across + # crashes/reboots and the entire mirror will be re-synced. If a + # mirror image fails, the mirror will convert to a non-mirrored + # device if there is only one remaining good copy. + # allocate + # Remove the faulty device and try to allocate space on a new + # device to be a replacement for the failed device. Using this + # policy for the log is fast and maintains the ability to remember + # sync state through crashes/reboots. Using this policy for a + # mirror device is slow, as it requires the mirror to resynchronize + # the devices, but it will preserve the mirror characteristic of + # the device. This policy acts like 'remove' if no suitable device + # and space can be allocated for the replacement. + # allocate_anywhere + # Not yet implemented. Useful to place the log device temporarily + # on the same physical volume as one of the mirror images. This + # policy is not recommended for mirror devices since it would break + # the redundant nature of the mirror. This policy acts like + # 'remove' if no suitable device and space can be allocated for the + # replacement. + # + # This configuration option has an automatic default value. + # mirror_image_fault_policy = "remove" + + # Configuration option activation/mirror_log_fault_policy. + # Defines how a device failure in a 'mirror' log LV is handled. + # The mirror_image_fault_policy description for mirrored LVs also + # applies to mirrored log LVs. + # This configuration option has an automatic default value. + # mirror_log_fault_policy = "allocate" + + # Configuration option activation/snapshot_autoextend_threshold. + # Auto-extend a snapshot when its usage exceeds this percent. + # Setting this to 100 disables automatic extension. + # The minimum value is 50 (a smaller value is treated as 50.) + # Also see snapshot_autoextend_percent. + # Automatic extension requires dmeventd to be monitoring the LV. + # + # Example + # Using 70% autoextend threshold and 20% autoextend size, when a 1G + # snapshot exceeds 700M, it is extended to 1.2G, and when it exceeds + # 840M, it is extended to 1.44G: + # snapshot_autoextend_threshold = 70 + # + # This configuration option has an automatic default value. + # snapshot_autoextend_threshold = 100 + + # Configuration option activation/snapshot_autoextend_percent. + # Auto-extending a snapshot adds this percent extra space. + # The amount of additional space added to a snapshot is this + # percent of its current size. + # + # Example + # Using 70% autoextend threshold and 20% autoextend size, when a 1G + # snapshot exceeds 700M, it is extended to 1.2G, and when it exceeds + # 840M, it is extended to 1.44G: + # snapshot_autoextend_percent = 20 + # + # This configuration option has an automatic default value. + # snapshot_autoextend_percent = 20 + + # Configuration option activation/thin_pool_autoextend_threshold. + # Auto-extend a thin pool when its usage exceeds this percent. + # Setting this to 100 disables automatic extension. + # The minimum value is 50 (a smaller value is treated as 50.) + # Also see thin_pool_autoextend_percent. + # Automatic extension requires dmeventd to be monitoring the LV. + # + # Example + # Using 70% autoextend threshold and 20% autoextend size, when a 1G + # thin pool exceeds 700M, it is extended to 1.2G, and when it exceeds + # 840M, it is extended to 1.44G: + # thin_pool_autoextend_threshold = 70 + # + # This configuration option has an automatic default value. + # thin_pool_autoextend_threshold = 100 + + # Configuration option activation/thin_pool_autoextend_percent. + # Auto-extending a thin pool adds this percent extra space. + # The amount of additional space added to a thin pool is this + # percent of its current size. + # + # Example + # Using 70% autoextend threshold and 20% autoextend size, when a 1G + # thin pool exceeds 700M, it is extended to 1.2G, and when it exceeds + # 840M, it is extended to 1.44G: + # thin_pool_autoextend_percent = 20 + # + # This configuration option has an automatic default value. + # thin_pool_autoextend_percent = 20 + + # Configuration option activation/vdo_pool_autoextend_threshold. + # Auto-extend a VDO pool when its usage exceeds this percent. + # Setting this to 100 disables automatic extension. + # The minimum value is 50 (a smaller value is treated as 50.) + # Also see vdo_pool_autoextend_percent. + # Automatic extension requires dmeventd to be monitoring the LV. + # + # Example + # Using 70% autoextend threshold and 20% autoextend size, when a 10G + # VDO pool exceeds 7G, it is extended to 12G, and when it exceeds + # 8.4G, it is extended to 14.4G: + # vdo_pool_autoextend_threshold = 70 + # + # This configuration option has an automatic default value. + # vdo_pool_autoextend_threshold = 100 + + # Configuration option activation/vdo_pool_autoextend_percent. + # Auto-extending a VDO pool adds this percent extra space. + # The amount of additional space added to a VDO pool is this + # percent of its current size. + # + # Example + # Using 70% autoextend threshold and 20% autoextend size, when a 10G + # VDO pool exceeds 7G, it is extended to 12G, and when it exceeds + # 8.4G, it is extended to 14.4G: + # This configuration option has an automatic default value. + # vdo_pool_autoextend_percent = 20 + + # Configuration option activation/mlock_filter. + # Do not mlock these memory areas. + # While activating devices, I/O to devices being (re)configured is + # suspended. As a precaution against deadlocks, LVM pins memory it is + # using so it is not paged out, and will not require I/O to reread. + # Groups of pages that are known not to be accessed during activation + # do not need to be pinned into memory. Each string listed in this + # setting is compared against each line in /proc/self/maps, and the + # pages corresponding to lines that match are not pinned. On some + # systems, locale-archive was found to make up over 80% of the memory + # used by the process. + # + # Example + # mlock_filter = [ "locale/locale-archive", "gconv/gconv-modules.cache" ] + # + # This configuration option is advanced. + # This configuration option does not have a default value defined. + + # Configuration option activation/use_mlockall. + # Use the old behavior of mlockall to pin all memory. + # Prior to version 2.02.62, LVM used mlockall() to pin the whole + # process's memory while activating devices. + # This configuration option has an automatic default value. + # use_mlockall = 0 + + # Configuration option activation/monitoring. + # Monitor LVs that are activated. + # The --ignoremonitoring option overrides this setting. + # When enabled, LVM will ask dmeventd to monitor activated LVs. + # This configuration option has an automatic default value. + # monitoring = 1 + + # Configuration option activation/polling_interval. + # Check pvmove or lvconvert progress at this interval (seconds). + # When pvmove or lvconvert must wait for the kernel to finish + # synchronising or merging data, they check and report progress at + # intervals of this number of seconds. If this is set to 0 and there + # is only one thing to wait for, there are no progress reports, but + # the process is awoken immediately once the operation is complete. + # This configuration option has an automatic default value. + # polling_interval = 15 + + # Configuration option activation/auto_set_activation_skip. + # Set the activation skip flag on new thin snapshot LVs. + # The --setactivationskip option overrides this setting. + # An LV can have a persistent 'activation skip' flag. The flag causes + # the LV to be skipped during normal activation. The lvchange/vgchange + # -K option is required to activate LVs that have the activation skip + # flag set. When this setting is enabled, the activation skip flag is + # set on new thin snapshot LVs. + # This configuration option has an automatic default value. + # auto_set_activation_skip = 1 + + # Configuration option activation/activation_mode. + # How LVs with missing devices are activated. + # The --activationmode option overrides this setting. + # + # Accepted values: + # complete + # Only allow activation of an LV if all of the Physical Volumes it + # uses are present. Other PVs in the Volume Group may be missing. + # degraded + # Like complete, but additionally RAID LVs of segment type raid1, + # raid4, raid5, radid6 and raid10 will be activated if there is no + # data loss, i.e. they have sufficient redundancy to present the + # entire addressable range of the Logical Volume. + # partial + # Allows the activation of any LV even if a missing or failed PV + # could cause data loss with a portion of the LV inaccessible. + # This setting should not normally be used, but may sometimes + # assist with data recovery. + # + # This configuration option has an automatic default value. + # activation_mode = "degraded" + + # Configuration option activation/lock_start_list. + # Locking is started only for VGs selected by this list. + # The rules are the same as those for volume_list. + # This configuration option does not have a default value defined. + + # Configuration option activation/auto_lock_start_list. + # Locking is auto-started only for VGs selected by this list. + # The rules are the same as those for auto_activation_volume_list. + # This configuration option does not have a default value defined. +} + +# Configuration section metadata. +# This configuration section has an automatic default value. +# metadata { + + # Configuration option metadata/check_pv_device_sizes. + # Check device sizes are not smaller than corresponding PV sizes. + # If device size is less than corresponding PV size found in metadata, + # there is always a risk of data loss. If this option is set, then LVM + # issues a warning message each time it finds that the device size is + # less than corresponding PV size. You should not disable this unless + # you are absolutely sure about what you are doing! + # This configuration option is advanced. + # This configuration option has an automatic default value. + # check_pv_device_sizes = 1 + + # Configuration option metadata/record_lvs_history. + # When enabled, LVM keeps history records about removed LVs in + # metadata. The information that is recorded in metadata for + # historical LVs is reduced when compared to original + # information kept in metadata for live LVs. Currently, this + # feature is supported for thin and thin snapshot LVs only. + # This configuration option has an automatic default value. + # record_lvs_history = 0 + + # Configuration option metadata/lvs_history_retention_time. + # Retention time in seconds after which a record about individual + # historical logical volume is automatically destroyed. + # A value of 0 disables this feature. + # This configuration option has an automatic default value. + # lvs_history_retention_time = 0 + + # Configuration option metadata/pvmetadatacopies. + # Number of copies of metadata to store on each PV. + # The --pvmetadatacopies option overrides this setting. + # + # Accepted values: + # 2 + # Two copies of the VG metadata are stored on the PV, one at the + # front of the PV, and one at the end. + # 1 + # One copy of VG metadata is stored at the front of the PV. + # 0 + # No copies of VG metadata are stored on the PV. This may be + # useful for VGs containing large numbers of PVs. + # + # This configuration option is advanced. + # This configuration option has an automatic default value. + # pvmetadatacopies = 1 + + # Configuration option metadata/vgmetadatacopies. + # Number of copies of metadata to maintain for each VG. + # The --vgmetadatacopies option overrides this setting. + # If set to a non-zero value, LVM automatically chooses which of the + # available metadata areas to use to achieve the requested number of + # copies of the VG metadata. If you set a value larger than the the + # total number of metadata areas available, then metadata is stored in + # them all. The value 0 (unmanaged) disables this automatic management + # and allows you to control which metadata areas are used at the + # individual PV level using pvchange --metadataignore y|n. + # This configuration option has an automatic default value. + # vgmetadatacopies = 0 + + # Configuration option metadata/pvmetadatasize. + # The default size of the metadata area in units of 512 byte sectors. + # The metadata area begins at an offset of the page size from the start + # of the device. The first PE is by default at 1 MiB from the start of + # the device. The space between these is the default metadata area size. + # The actual size of the metadata area may be larger than what is set + # here due to default_data_alignment making the first PE a MiB multiple. + # The metadata area begins with a 512 byte header and is followed by a + # circular buffer used for VG metadata text. The maximum size of the VG + # metadata is about half the size of the metadata buffer. VGs with large + # numbers of PVs or LVs, or VGs containing complex LV structures, may need + # additional space for VG metadata. The --metadatasize option overrides + # this setting. + # This configuration option does not have a default value defined. + + # Configuration option metadata/pvmetadataignore. + # Ignore metadata areas on a new PV. + # The --metadataignore option overrides this setting. + # If metadata areas on a PV are ignored, LVM will not store metadata + # in them. + # This configuration option is advanced. + # This configuration option has an automatic default value. + # pvmetadataignore = 0 + + # Configuration option metadata/stripesize. + # This configuration option is advanced. + # This configuration option has an automatic default value. + # stripesize = 64 +# } + +# Configuration section report. +# LVM report command output formatting. +# This configuration section has an automatic default value. +# report { + + # Configuration option report/output_format. + # Format of LVM command's report output. + # If there is more than one report per command, then the format + # is applied for all reports. You can also change output format + # directly on command line using --reportformat option which + # has precedence over log/output_format setting. + # Accepted values: + # basic + # Original format with columns and rows. If there is more than + # one report per command, each report is prefixed with report's + # name for identification. + # json + # JSON format. + # json_std + # JSON format that is more compliant with JSON standard. + # Compared to original "json" format: + # - it does not use double quotes around numeric values, + # - it uses 'null' for undefined numeric values, + # - it prints string list as proper JSON array of strings instead of a single string. + # This configuration option has an automatic default value. + # output_format = "basic" + + # Configuration option report/compact_output. + # Do not print empty values for all report fields. + # If enabled, all fields that don't have a value set for any of the + # rows reported are skipped and not printed. Compact output is + # applicable only if report/buffered is enabled. If you need to + # compact only specified fields, use compact_output=0 and define + # report/compact_output_cols configuration setting instead. + # This configuration option has an automatic default value. + # compact_output = 0 + + # Configuration option report/compact_output_cols. + # Do not print empty values for specified report fields. + # If defined, specified fields that don't have a value set for any + # of the rows reported are skipped and not printed. Compact output + # is applicable only if report/buffered is enabled. If you need to + # compact all fields, use compact_output=1 instead in which case + # the compact_output_cols setting is then ignored. + # This configuration option has an automatic default value. + # compact_output_cols = "" + + # Configuration option report/aligned. + # Align columns in report output. + # This configuration option has an automatic default value. + # aligned = 1 + + # Configuration option report/buffered. + # Buffer report output. + # When buffered reporting is used, the report's content is appended + # incrementally to include each object being reported until the report + # is flushed to output which normally happens at the end of command + # execution. Otherwise, if buffering is not used, each object is + # reported as soon as its processing is finished. + # This configuration option has an automatic default value. + # buffered = 1 + + # Configuration option report/headings. + # Show headings for columns on report. + # This configuration option has an automatic default value. + # headings = 1 + + # Configuration option report/separator. + # A separator to use on report after each field. + # This configuration option has an automatic default value. + # separator = " " + + # Configuration option report/list_item_separator. + # A separator to use for list items when reported. + # This configuration option has an automatic default value. + # list_item_separator = "," + + # Configuration option report/prefixes. + # Use a field name prefix for each field reported. + # This configuration option has an automatic default value. + # prefixes = 0 + + # Configuration option report/quoted. + # Quote field values when using field name prefixes. + # This configuration option has an automatic default value. + # quoted = 1 + + # Configuration option report/columns_as_rows. + # Output each column as a row. + # If set, this also implies report/prefixes=1. + # This configuration option has an automatic default value. + # columns_as_rows = 0 + + # Configuration option report/binary_values_as_numeric. + # Use binary values 0 or 1 instead of descriptive literal values. + # For columns that have exactly two valid values to report + # (not counting the 'unknown' value which denotes that the + # value could not be determined). + # This configuration option has an automatic default value. + # binary_values_as_numeric = 0 + + # Configuration option report/time_format. + # Set time format for fields reporting time values. + # Format specification is a string which may contain special character + # sequences and ordinary character sequences. Ordinary character + # sequences are copied verbatim. Each special character sequence is + # introduced by the '%' character and such sequence is then + # substituted with a value as described below. + # + # Accepted values: + # %a + # The abbreviated name of the day of the week according to the + # current locale. + # %A + # The full name of the day of the week according to the current + # locale. + # %b + # The abbreviated month name according to the current locale. + # %B + # The full month name according to the current locale. + # %c + # The preferred date and time representation for the current + # locale (alt E) + # %C + # The century number (year/100) as a 2-digit integer. (alt E) + # %d + # The day of the month as a decimal number (range 01 to 31). + # (alt O) + # %D + # Equivalent to %m/%d/%y. (For Americans only. Americans should + # note that in other countries%d/%m/%y is rather common. This + # means that in international context this format is ambiguous and + # should not be used. + # %e + # Like %d, the day of the month as a decimal number, but a leading + # zero is replaced by a space. (alt O) + # %E + # Modifier: use alternative local-dependent representation if + # available. + # %F + # Equivalent to %Y-%m-%d (the ISO 8601 date format). + # %G + # The ISO 8601 week-based year with century as adecimal number. + # The 4-digit year corresponding to the ISO week number (see %V). + # This has the same format and value as %Y, except that if the + # ISO week number belongs to the previous or next year, that year + # is used instead. + # %g + # Like %G, but without century, that is, with a 2-digit year + # (00-99). + # %h + # Equivalent to %b. + # %H + # The hour as a decimal number using a 24-hour clock + # (range 00 to 23). (alt O) + # %I + # The hour as a decimal number using a 12-hour clock + # (range 01 to 12). (alt O) + # %j + # The day of the year as a decimal number (range 001 to 366). + # %k + # The hour (24-hour clock) as a decimal number (range 0 to 23); + # single digits are preceded by a blank. (See also %H.) + # %l + # The hour (12-hour clock) as a decimal number (range 1 to 12); + # single digits are preceded by a blank. (See also %I.) + # %m + # The month as a decimal number (range 01 to 12). (alt O) + # %M + # The minute as a decimal number (range 00 to 59). (alt O) + # %O + # Modifier: use alternative numeric symbols. + # %p + # Either "AM" or "PM" according to the given time value, + # or the corresponding strings for the current locale. Noon is + # treated as "PM" and midnight as "AM". + # %P + # Like %p but in lowercase: "am" or "pm" or a corresponding + # string for the current locale. + # %r + # The time in a.m. or p.m. notation. In the POSIX locale this is + # equivalent to %I:%M:%S %p. + # %R + # The time in 24-hour notation (%H:%M). For a version including + # the seconds, see %T below. + # %s + # The number of seconds since the Epoch, + # 1970-01-01 00:00:00 +0000 (UTC) + # %S + # The second as a decimal number (range 00 to 60). (The range is + # up to 60 to allow for occasional leap seconds.) (alt O) + # %t + # A tab character. + # %T + # The time in 24-hour notation (%H:%M:%S). + # %u + # The day of the week as a decimal, range 1 to 7, Monday being 1. + # See also %w. (alt O) + # %U + # The week number of the current year as a decimal number, + # range 00 to 53, starting with the first Sunday as the first + # day of week 01. See also %V and %W. (alt O) + # %V + # The ISO 8601 week number of the current year as a decimal number, + # range 01 to 53, where week 1 is the first week that has at least + # 4 days in the new year. See also %U and %W. (alt O) + # %w + # The day of the week as a decimal, range 0 to 6, Sunday being 0. + # See also %u. (alt O) + # %W + # The week number of the current year as a decimal number, + # range 00 to 53, starting with the first Monday as the first day + # of week 01. (alt O) + # %x + # The preferred date representation for the current locale without + # the time. (alt E) + # %X + # The preferred time representation for the current locale without + # the date. (alt E) + # %y + # The year as a decimal number without a century (range 00 to 99). + # (alt E, alt O) + # %Y + # The year as a decimal number including the century. (alt E) + # %z + # The +hhmm or -hhmm numeric timezone (that is, the hour and minute + # offset from UTC). + # %Z + # The timezone name or abbreviation. + # %% + # A literal '%' character. + # + # This configuration option has an automatic default value. + # time_format = "%Y-%m-%d %T %z" + + # Configuration option report/devtypes_sort. + # List of columns to sort by when reporting 'lvm devtypes' command. + # See 'lvm devtypes -o help' for the list of possible fields. + # This configuration option has an automatic default value. + # devtypes_sort = "devtype_name" + + # Configuration option report/devtypes_cols. + # List of columns to report for 'lvm devtypes' command. + # See 'lvm devtypes -o help' for the list of possible fields. + # This configuration option has an automatic default value. + # devtypes_cols = "devtype_name,devtype_max_partitions,devtype_description" + + # Configuration option report/devtypes_cols_verbose. + # List of columns to report for 'lvm devtypes' command in verbose mode. + # See 'lvm devtypes -o help' for the list of possible fields. + # This configuration option has an automatic default value. + # devtypes_cols_verbose = "devtype_name,devtype_max_partitions,devtype_description" + + # Configuration option report/lvs_sort. + # List of columns to sort by when reporting 'lvs' command. + # See 'lvs -o help' for the list of possible fields. + # This configuration option has an automatic default value. + # lvs_sort = "vg_name,lv_name" + + # Configuration option report/lvs_cols. + # List of columns to report for 'lvs' command. + # See 'lvs -o help' for the list of possible fields. + # This configuration option has an automatic default value. + # lvs_cols = "lv_name,vg_name,lv_attr,lv_size,pool_lv,origin,data_percent,metadata_percent,move_pv,mirror_log,copy_percent,convert_lv" + + # Configuration option report/lvs_cols_verbose. + # List of columns to report for 'lvs' command in verbose mode. + # See 'lvs -o help' for the list of possible fields. + # This configuration option has an automatic default value. + # lvs_cols_verbose = "lv_name,vg_name,seg_count,lv_attr,lv_size,lv_major,lv_minor,lv_kernel_major,lv_kernel_minor,pool_lv,origin,data_percent,metadata_percent,move_pv,copy_percent,mirror_log,convert_lv,lv_uuid,lv_profile" + + # Configuration option report/vgs_sort. + # List of columns to sort by when reporting 'vgs' command. + # See 'vgs -o help' for the list of possible fields. + # This configuration option has an automatic default value. + # vgs_sort = "vg_name" + + # Configuration option report/vgs_cols. + # List of columns to report for 'vgs' command. + # See 'vgs -o help' for the list of possible fields. + # This configuration option has an automatic default value. + # vgs_cols = "vg_name,pv_count,lv_count,snap_count,vg_attr,vg_size,vg_free" + + # Configuration option report/vgs_cols_verbose. + # List of columns to report for 'vgs' command in verbose mode. + # See 'vgs -o help' for the list of possible fields. + # This configuration option has an automatic default value. + # vgs_cols_verbose = "vg_name,vg_attr,vg_extent_size,pv_count,lv_count,snap_count,vg_size,vg_free,vg_uuid,vg_profile" + + # Configuration option report/pvs_sort. + # List of columns to sort by when reporting 'pvs' command. + # See 'pvs -o help' for the list of possible fields. + # This configuration option has an automatic default value. + # pvs_sort = "pv_name" + + # Configuration option report/pvs_cols. + # List of columns to report for 'pvs' command. + # See 'pvs -o help' for the list of possible fields. + # This configuration option has an automatic default value. + # pvs_cols = "pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free" + + # Configuration option report/pvs_cols_verbose. + # List of columns to report for 'pvs' command in verbose mode. + # See 'pvs -o help' for the list of possible fields. + # This configuration option has an automatic default value. + # pvs_cols_verbose = "pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,dev_size,pv_uuid" + + # Configuration option report/segs_sort. + # List of columns to sort by when reporting 'lvs --segments' command. + # See 'lvs --segments -o help' for the list of possible fields. + # This configuration option has an automatic default value. + # segs_sort = "vg_name,lv_name,seg_start" + + # Configuration option report/segs_cols. + # List of columns to report for 'lvs --segments' command. + # See 'lvs --segments -o help' for the list of possible fields. + # This configuration option has an automatic default value. + # segs_cols = "lv_name,vg_name,lv_attr,stripes,segtype,seg_size" + + # Configuration option report/segs_cols_verbose. + # List of columns to report for 'lvs --segments' command in verbose mode. + # See 'lvs --segments -o help' for the list of possible fields. + # This configuration option has an automatic default value. + # segs_cols_verbose = "lv_name,vg_name,lv_attr,seg_start,seg_size,stripes,segtype,stripesize,chunksize" + + # Configuration option report/pvsegs_sort. + # List of columns to sort by when reporting 'pvs --segments' command. + # See 'pvs --segments -o help' for the list of possible fields. + # This configuration option has an automatic default value. + # pvsegs_sort = "pv_name,pvseg_start" + + # Configuration option report/pvsegs_cols. + # List of columns to sort by when reporting 'pvs --segments' command. + # See 'pvs --segments -o help' for the list of possible fields. + # This configuration option has an automatic default value. + # pvsegs_cols = "pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size" + + # Configuration option report/pvsegs_cols_verbose. + # List of columns to sort by when reporting 'pvs --segments' command in verbose mode. + # See 'pvs --segments -o help' for the list of possible fields. + # This configuration option has an automatic default value. + # pvsegs_cols_verbose = "pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size,lv_name,seg_start_pe,segtype,seg_pe_ranges" + + # Configuration option report/vgs_cols_full. + # List of columns to report for lvm fullreport's 'vgs' subreport. + # See 'vgs -o help' for the list of possible fields. + # This configuration option has an automatic default value. + # vgs_cols_full = "vg_all" + + # Configuration option report/pvs_cols_full. + # List of columns to report for lvm fullreport's 'vgs' subreport. + # See 'pvs -o help' for the list of possible fields. + # This configuration option has an automatic default value. + # pvs_cols_full = "pv_all" + + # Configuration option report/lvs_cols_full. + # List of columns to report for lvm fullreport's 'lvs' subreport. + # See 'lvs -o help' for the list of possible fields. + # This configuration option has an automatic default value. + # lvs_cols_full = "lv_all" + + # Configuration option report/pvsegs_cols_full. + # List of columns to report for lvm fullreport's 'pvseg' subreport. + # See 'pvs --segments -o help' for the list of possible fields. + # This configuration option has an automatic default value. + # pvsegs_cols_full = "pvseg_all,pv_uuid,lv_uuid" + + # Configuration option report/segs_cols_full. + # List of columns to report for lvm fullreport's 'seg' subreport. + # See 'lvs --segments -o help' for the list of possible fields. + # This configuration option has an automatic default value. + # segs_cols_full = "seg_all,lv_uuid" + + # Configuration option report/vgs_sort_full. + # List of columns to sort by when reporting lvm fullreport's 'vgs' subreport. + # See 'vgs -o help' for the list of possible fields. + # This configuration option has an automatic default value. + # vgs_sort_full = "vg_name" + + # Configuration option report/pvs_sort_full. + # List of columns to sort by when reporting lvm fullreport's 'vgs' subreport. + # See 'pvs -o help' for the list of possible fields. + # This configuration option has an automatic default value. + # pvs_sort_full = "pv_name" + + # Configuration option report/lvs_sort_full. + # List of columns to sort by when reporting lvm fullreport's 'lvs' subreport. + # See 'lvs -o help' for the list of possible fields. + # This configuration option has an automatic default value. + # lvs_sort_full = "vg_name,lv_name" + + # Configuration option report/pvsegs_sort_full. + # List of columns to sort by when reporting for lvm fullreport's 'pvseg' subreport. + # See 'pvs --segments -o help' for the list of possible fields. + # This configuration option has an automatic default value. + # pvsegs_sort_full = "pv_uuid,pvseg_start" + + # Configuration option report/segs_sort_full. + # List of columns to sort by when reporting lvm fullreport's 'seg' subreport. + # See 'lvs --segments -o help' for the list of possible fields. + # This configuration option has an automatic default value. + # segs_sort_full = "lv_uuid,seg_start" + + # Configuration option report/mark_hidden_devices. + # Use brackets [] to mark hidden devices. + # This configuration option has an automatic default value. + # mark_hidden_devices = 1 + + # Configuration option report/two_word_unknown_device. + # Use the two words 'unknown device' in place of '[unknown]'. + # This is displayed when the device for a PV is not known. + # This configuration option has an automatic default value. + # two_word_unknown_device = 0 +# } + +# Configuration section dmeventd. +# Settings for the LVM event daemon. +dmeventd { + + # Configuration option dmeventd/mirror_library. + # The library dmeventd uses when monitoring a mirror device. + # libdevmapper-event-lvm2mirror.so attempts to recover from + # failures. It removes failed devices from a volume group and + # reconfigures a mirror as necessary. If no mirror library is + # provided, mirrors are not monitored through dmeventd. + # This configuration option has an automatic default value. + # mirror_library = "libdevmapper-event-lvm2mirror.so" + + # Configuration option dmeventd/raid_library. + # This configuration option has an automatic default value. + # raid_library = "libdevmapper-event-lvm2raid.so" + + # Configuration option dmeventd/snapshot_library. + # The library dmeventd uses when monitoring a snapshot device. + # libdevmapper-event-lvm2snapshot.so monitors the filling of snapshots + # and emits a warning through syslog when the usage exceeds 80%. The + # warning is repeated when 85%, 90% and 95% of the snapshot is filled. + # This configuration option has an automatic default value. + # snapshot_library = "libdevmapper-event-lvm2snapshot.so" + + # Configuration option dmeventd/thin_library. + # The library dmeventd uses when monitoring a thin device. + # libdevmapper-event-lvm2thin.so monitors the filling of a pool + # and emits a warning through syslog when the usage exceeds 80%. The + # warning is repeated when 85%, 90% and 95% of the pool is filled. + # This configuration option has an automatic default value. + # thin_library = "libdevmapper-event-lvm2thin.so" + + # Configuration option dmeventd/thin_command. + # The plugin runs command with each 5% increment when thin-pool data volume + # or metadata volume gets above 50%. + # Command which starts with 'lvm ' prefix is internal lvm command. + # You can write your own handler to customise behaviour in more details. + # User handler is specified with the full path starting with '/'. + # This configuration option has an automatic default value. + # thin_command = "lvm lvextend --use-policies" + + # Configuration option dmeventd/vdo_library. + # The library dmeventd uses when monitoring a VDO pool device. + # libdevmapper-event-lvm2vdo.so monitors the filling of a pool + # and emits a warning through syslog when the usage exceeds 80%. The + # warning is repeated when 85%, 90% and 95% of the pool is filled. + # This configuration option has an automatic default value. + # vdo_library = "libdevmapper-event-lvm2vdo.so" + + # Configuration option dmeventd/vdo_command. + # The plugin runs command with each 5% increment when VDO pool volume + # gets above 50%. + # Command which starts with 'lvm ' prefix is internal lvm command. + # You can write your own handler to customise behaviour in more details. + # User handler is specified with the full path starting with '/'. + # This configuration option has an automatic default value. + # vdo_command = "lvm lvextend --use-policies" + + # Configuration option dmeventd/executable. + # The full path to the dmeventd binary. + # This configuration option has an automatic default value. + # executable = "/usr/sbin/dmeventd" +} + +# Configuration section tags. +# Host tag settings. +# This configuration section has an automatic default value. +# tags { + + # Configuration option tags/hosttags. + # Create a host tag using the machine name. + # The machine name is nodename returned by uname(2). + # This configuration option has an automatic default value. + # hosttags = 0 + + # Configuration section tags/. + # Replace this subsection name with a custom tag name. + # Multiple subsections like this can be created. The '@' prefix for + # tags is optional. This subsection can contain host_list, which is a + # list of machine names. If the name of the local machine is found in + # host_list, then the name of this subsection is used as a tag and is + # applied to the local machine as a 'host tag'. If this subsection is + # empty (has no host_list), then the subsection name is always applied + # as a 'host tag'. + # + # Example + # The host tag foo is given to all hosts, and the host tag + # bar is given to the hosts named machine1 and machine2. + # tags { foo { } bar { host_list = [ "machine1", "machine2" ] } } + # + # This configuration section has variable name. + # This configuration section has an automatic default value. + # tag { + + # Configuration option tags//host_list. + # A list of machine names. + # These machine names are compared to the nodename returned + # by uname(2). If the local machine name matches an entry in + # this list, the name of the subsection is applied to the + # machine as a 'host tag'. + # This configuration option does not have a default value defined. + # } +# } diff --git a/lvm2-rpmlintrc b/lvm2-rpmlintrc new file mode 100644 index 0000000..2858729 --- /dev/null +++ b/lvm2-rpmlintrc @@ -0,0 +1 @@ +addFilter(r'^lvm2-testsuite') diff --git a/lvm2.changes b/lvm2.changes new file mode 100644 index 0000000..2c96a97 --- /dev/null +++ b/lvm2.changes @@ -0,0 +1,3208 @@ +------------------------------------------------------------------- +Mon Sep 18 02:06:09 UTC 2023 - Glass Su + +- Update lvm2 from LVM2.2.03.16 to LVM2.2.03.22 (jsc#PED-6339) + + *** WHATS_NEW from 2.03.17 to 2.03.22 *** + + version 2.03.22 - 02nd August 2023 + ================================== + Fix pv_major/pv_minor report field types so they are integers, not strings. + Add lvmdevices --delnotfound to delete entries for missing devices. + Always use cachepool name for metadata backup LV for lvconvert --repair. + Make metadata backup LVs read-only after pool's lvconvert --repair. + Improve VDO and Thin support with lvmlockd. + Handle 'lvextend --usepolicies' for pools for all activation variants. + Fix memleak in vgchange autoactivation setup. + Update py-compile building script. + Support conversion from thick to fully provisioned thin LV. + Cache/Thin-pool can use error and zero volumes for testing. + Individual thin volume can be cached, but cannot take snapshot. + Better internal support for handling error and zero target (for testing). + Resize COW above trimmed maximal size is does not return error. + Support parsing of vdo geometry format version 4. + Add lvm.conf thin_restore and cache_restore settings. + Handle multiple mounts while resizing volume with a FS. + Handle leading/trailing spaces in sys_wwid and sys_serial used by deivce_id. + Enhance lvm_import_vdo and use snapshot when converting VDO volume. + Fix parsing of VDO metadata. + Fix failing -S|--select for non-reporting cmds if using LV info/status fields. + Allow snapshots of raid+integrity LV. + Fix multisegment RAID1 allocator to prevent using single disk for more legs. + + version 2.03.21 - 21st April 2023 + ================================= + Fix activation of vdo-pool for with 0 length headers (converted pools). + Avoid printing internal init messages when creation integration devices. + Allow (write)cache over raid+integrity LV. + + version 2.03.20 - 21st March 2023 + ================================= + Fix segfault if using -S|--select with log/report_command_log=1 setting. + Configure now fails when requested lvmlockd dependencies are missing. + Add some configure Gentoo enhancements for static builds. + + version 2.03.19 - 21st February 2023 + ==================================== + Configure supports --with-systemd-run executed from udev rules. + Enhancement for build with MuslC systemd and non-bash system shells (dash). + Do not reset SYSTEMD_READY variable in udev for PVs on MD and loop devices. + Ensure udev is processing origin LV before its thick snapshots LVs. + Fix and improve runtime memory size detection for VDO volumes. + + version 2.03.18 - 22nd December 2022 + ==================================== + Fix issues reported by coverity scan. + Fix warning for thin pool overprovisioning on lvextend (2.03.17). + Add support for writecache metadata_only and pause_writeback settings. + Fix missing error messages in lvmdbusd. + + Version 2.03.17 - 10th November 2022 + ==================================== + Add new options (--fs, --fsmode) for FS handling when resizing LVs. + Fix 'lvremove -S|--select LV' to not also remove its historical LV right away. + Fix lv_active field type to binary so --select and --binary applies properly. + Switch to use mallinfo2 and use it only with glibc. + Error out in lvm shell if using a cmd argument not supported in the shell. + Fix lvm shell's lastlog command to report previous pre-command failures. + Extend VDO and VDOPOOL without flushing and locking fs. + Add --valuesonly option to lvmconfig to print only values without keys. + Updates configure with recent autoconf tooling. + Fix lvconvert --test --type vdo-pool execution. + Add json_std output format for more JSON standard compliant version of output. + Fix vdo_slab_size_mb value for converted VDO volume. + Fix many corner cases in device_id, including handling of S/N duplicates. + Fix various issues in lvmdbusd. + +- Drop patches that have been merged into upstream + - 0001-devices-file-move-clean-up-after-command-is-run.patch + - 0002-devices-file-fail-if-devicesfile-filename-doesn-t-ex.patch + - 0003-filter-mpath-handle-other-wwid-types-in-blacklist.patch + - 0004-filter-mpath-get-wwids-from-sysfs-vpd_pg83.patch + - 0005-pvdisplay-restore-reportformat-option.patch + - 0006-exit-with-error-when-devicesfile-name-doesn-t-exist.patch + - 0007-report-fix-pe_start-column-type-from-NUM-to-SIZ.patch + - 0008-_vg_read_raw_area-fix-segfault-caused-by-using-null-.patch + - 0009-mm-remove-libaio-from-being-skipped.patch + - 0010-dmsetup-check-also-for-ouf-of-range-value.patch + - 0011-devices-drop-double-from-sysfs-path.patch + - 0012-devices-file-fix-pvcreate-uuid-matching-pvid-entry-w.patch + - 0013-vgimportdevices-change-result-when-devices-are-not-a.patch + - 0014-vgimportdevices-fix-locking-when-creating-devices-fi.patch + - bug-1203216_lvmlockd-purge-the-lock-resources-left-in-previous-l.patch + - bug-1212613_apply-multipath_component_detection-0-to-duplicate-P.patch + +- Add upstream patch + + 0001-lvconvert-swapmetadata-fix-lvmlockd-locking.patch + + 0002-lvconvert-fix-ret-values-fro-integrity-remove.patch + + 0003-lvconvert-fix-regresion-from-integrity-check.patch + + 0004-gcc-cleanup-warnings.patch + + 0005-lvmlockd-fix-thick-to-thin-lv-conversion.patch + + 0006-lvmlockd-let-lockd_init_lv_args-set-lock_args.patch + + 0007-lvmlockd-fix-lvconvert-to-thin-pool.patch + + 0008-lvconvert-run-error-path-code-only-for-shared-VG.patch + + 0009-vgchange-acquire-an-exclusive-VG-lock-for-refresh.patch + + 0010-lvmlockd-client-mutex-ordering.patch + + 0011-filesystem-move-stat-after-open-check.patch + + 0012-tests-check-for-writecache.patch + + 0013-lvresize-fix-32-bit-overflow-in-size-calculation.patch + + 0014-gcc-fix-warnings-for-x32-architecture.patch + + 0015-gcc-warning-missing-braces-around-initializer.patch + + 0016-test-improve-aux-teardown.patch + + 0017-tests-aux-try-with-extra-sleep.patch + + 0018-tests-aux-using-singl-lvmconf-call.patch + + 0019-tests-missing-to-check-for-writecache-support.patch + + 0020-tests-pvmove-large-disk-area.patch + + 0021-tests-enforce-full-fs-check.patch + + 0022-tests-update-for-work-in-fake-dev-environment.patch + + 0023-tests-skip-test-when-lvmdbusd-runs-on-the-system.patch + + 0024-tests-better-slowdown.patch + +- Update patch + - bug-1037309_Makefile-skip-compliling-daemons-lvmlockd-directory.patch + - bug-1184124-link-tests-as-PIE.patch + - bug-1184687_Add-nolvm-for-kernel-cmdline.patch + - fate-31841-03_tests-new-test-suite-of-fsadm-for-btrfs.patch + +- Rename & Update patch + - bug-1012973_simplify-special-case-for-md-in-69-dm-lvm-metadata.patch + + bug-1012973_simplify-special-case-for-md-in-69-dm-lvm-rules.patch + +- update lvm2.spec + - change upstream_device_mapper_version to 1.02.196 + - change device_mapper_version to %{lvm2_version}_1.02.196 + - add config item "-with-libexecdir=%{_libexecdir}" to fix libexec path since commit a2d33cdf + - add new binary "%{_libexecdir}/lvresize_fs_helper" to lvm2 package + +------------------------------------------------------------------- +Sun Aug 20 03:48:00 UTC 2023 - heming.zhao@suse.com + +- blkdeactivate calls wrong mountpoint cmd (bsc#1214071) + + bug-1214071-blkdeactivate_calls_wrong_mountpoint.patch + +------------------------------------------------------------------- +Fri Jun 23 06:38:00 UTC 2023 - Heming Zhao + +- multipath_component_detection = 0 in lvm.conf does not have any effect (bsc#1212613) + - bug-1212613_apply-multipath_component_detection-0-to-duplicate-P.patch + +------------------------------------------------------------------- +Tue Dec 27 13:08:23 UTC 2022 - Ludwig Nussel + +- Replace transitional %usrmerged macro with regular version check (boo#1206798) + +------------------------------------------------------------------- +Thu Nov 3 07:05:00 UTC 2022 - Amit Chaudhary + +- killed lvmlockd doesn't clear/adopt locks leading to inability to start volume group (bsc#1203216) + - bug-1203216_lvmlockd-purge-the-lock-resources-left-in-previous-l.patch + +------------------------------------------------------------------- +Mon Oct 31 12:11:00 UTC 2022 - Heming Zhao + +- dracut-initqueue timeouts with 5.3.18-150300.59.63 kernel on ppc64le (bsc#1199074) + - in lvm2.spec, change device_mapper_version from 1.02.185 to %{lvm2_version}_1.02.185 + +------------------------------------------------------------------- +Wed Oct 12 02:55:00 UTC 2022 - Heming Zhao + +- lvm.conf should re-enable commented out option use_lvmlockd (bsc#1204219) + - re-enable "use_lvmlockd = 0" in lvm.conf + +------------------------------------------------------------------- +Wed Sep 21 00:50:00 UTC 2022 - Heming Zhao + +- lvmlockd is not supporting sanlock (bsc#1203482) + - set 1 for _supportsanlock in lvm2.spec for enabling sanlock. + +------------------------------------------------------------------- +Thu Sep 1 02:50:00 UTC 2022 - Heming Zhao + +- Update lvm2 from LVM2.2.03.15 to LVM2.2.03.16 + + *** WHATS_NEW for 2.03.16 *** + + Version 2.03.16 - 18th May 2022 + =============================== + Fix segfault when handling selection with historical LVs. + Add support --vdosettings with lvcreate, lvconvert, lvchange. + Filtering multipath devices respects blacklist setting from multipath configuration. + lvmdevices support for removing by device id using --deviceidtype and --deldev. + Display writecache block size with lvs -o writecache_block_size. + Improve cachesettings description in man lvmcache. + Fix lossing of delete message on thin-pool extension. + +- Drop patches that have been merged into upstream + - 0001-post-release.patch + - 0002-asan-fix-some-reports-from-libasan.patch + - 0003-make-generate.patch + - 0004-tests-udev-pvscan-vgchange-fix-service-wait.patch + - 0005-devices-file-do-not-clear-PVID-of-unread-devices.patch + - 0006-tests-skip-vgchange-pvs-online.sh-on-rhel5.patch + - 0007-dev_manager-fix-dm_task_get_device_list.patch + - 0008-dev_manager-failing-status-is-not-internal-error.patch + - 0009-clang-add-extra-check.patch + - 0010-clang-possible-better-compilation-with-musl-c.patch + - 0011-dev_manager-do-not-query-for-open_count.patch + - 0012-dev_manager-use-list-info-for-preset-devs.patch + - 0013-man-lvmcache-add-more-writecache-cachesettings-info.patch + - 0014-man-update-cachesettings-option-description.patch + - 0015-man-lvmcache-mention-writecache-memory-usage.patch + - 0016-writecache-display-block-size-from-lvs.patch + - 0017-devices-simplify-dev_cache_get_by_devt.patch + - 0018-devices-drop-incorrect-paths-from-aliases-list.patch + - 0019-devices-initial-use-of-existing-option.patch + - 0020-devices-fix-dev_name-assumptions.patch + - 0021-devices-use-dev-cache-aliases-handling-from-label-sc.patch + - 0022-devices-only-close-PVs-on-LVs-when-scan_lvs-is-enabl.patch + - 0023-writecache-check-memory-usage.patch + - 0024-pvscan-don-t-use-udev-for-external-device-info.patch + - 0025-vgchange-monitor-don-t-use-udev-info.patch + +- Add upstream patch + - 0001-devices-file-move-clean-up-after-command-is-run.patch + - 0002-devices-file-fail-if-devicesfile-filename-doesn-t-ex.patch + - 0003-filter-mpath-handle-other-wwid-types-in-blacklist.patch + - 0004-filter-mpath-get-wwids-from-sysfs-vpd_pg83.patch + - 0005-pvdisplay-restore-reportformat-option.patch + - 0006-exit-with-error-when-devicesfile-name-doesn-t-exist.patch + - 0007-report-fix-pe_start-column-type-from-NUM-to-SIZ.patch + - 0008-_vg_read_raw_area-fix-segfault-caused-by-using-null-.patch + - 0009-mm-remove-libaio-from-being-skipped.patch + - 0010-dmsetup-check-also-for-ouf-of-range-value.patch + - 0011-devices-drop-double-from-sysfs-path.patch + - 0012-devices-file-fix-pvcreate-uuid-matching-pvid-entry-w.patch + - 0013-vgimportdevices-change-result-when-devices-are-not-a.patch + - 0014-vgimportdevices-fix-locking-when-creating-devices-fi.patch + +- Update patch + - bug-1184687_Add-nolvm-for-kernel-cmdline.patch + +- update lvm2.spec + - indent some lines for easy read + - add new man: lvm_import_vdo.8 dmfilemapd.8 + - remove config item '--enable-cmirrord', which was obsoleted. + - remove config item '--enable-realtime', which became default setting. + - add config item "--enable-dmfilemapd" for new daemon dmfilemapd + +- lvm.conf + - align upstream style, comment out default values + +------------------------------------------------------------------- +Wed Mar 30 10:11:00 UTC 2022 - Heming Zhao + +- lvm2-monitor.service reported warning messages for udev didn't finish to set up device database (bsc#1197183) + + 0025-vgchange-monitor-don-t-use-udev-info.patch + +------------------------------------------------------------------- +Thu Mar 10 01:25:00 UTC 2022 - Heming Zhao + +- Udev database has incomplete information about device /dev/sda. (bsc#1181242) + + 0024-pvscan-don-t-use-udev-for-external-device-info.patch + +------------------------------------------------------------------- +Tue Mar 1 15:45:00 UTC 2022 - heming.zhao@suse.com + +- Update lvm2 from LVM2.2.03.12 to LVM2.2.03.15 + + *** WHATS_NEW from 2.03.13 to 2.03.15 *** + + Version 2.03.15 - 07th February 2022 + ==================================== + Remove service based autoactivation. global/event_activation = 0 is NOOP. + Improve support for metadata profiles for --type writecache. + Use cache or active DM device when available with new kernels. + Introduce function to utilize UUIDs from DM_DEVICE_LIST. + Increase some hash table size to better support large device sets. + + Version 2.03.14 - 20th October 2021 + =================================== + Device scanning is skipping directories on different filesystems. + Print info message with too many or too large archived files. + Reduce metadata readings during scanning phase. + Optimize computation of crc32 check sum with multiple PVs. + Enhance recover path on cache creation failure. + Filter out unsupported MQ/SMQ cache policy setting. + Fix memleak in mpath filter. + Support newer location for VDO statistics. + Add support for VDO async-unsafe write policy. + Improve lvm_import_vdo script. + Support VDO LV with lvcreate -ky. + Fix lvconvert for VDO LV bigger then 2T. + Create VDO LVs automatically without zeroing. + Rename vdoimport to lvm_import_vdo. + + Version 2.03.13 - 11th August 2021 + ================================== + Changes in udev support: + - obtain_device_list_from_udev defaults to 0. + - see devices/external_device_info_source, + devices/obtain_device_list_from_udev, and devices/multipath_wwids_file help + in lvm.conf + Fix devices file handling of loop with deleted backing file. + Fix devices file handling of scsi_debug WWIDs. + Fix many static analysis issues. + Support --poolmetadataspare with vgsplit and vgmerge. + Fix detection of active components of external origin volume. + Add vdoimport tool to support conversion of VDO volumes. + Support configurable allocation/vdo_pool_header_size. + Fix handling of lvconvert --type vdo-pool --virtualsize. + Simplified handling of archive() and backup() internal calls. + Add 'idm' locking type for IDM lock manager. + Fix load of kvdo target when it is not present in memory (2.03.12). + + + *** WHATS_NEW_DM from 1.02.179 to 1.02.183 *** + + Version 1.02.183 - 07th February 2022 + ===================================== + Unmangle UUIDs for DM_DEVICE_LIST ioctl. + + Version 1.02.181 - 20th October 2021 + ==================================== + Add IMA support with 'dmsetup measure' command. + Add defines DM_NAME_LIST_FLAG_HAS_UUID, DM_NAME_LIST_FLAG_DOESNT_HAVE_UUID. + Enhance tracking of activated devices when preloading dm tree. + Fix bug in construction of cache table line (regression from 1.02.159). + + Version 1.02.179 - 11th August 2021 + =================================== + (empty) + +- Drop patches that have been merged into upstream + - 0001-lvmlockd-idm-Introduce-new-locking-scheme.patch + - 0002-lvmlockd-idm-Hook-Seagate-IDM-wrapper-APIs.patch + - 0003-lib-locking-Add-new-type-idm.patch + - 0004-lib-locking-Parse-PV-list-for-IDM-locking.patch + - 0005-tools-Add-support-for-idm-lock-type.patch + - 0006-configure-Add-macro-LOCKDIDM_SUPPORT.patch + - 0007-enable-command-syntax-for-thin-and-writecache.patch + - 0008-lvremove-fix-removing-thin-pool-with-writecache-on-d.patch + - 0009-vdo-fix-preload-of-kvdo.patch + - 0010-writecache-fix-lv_on_pmem.patch + - 0011-writecache-don-t-pvmove-device-used-by-writecache.patch + - 0012-pvchange-fix-file-locking-deadlock.patch + - 0013-tests-Enable-the-testing-for-IDM-locking-scheme.patch + - 0014-tests-Support-multiple-backing-devices.patch + - 0015-tests-Cleanup-idm-context-when-prepare-devices.patch + - 0016-tests-Add-checking-for-lvmlockd-log.patch + - 0017-tests-stress-Add-single-thread-stress-testing.patch + - 0018-tests-stress-Add-multi-threads-stress-testing-for-VG.patch + - 0019-tests-stress-Add-multi-threads-stress-testing-for-PV.patch + - 0020-tests-Support-idm-failure-injection.patch + - 0021-tests-Add-testing-for-lvmlockd-failure.patch + - 0022-tests-idm-Add-testing-for-the-fabric-failure.patch + - 0023-tests-idm-Add-testing-for-the-fabric-failure-and-tim.patch + - 0024-tests-idm-Add-testing-for-the-fabric-s-half-brain-fa.patch + - 0025-tests-idm-Add-testing-for-IDM-lock-manager-failure.patch + - 0026-tests-multi-hosts-Add-VG-testing.patch + - 0027-tests-multi-hosts-Add-LV-testing.patch + - 0028-tests-multi-hosts-Test-lease-timeout-with-LV-exclusi.patch + - 0029-tests-multi-hosts-Test-lease-timeout-with-LV-shareab.patch + - 0030-fix-empty-mem-pool-leak.patch + - 0031-tests-writecache-blocksize-add-dm-cache-tests.patch + - 0032-tests-rename-test.patch + - 0033-tests-add-writecache-cache-blocksize-2.patch + - 0034-lvmlockd-Fix-the-compilation-warning.patch + - 0035-devices-don-t-use-deleted-loop-backing-file-for-devi.patch + - 0036-man-help-fix-common-option-listing.patch + - 0037-archiving-take-archive-automatically.patch + - 0038-backup-automatically-store-data-on-vg_unlock.patch + - 0039-archive-avoid-abuse-of-internal-flag.patch + - 0040-pvck-add-lock_global-before-clean_hint_file.patch + - 0041-lvmdevices-add-deviceidtype-option.patch + - bug-1188141_toolcontext-fix-double-free-core-dumped-issue.patch + - 0043-udev-create-symlinks-and-watch-even-in-suspended-sta.patch + - bug-1179691_config-set-external_device_info_source-none.patch + +- Add upstream patch + - 0001-post-release.patch + - 0002-asan-fix-some-reports-from-libasan.patch + - 0003-make-generate.patch + - 0004-tests-udev-pvscan-vgchange-fix-service-wait.patch + - 0005-devices-file-do-not-clear-PVID-of-unread-devices.patch + - 0006-tests-skip-vgchange-pvs-online.sh-on-rhel5.patch + - 0007-dev_manager-fix-dm_task_get_device_list.patch + - 0008-dev_manager-failing-status-is-not-internal-error.patch + - 0009-clang-add-extra-check.patch + - 0010-clang-possible-better-compilation-with-musl-c.patch + - 0011-dev_manager-do-not-query-for-open_count.patch + - 0012-dev_manager-use-list-info-for-preset-devs.patch + - 0013-man-lvmcache-add-more-writecache-cachesettings-info.patch + - 0014-man-update-cachesettings-option-description.patch + - 0015-man-lvmcache-mention-writecache-memory-usage.patch + - 0016-writecache-display-block-size-from-lvs.patch + - 0017-devices-simplify-dev_cache_get_by_devt.patch + - 0018-devices-drop-incorrect-paths-from-aliases-list.patch + - 0019-devices-initial-use-of-existing-option.patch + - 0020-devices-fix-dev_name-assumptions.patch + - 0021-devices-use-dev-cache-aliases-handling-from-label-sc.patch + - 0022-devices-only-close-PVs-on-LVs-when-scan_lvs-is-enabl.patch + - 0023-writecache-check-memory-usage.patch + +- Update patch + - fate-309425_display-dm-name-for-lv-name.patch + +- lvm2.spec + - add new binraries: lvmdevices vgimportdevices + - add config item "--with-cluster=internal" for cluster test + - add config item "--with-integrity=internal" + - add new man lvmautoactivation.7 + - remove lvm2-activation-generator & man page + - remove lvm2-pvscan@.service + - replace 69-dm-lvm-metad.rules with 69-dm-lvm.rules + +------------------------------------------------------------------- +Tue Feb 1 13:10:31 UTC 2022 - Martin Wilck + +- udev: create symlinks and watch even in suspended state (bsc#1195231) + + (add) 0043-udev-create-symlinks-and-watch-even-in-suspended-sta.patch + +------------------------------------------------------------------- +Wed Aug 11 08:51:25 UTC 2021 - Martin Liška + +- Add lvm2-rpmlintrc where we skip all rpmlint issue for lvm2-testsuite package + (bsc#1179047). + +------------------------------------------------------------------- +Tue Jul 13 11:35:00 UTC 2021 - heming.zhao@suse.com + +- lvm2: double free or corruption with invalid LVM_SYSTEM_DIR breaks guestfs-tools (bsc#1188141) + + bug-1188141_toolcontext-fix-double-free-core-dumped-issue.patch + +- replace exist patch with bug fixed patches + - (remove) fate-31841_fsadm-add-support-for-btrfs.patch + + (add) fate-31841-01_fsadm-add-support-to-resize-check-btrfs-filesystem.patch + + (add) fate-31841-02_man-add-support-for-btrfs.patch + + (add) fate-31841-03_tests-new-test-suite-of-fsadm-for-btrfs.patch + +------------------------------------------------------------------- +Tue Jun 8 03:00:00 UTC 2021 - heming.zhao@suse.com + +- update lvm2 from LVM2.03.10 to LVM2.2.03.12 (bsc#1187010) + + *** WHATS_NEW from 2.03.11 to 2.03.12 *** + + Version 2.03.12 - 07th May 2021 + =============================== + Allow attaching cache to thin data volume. + Fix memleak when generating list of outdated pvs. + Better hyphenation usage in man pages. + Replace use of deprecated security_context_t with char*. + Configure supports AIO_LIBS and AIO_CFLAGS. + Improve build process for static builds. + New --setautoactivation option to modify LV or VG auto activation. + New metadata based autoactivation property for LVs and VGs. + Improve signal handling with lvmpolld. + Signal handler can interrupt command also for SIGTERM. + Lvreduce --yes support. + Add configure option --with/out-symvers for non-glibc builds. + Report error when the filesystem is missing on fsadm resized volume. + Handle better blockdev with --getsize64 support for fsadm. + Do not include editline/history.h when using editline library. + Support error and zero segtype for thin-pool data for testing. + Support mixed extension for striped, error and zero segtypes. + Support resize also for stacked virtual volumes. + Skip dm-zero devices just like with dm-error target. + Reduce ioctl() calls when checking target status. + Merge polling does not fail, when LV is found to be already merged. + Poll volumes with at least 100ms delays. + Do not flush dm cache when cached LV is going to be removed. + New lvmlockctl_kill_command configuration option. + Support interruption while waiting on device close before deactivation. + Flush thin-pool messages before removing more thin volumes. + Improve hash function with less collisions and make it faster. + Reduce ioctl count when deactivating volumes. + Reduce number of metadata parsing. + Enhance performance of lvremove and vgremove commands. + Support interruption when taking archive and backup. + Accelerate large lvremoves. + Speedup search for cached device nodes. + Speedup command initialization. + Add devices file feature, off by default for now. + Support extension of writecached volumes. + Fix problem with unbound variable usage within fsadm. + Fix IMSM MD RAID detection on 4k devices. + Check for presence of VDO target before starting any conversion. + Support metatadata profiles with volume VDO pool conversions. + Support -Zn for conversion of already formated VDO pools. + Avoid removing LVs on error path of lvconvert during creation volumes. + Fix crashing lvdisplay when thin volume was waiting for merge. + Support option --errorwhenfull when converting volume to thin-pool. + Improve thin-performance profile support conversion to thin-pool. + Add workaround to avoid read of internal 'converted' devices. + Prohibit merging snapshot into the read-only thick snapshot origin. + Restore support for flipping rw/r permissions for thin snapshot origin. + Support resize of cached volumes. + Disable autoactivation with global/event_activation=0. + Check if lvcreate passes read_only_volume_list with tags and skips zeroing. + Allocation prints better error when metadata cannot fit on a single PV. + Pvmove can better resolve full thin-pool tree move. + Limit pool metadata spare to 16GiB. + Improves conversion and allocation of pool metadata. + Support thin pool metadata 15.88GiB, adds 64MiB, thin_pool_crop_metadata=0. + Enhance lvdisplay to report raid available/partial. + Support online rename of VDO pools. + Improve removal of pmspare when last pool is removed. + Fix problem with wiping of converted LVs. + Fix memleak in scanning (2.03.11). + Fix corner case allocation for thin-pools. + + Version 2.03.11 - 08th January 2021 + =================================== + Fix pvck handling MDA at offset different from 4096. + Partial or degraded activation of writecache is not allowed. + Enhance error handling for fsadm and handle correct fsck result. + Dmeventd lvm plugin ignores higher reserved_stack lvm.conf values. + Support using BLKZEROOUT for clearing devices. + Support interruption when wipping LVs. + Support interruption for bcache waiting. + Fix bcache when device has too many failing writes. + Fix bcache waiting for IO completion with failing disks. + Configure use own python path name order to prefer using python3. + Add configure --enable-editline support as an alternative to readline. + Enhance reporting and error handling when creating thin volumes. + Enable vgsplit for VDO volumes. + Lvextend of vdo pool volumes ensure at least 1 new VDO slab is added. + Use revert_lv() on reload error path after vg_revert(). + Configure --with-integrity enabled. + Restore lost signal blocking while VG lock is held. + Improve estimation of needed extents when creating thin-pool. + Use extra 1% when resizing thin-pool metadata LV with --use-policy. + Enhance --use-policy percentage rounding. + Configure --with-vdo and --with-writecache as internal segments. + Improving VDO man page examples. + Allow pvmove of writecache origin. + Report integrity fields. + Integrity volumes defaults to journal mode. + Switch code base to use flexible array syntax. + Fix 64bit math when calculation cachevol size. + Preserve uint32_t for seqno handling. + Switch from mmap to plain read when loading regular files. + Update lvmvdo man page and better explain DISCARD usage. + + *** WHATS_NEW_DM from 1.02.175 to 1.02.177 *** + + Version 1.02.177 - 07th May 2021 + ================================ + Configure proceeds without libaio to allow build of device-mapper only. + Fix symbol versioning build with -O2 -flto. + Add dm_tree_node_add_thin_pool_target_v1 with crop_metadata support. + + +- Drop patches that have been merged into upstream + - bug-1175565_01-tools-move-struct-element-before-variable-lenght-lis.patch + - bug-1175565_02-gcc-change-zero-sized-array-to-fexlible-array.patch + - bug-1175565_03-gcc-zero-sized-array-to-fexlible-array-C99.patch + - bug-1178680_add-metadata-based-autoactivation-property-for-VG-an.patch + - bug-1185190_01-pvscan-support-disabled-event_activation.patch + - bug-1185190_02-config-improve-description-for-event_activation.patch + +- Add patch + + 0001-lvmlockd-idm-Introduce-new-locking-scheme.patch + + 0002-lvmlockd-idm-Hook-Seagate-IDM-wrapper-APIs.patch + + 0003-lib-locking-Add-new-type-idm.patch + + 0004-lib-locking-Parse-PV-list-for-IDM-locking.patch + + 0005-tools-Add-support-for-idm-lock-type.patch + + 0006-configure-Add-macro-LOCKDIDM_SUPPORT.patch + + 0007-enable-command-syntax-for-thin-and-writecache.patch + + 0008-lvremove-fix-removing-thin-pool-with-writecache-on-d.patch + + 0009-vdo-fix-preload-of-kvdo.patch + + 0010-writecache-fix-lv_on_pmem.patch + + 0011-writecache-don-t-pvmove-device-used-by-writecache.patch + + 0012-pvchange-fix-file-locking-deadlock.patch + + 0013-tests-Enable-the-testing-for-IDM-locking-scheme.patch + + 0014-tests-Support-multiple-backing-devices.patch + + 0015-tests-Cleanup-idm-context-when-prepare-devices.patch + + 0016-tests-Add-checking-for-lvmlockd-log.patch + + 0017-tests-stress-Add-single-thread-stress-testing.patch + + 0018-tests-stress-Add-multi-threads-stress-testing-for-VG.patch + + 0019-tests-stress-Add-multi-threads-stress-testing-for-PV.patch + + 0020-tests-Support-idm-failure-injection.patch + + 0021-tests-Add-testing-for-lvmlockd-failure.patch + + 0022-tests-idm-Add-testing-for-the-fabric-failure.patch + + 0023-tests-idm-Add-testing-for-the-fabric-failure-and-tim.patch + + 0024-tests-idm-Add-testing-for-the-fabric-s-half-brain-fa.patch + + 0025-tests-idm-Add-testing-for-IDM-lock-manager-failure.patch + + 0026-tests-multi-hosts-Add-VG-testing.patch + + 0027-tests-multi-hosts-Add-LV-testing.patch + + 0028-tests-multi-hosts-Test-lease-timeout-with-LV-exclusi.patch + + 0029-tests-multi-hosts-Test-lease-timeout-with-LV-shareab.patch + + 0030-fix-empty-mem-pool-leak.patch + + 0031-tests-writecache-blocksize-add-dm-cache-tests.patch + + 0032-tests-rename-test.patch + + 0033-tests-add-writecache-cache-blocksize-2.patch + + 0034-lvmlockd-Fix-the-compilation-warning.patch + + 0035-devices-don-t-use-deleted-loop-backing-file-for-devi.patch + + 0036-man-help-fix-common-option-listing.patch + + 0037-archiving-take-archive-automatically.patch + + 0038-backup-automatically-store-data-on-vg_unlock.patch + + 0039-archive-avoid-abuse-of-internal-flag.patch + + 0040-pvck-add-lock_global-before-clean_hint_file.patch + + 0041-lvmdevices-add-deviceidtype-option.patch + +- Update patch + - bug-1184687_Add-nolvm-for-kernel-cmdline.patch + - fate-31841_fsadm-add-support-for-btrfs.patch + +- lvm.conf + - trim tail space + - fix typo + - [new item] devices/use_devicesfile + - [new item] devices/devicesfile + - [new item] devices/search_for_devnames + - [new item] allocation/thin_pool_crop_metadata + - [new item] global/lvmlockctl_kill_command + - [new item] global/vdo_disabled_features + +------------------------------------------------------------------- +Tue May 25 11:23:12 UTC 2021 - Wolfgang Frisch + +- Link test as position independent executable (bsc#1184124). + + bug-1184124-link-tests-as-PIE.patch + +------------------------------------------------------------------- +Fri Apr 23 03:45:00 UTC 2021 - heming.zhao@suse.com + +- Honor lvm.conf event_activation=0 on "pvscan --cache -aay" (bsc#1185190) + + bug-1185190_01-pvscan-support-disabled-event_activation.patch + + bug-1185190_02-config-improve-description-for-event_activation.patch + +------------------------------------------------------------------- +Wed Apr 21 03:04:00 UTC 2021 - heming.zhao@suse.com + +- LVM cannot be disabled on boot (bsc#1184687) + + bug-1184687_Add-nolvm-for-kernel-cmdline.patch + +- Update patch for avoiding apply warning message + + bug-1012973_simplify-special-case-for-md-in-69-dm-lvm-metadata.patch + +------------------------------------------------------------------- +Mon Apr 19 10:00:30 UTC 2021 - ghe@suse.com + +- Add metadata-based autoactivation property for VG and LV (bsc#1178680) + + bug-1178680_add-metadata-based-autoactivation-property-for-VG-an.patch + +------------------------------------------------------------------- +Tue Feb 02 03:49:00 UTC 2021 - heming.zhao@suse.com + +- lvm2 should use 'external_device_info_source="udev"' by default (bsc#1179691) + - add SUSE special patch to void issues in non udev env + + bug-1179691_config-set-external_device_info_source-none.patch + +------------------------------------------------------------------- +Mon Dec 09 01:16:00 UTC 2020 - heming.zhao@suse.com + +- lvm2 should use 'external_device_info_source="udev"' by default (bsc#1179691) + - change external_device_info_source from none to udev +- comment out lvm.conf item preferred_names by default (bsc#1179738) + - comment out preferred_names +- Update lvm.conf, make it closely to upstream's setting (bsc#1179739) + - change lvm.conf, follow upstream 7b41ea61b2e33dbfad754fd4c6e7851faf7ca5ef + +------------------------------------------------------------------- +Thu Nov 26 10:28:13 UTC 2020 - Ludwig Nussel + +- prepare usrmerge (boo#1029961) + +------------------------------------------------------------------- +Wed Nov 25 03:06:00 UTC 2020 - heming.zhao@suse.com + +- Update lvm2.spec file (bsc#1177533) + - in %postun, disable restart blk-availability.service & lvm2-monitor.service + +------------------------------------------------------------------- +Mon Oct 12 10:00:20 UTC 2020 - ghe@suse.com + +- Update lvm2.spec file (bsc#1174336) + - enable lvmlockd remote refresh using libdlmcontrol + - update libdlm dependency relationship + +------------------------------------------------------------------- +Thu Sep 03 08:16:00 UTC 2020 - heming.zhao@suse.com + +- lvm can't pass build with gcc option Wstringop-overflow (bsc#1175565) + - remove suse speical patch + - bug-1175565_lvm-cant-pass-build-with-gcc-option-Wstringop-overflow.patch + - add upstream patch + + bug-1175565_01-tools-move-struct-element-before-variable-lenght-lis.patch + + bug-1175565_02-gcc-change-zero-sized-array-to-fexlible-array.patch + + bug-1175565_03-gcc-zero-sized-array-to-fexlible-array-C99.patch + +------------------------------------------------------------------- +Thu Aug 20 04:49:00 UTC 2020 - heming.zhao@suse.com + +- lvm can't pass build with gcc option Wstringop-overflow (bsc#1175565) + + bug-1175565_lvm-cant-pass-build-with-gcc-option-Wstringop-overflow.patch + +- lvm2.spec + + add obsoletes version for passing build + + remove config item '--with-cluster=internal' for lvmlockd package + +------------------------------------------------------------------- +Mon Aug 10 07:11:00 UTC 2020 - heming.zhao@suse.com + +- Update to LVM2.2.03.10 + + WHATS_NEW from 2.03.06 to 2.03.10: + Version 2.03.10 - 09th August 2020 + ================================== + Add writecache and integrity support to lvmdbusd. + Generate unique cachevol name when default required from lvcreate. + Converting RAID1 volume to one with same number of legs now succeeds with a + warning. + Fix conversion to raid from striped lagging type. + Fix conversion to 'mirrored' mirror log with larger regionsize. + Zero pool metadata on allocation (disable with allocation/zero_metadata=0). + Failure in zeroing or wiping will fail command (bypass with -Zn, -Wn). + Add lvcreate of new cache or writecache lv with single command. + Fix running out of free buffers for async writing for larger writes. + Add integrity with raid capability. + Fix support for lvconvert --repair used by foreign apps (i.e. Docker). + + Version 2.03.09 - 26th March 2020 + ================================= + Fix formating of vdopool (vdo_slab_size_mb was smaller by 2 bits). + Fix showing of a dm kernel error when uncaching a volume with cachevol. + + Version 2.03.08 - 11th February 2020 + ==================================== + Prevent problematic snapshots of writecache volumes. + Add error handling for failing allocation in _reserve_area(). + Fix memleak in syncing of internal cache. + Fix pvck dump_current_text memleak. + Fix lvmlockd result code on error path for _query_lock_lv(). + Update pvck man page and help output. + Reject invalid writecache high/low_watermark setting. + Report writecache status. + Accept more output lines from vdo_format. + Prohibit reshaping of stacked raid LVs. + Avoid running cache input arg validation when creating vdo pool. + Prevent raid reshaping of stacked volumes. + Added VDO lvmdbusd methods for enable/disable compression & dedupe. + Added VDO lvmdbusd method for converting LV to VDO pool. + + Version 2.03.07 - 30th November 2019 + ==================================== + Subcommand in vgck for repairing headers and metadata. + Ensure minimum required region size on striped RaidLV creation. + Fix resize of thin-pool with data and metadata of different segtype. + Improve mirror type leg splitting. + Improve error path handling in daemons on shutdown. + Fix activation order when removing merged snapshot. + Experimental VDO support for lvmdbusd. + + Version 2.03.06 - 23rd October 2019 + =================================== + Add _cpool suffix to cache-pool LV name when used by caching LV. + No longer store extra UUID for cmeta and cdata cachevol layer. + Enhance activation of cache devices with cachevols. + Add _cvol in list of protected suffixes and start use it with DM UUID. + Rename LV converted to cachevol to use _cvol suffix. + Use normal LVs for wiping of cachevols. + Reload cleanered cache DM only with cleaner policy. + Fix cmd return when zeroing of cachevol fails. + Extend lvs to show all VDO properties. + Preserve VDO write policy with vdopool. + Increase default vdo bio threads to 4. + Continue report when cache_status fails. + Add support for DM_DEVICE_GET_TARGET_VERSION into device_mapper. + Fix cmirrord usage of header files from device_mapper subdir. + Allow standalone activation of VDO pool just like for thin-pools. + Activate thin-pool layered volume as 'read-only' device. + Ignore crypto devices with UUID signature CRYPT-SUBDEV. + Enhance validation for thin and cache pool conversion and swapping. + Improve internal removal of cached devices. + Synchronize with udev when dropping snapshot. + Add missing device synchronization point before removing pvmove node. + Correctly set read_ahead for LVs when pvmove is finished. + Remove unsupported OPTIONS+="event_timeout" udev rule from 11-dm-lvm.rules. + Prevent creating VGs with PVs with different logical block sizes. + Fix metadata writes from corrupting with large physical block size. + + WHATS_NEW_DM from 1.02.164 to 1.02.173: + Version 1.02.173 - 09th August 2020 + =================================== + Add support for VDO in blkdeactivate script. + + Version 1.02.171 - 26th March 2020 + ================================== + Fix dm_list interators with gcc 10 optimization (-ftree-pta). + Dmeventd handles timer without looping on short intervals. + + Version 1.02.169 - 11th February 2020 + ===================================== + Enhance error messages for device creation. + + Version 1.02.167 - 30th November 2019 + ===================================== + + Version 1.02.165 - 23rd October 2019 + ==================================== + Add support for DM_DEVICE_GET_TARGET_VERSION. + Add debug of dmsetup udevcomplete with hexa print DM_COOKIE_COMPLETED. + Fix versioning of dm_stats_create_region and dm_stats_create_region. + +- Drop patches that have been merged into upstream + - bug-1122666_devices-drop-open-error-message.patch + - bug-1150021_01-scanning-open-devs-rw-when-rescanning-for-write.patch + - bug-1149408_Fix-rounding-writes-up-to-sector-size.patch + - bug-1149408_vgcreate-vgextend-restrict-PVs-with-mixed-block-size.patch + - bug-1152378-md-component-detection-for-differing-PV-and-device-s.patch + - bug-1152378-pvscan-fix-PV-online-when-device-has-a-different-siz.patch + - jcs-SLE5498_pvscan-allow-use-of-noudevsync-option.patch + - bug-1154655_udev-remove-unsupported-OPTIONS-event_timeout-rule.patch + - bug-1158628_01-tests-replaces-grep-q-usage.patch + - bug-1158628_02-tests-fix-ra-checking.patch + - bug-1158628_03-tests-simplify-some-var-settings.patch + - bug-1158628_04-pvmove-correcting-read_ahead-setting.patch + - bug-1158628_05-activation-add-synchronization-point.patch + - bug-1158628_06-pvmove-add-missing-synchronization.patch + - bug-1158628_07-activation-extend-handling-of-pending_delete.patch + - bug-1158628_08-lv_manip-add-synchronizations.patch + - bug-1158628_09-lvconvert-improve-validation-thin-and-cache-pool-con.patch + - bug-1158628_10-thin-activate-layer-pool-aas-read-only-LV.patch + - bug-1158628_11-tests-mdadm-stop-in-test-cleanup.patch + - bug-1158628_12-test-increase-size-of-raid10-LV-allowing-tests-to-su.patch + - bug-1158628_13-lvconvert-fix-return-value-when-zeroing-fails.patch + - bug-1158628_14-tests-add-extra-settle.patch + - bug-1158628_15-test-Fix-handling-leftovers-from-previous-tests.patch + - bug-1158861_01-config-remove-filter-typo.patch + - bug-1158861_02-config-Fix-default-option-which-makes-no-sense.patch + - bug-1158861_03-vgchange-don-t-fail-monitor-command-if-vg-is-exporte.patch + - bug-1158861_04-fix-duplicate-pv-size-check.patch + - bug-1158861_05-hints-fix-copy-of-filter.patch + - bug-1158861_06-fix-segfault-for-invalid-characters-in-vg-name.patch + - bug-1158861_07-vgck-let-updatemetadata-repair-mismatched-metadata.patch + - bug-1158861_08-hints-fix-mem-leaking-buffers.patch + - bug-1158861_09-pvcreate-pvremove-fix-reacquiring-global-lock-after.patch + - bug-1150021_02-bcache-add-bcache_abort.patch + - bug-1150021_03-label-Use-bcache_abort_fd-to-ensure-blocks-are-no-lo.patch + - bug-1150021_04-bcache-add-unit-test.patch + - bug-1150021_05-bcache-bcache_invalidate_fd-only-remove-prefixes-on.patch + - bug-1150021_06-fix-dev_unset_last_byte-after-write-error.patch + - bug-1157736-add-suggestion-message-for-mirror-LVs.patch + - bug-1171907-lvremove-remove-attached-cachevol-with-removed-LV.patch + - bug-1172566_cachevol-use-cachepool-code-for-metadata-size.patch + +- lvm2.spec + + Correct lvm2.spec 'Source' & 'Source42' URL + + enable feature --with-writecache=internal + + +------------------------------------------------------------------- +Fri Jun 12 01:28:08 UTC 2020 - heming.zhao@suse.com + +- problem with LVM cache (data loss) (bsc#1172566) + + bug-1172566_cachevol-use-cachepool-code-for-metadata-size.patch + +------------------------------------------------------------------- +Wed May 27 13:00:58 UTC 2020 - heming.zhao@suse.com + +- removing LVM cache with cache volume does not remove the cache volume (bsc#1171907) + + bug-1171907-lvremove-remove-attached-cachevol-with-removed-LV.patch + +------------------------------------------------------------------- +Wed May 13 03:45:38 UTC 2020 - heming.zhao@suse.com + +- Add missing patch, which mistakenly removed in lvm2 update + + bug-998893_make_pvscan_service_after_multipathd.patch +- Change lvm2.spec for fixing build error + + lvm2.spec + +------------------------------------------------------------------- +Thu Mar 12 09:53:00 UTC 2020 - heming.zhao@suse.com + +- fix patch name typo + - bug-1158628-04-pvmove-correcting-read_ahead-setting.patch + + bug-1158628_04-pvmove-correcting-read_ahead-setting.patch + +------------------------------------------------------------------- +Mon Feb 27 09:36:00 UTC 2020 - heming.zhao@suse.com + +- vgreduce --removemissing with cache devices will remove lvs (bsc#1157736) + + bug-1157736-add-suggestion-message-for-mirror-LVs.patch + +------------------------------------------------------------------- +Thu Jan 9 10:00:30 UTC 2020 - ghe@suse.com + +- Update lvm.conf file (bsc#1159238) + - enable issue_discards by default + +------------------------------------------------------------------- +Mon Dec 23 07:22:00 UTC 2019 - heming.zhao@suse.com + +- LVM Metadata Error: Error writing device at 4096 length 512 (bsc#1150021) + + bug-1150021_01-scanning-open-devs-rw-when-rescanning-for-write.patch + + bug-1150021_02-bcache-add-bcache_abort.patch + + bug-1150021_03-label-Use-bcache_abort_fd-to-ensure-blocks-are-no-lo.patch + + bug-1150021_04-bcache-add-unit-test.patch + + bug-1150021_05-bcache-bcache_invalidate_fd-only-remove-prefixes-on.patch + + bug-1150021_06-fix-dev_unset_last_byte-after-write-error.patch +- Update patch, according to bug-1150021_01-scanning-xxx.patch + + bug-1158861_06-fix-segfault-for-invalid-characters-in-vg-name.patch + +------------------------------------------------------------------- +Tue Dec 10 08:26:00 UTC 2019 - heming.zhao@suse.com + +- backport patches for lvm2 to avoid software abnormal work (bsc#1158861) + + bug-1158861_01-config-remove-filter-typo.patch + + bug-1158861_02-config-Fix-default-option-which-makes-no-sense.patch + + bug-1158861_03-vgchange-don-t-fail-monitor-command-if-vg-is-exporte.patch + + bug-1158861_04-fix-duplicate-pv-size-check.patch + + bug-1158861_05-hints-fix-copy-of-filter.patch + + bug-1158861_06-fix-segfault-for-invalid-characters-in-vg-name.patch + + bug-1158861_07-vgck-let-updatemetadata-repair-mismatched-metadata.patch + + bug-1158861_08-hints-fix-mem-leaking-buffers.patch + + bug-1158861_09-pvcreate-pvremove-fix-reacquiring-global-lock-after.patch + +------------------------------------------------------------------- +Tue Dec 10 08:11:00 UTC 2019 - heming.zhao@suse.com + +- backport upstream patches for passing lvm2 testsuite (bsc#1158628) + + bug-1158628_01-tests-replaces-grep-q-usage.patch + + bug-1158628_02-tests-fix-ra-checking.patch + + bug-1158628_03-tests-simplify-some-var-settings.patch + + bug-1158628-04-pvmove-correcting-read_ahead-setting.patch + + bug-1158628_05-activation-add-synchronization-point.patch + + bug-1158628_06-pvmove-add-missing-synchronization.patch + + bug-1158628_07-activation-extend-handling-of-pending_delete.patch + + bug-1158628_08-lv_manip-add-synchronizations.patch + + bug-1158628_09-lvconvert-improve-validation-thin-and-cache-pool-con.patch + + bug-1158628_10-thin-activate-layer-pool-aas-read-only-LV.patch + + bug-1158628_11-tests-mdadm-stop-in-test-cleanup.patch + + bug-1158628_12-test-increase-size-of-raid10-LV-allowing-tests-to-su.patch + + bug-1158628_13-lvconvert-fix-return-value-when-zeroing-fails.patch + + bug-1158628_14-tests-add-extra-settle.patch + + bug-1158628_15-test-Fix-handling-leftovers-from-previous-tests.patch + - bug-1043040_test-fix-read-ahead-issues-in-test-scripts.patch + +------------------------------------------------------------------- +Wed Oct 23 08:42:00 UTC 2019 - heming.zhao@suse.com + +- Fix udev rules issue (bsc#1154655) + + bug-1154655_udev-remove-unsupported-OPTIONS-event_timeout-rule.patch + +------------------------------------------------------------------- +Mon Oct 21 07:59:33 UTC 2019 - heming.zhao@suse.com + +- lvm2-pvscan needs process speed improvement on a large scale PVs (jcs#SLE-5498) + + jcs-SLE5498_pvscan-allow-use-of-noudevsync-option.patch + +------------------------------------------------------------------- +Wed Oct 2 10:28:33 UTC 2019 - Martin Wilck + +- Fix LV activation issues (boo#1152378, rh#1727270) + + bug-1152378-md-component-detection-for-differing-PV-and-device-s.patch + + bug-1152378-pvscan-fix-PV-online-when-device-has-a-different-siz.patch + +------------------------------------------------------------------- +Mon Sep 9 12:00:00 UTC 2019 - heming.zhao@suse.com + +- Update lvm2.spec: make baselibs.conf to a common source. + +------------------------------------------------------------------- +Mon Sep 9 11:00:25 UTC 2019 - ghe@suse.com + +- Avoid creation of mixed-blocksize PV on LVM volume groups (bsc#1149408) + + bug-1149408_Fix-rounding-writes-up-to-sector-size.patch + + bug-1149408_vgcreate-vgextend-restrict-PVs-with-mixed-block-size.patch +- Update lvm.conf files + - add devices/allow_mixed_block_sizes item + +------------------------------------------------------------------- +Mon Sep 02 11:21:03 UTC 2019 - heming.zhao@suse.com + +- Update to LVM2.2.03.05 + - To drop lvm2-clvm and lvm2-cmirrord rpms (jsc#PM-1324) + - Fix Out of date package (bsc#1111734) + - Fix occasional slow shutdowns with kernel 5.0.0 and up (bsc#1137648) + - Remove clvmd + - Remove lvmlib (api) + - Remove lvmetad +- Drop patches that have been merged into upstream + - bug-1114113_metadata-prevent-writing-beyond-metadata-area.patch + - bug-1137296_pvremove-vgextend-fix-using-device-aliases-with-lvmetad.patch + - bug-1135984_cache-support-no_discard_passdown.patch +- Drop patches that have been nonexist/unsupport in upstream + - bsc1080299-detect-clvm-properly.patch + - bug-998893_make_pvscan_service_after_multipathd.patch + - bug-978055_clvmd-try-to-refresh-device-cache-on-the-first-failu.patch + - bug-950089_test-fix-lvm2-testsuite-build-error.patch + - bug-1072624_test-lvmetad_dump-always-timed-out-when-using-nc.patch + - tests-specify-python3-as-the-script-interpreter.patch +- Update spec files + - merge device-mapper, lvm2-lockd, lvm2 into one spec file + - clvmd/lvmlib (api)/lvmetad had been removed, so delete related context in spec file +- Update lvm.conf files + - remove all lvmetad lines/keywords + - add event_activation + - remove fallback_to_lvm1 & related items + - remove locking_type/fallback_to_clustered_locking/fallback_to_local_locking items + - remove locking_library item + - remove all special filter rules + +------------------------------------------------------------------- +Tue Jul 9 10:00:05 UTC 2019 - ghe@suse.com + +- Fix unknown feature in status message (bsc#1135984) + + bug-1135984_cache-support-no_discard_passdown.patch + +------------------------------------------------------------------- +Thu Jun 27 02:53:03 UTC 2019 - heming.zhao@suse.com + +- Fix using device aliases with lvmetad (bsc#1137296) + + bug-1137296_pvremove-vgextend-fix-using-device-aliases-with-lvmetad.patch + +------------------------------------------------------------------- +Tue Apr 30 10:20:05 UTC 2019 - ghe@suse.com + +- Fix devices drop open error message (bsc#1122666) + + bug-1122666_devices-drop-open-error-message.patch + +------------------------------------------------------------------- +Tue Mar 19 12:02:02 UTC 2019 - Martin Liška + +- Use %make_build in order to provide verbose output. + +------------------------------------------------------------------- +Fri Feb 1 08:20:15 UTC 2019 - ghe@suse.com + +- Disable the LVM lock daemon using sanlock, in order to avoid the + dependence on sanlock related packages (bsc#1121382) + +------------------------------------------------------------------- +Mon Jan 14 14:23:52 CET 2019 - kukuk@suse.de + +- Use %license instead of %doc [bsc#1082318] + +------------------------------------------------------------------- +Mon Nov 5 08:10:05 UTC 2018 - ghe@suse.com + +- Prevent writing beyond metadata area (bsc#1114113) + + bug-1114113_metadata-prevent-writing-beyond-metadata-area.patch + +------------------------------------------------------------------- +Wed Aug 29 10:20:30 UTC 2018 - ghe@suse.com + +- Fix lvm2 activation issue when used on top of multipath + bsc#998893 + + bug-998893_make_pvscan_service_after_multipathd.patch + +------------------------------------------------------------------- +Mon Jul 23 11:45:20 UTC 2018 - ghe@suse.com + +- Update to LVM2.2.02.180 + Never send any discard ioctl with test mode. + Fix thin-pool alloc which needs same PV for data and metadata. + Extend list of non-memlocked areas with newly linked libs. + Enhance vgcfgrestore to check for active LVs in restored VG. + lvconvert: provide possible layouts between linear and striped/raid + Fix unmonitoring of merging snapshots. + Add missing -l description in fsadm man page. + Cache can uses metadata format 2 with cleaner policy. + Avoid showing internal error in lvs output or pvmoved LVs. + Fix check if resized PV can also fit metadata area. + Reopen devices RDWR only before writing to avoid udev issues. + Change pvresize output confusing when no resize took place. + Fix lvmetad hanging on shutdown. + Fix mem leak in clvmd and more coverity issues. + Fix that pvmove does not work (bsc#1080299) +- Drop patches that have been merged upstream + - fate-323203_lvmlockd-add-lockopt-values-for-skipping-selected-lo.patch + - lvm2-69-dm-lvm-metad.rules-explicit-pvscan-rule.patch + - lvm2-69-dm-lvm-metad.rules-set-systemd-vars-on-chang.patch + - bug-1095960_dev_io-no-discard-in-testmode.patch +- Refresh patches + + bsc1080299-detect-clvm-properly.patch + + bug-950089_test-fix-lvm2-testsuite-build-error.patch +- Update spec files + Fix BuildRequires package name for modprobe (bsc#1102668) + Fix cmirrord LV creation/activation failure (bsc#1091863) +- Fix building error in OBS due to the script interpreter + + tests-specify-python3-as-the-script-interpreter.patch + +------------------------------------------------------------------- +Wed Jul 18 11:33:30 UTC 2018 - ghe@suse.com + +- Fix issuing discard in test mode (bsc#1095960) + + bug-1095960_dev_io-no-discard-in-testmode.patch + +------------------------------------------------------------------- +Tue May 29 10:45:30 UTC 2018 - ghe@suse.com + +- Fix the wrong filter for the cdrom device in /etc/lvm/lvm.conf + (bsc#1081530) + +------------------------------------------------------------------- +Thu Apr 19 10:59:59 UTC 2018 - mwilck@suse.com + +- Fix handling of udev CHANGE events with systemd (bsc#1067312) + + lvm2-69-dm-lvm-metad.rules-explicit-pvscan-rule.patch + + lvm2-69-dm-lvm-metad.rules-set-systemd-vars-on-chang.patch + +------------------------------------------------------------------- +Mon Feb 12 09:01:29 UTC 2018 - tchvatal@suse.com + +- Fix detection of clvm that happens on compile time based on + CLVM_PIDFILE, as we determine these features on runtime + bsc#1080299: + + bsc1080299-detect-clvm-properly.patch + +------------------------------------------------------------------- +Tue Jan 16 11:53:36 UTC 2018 - zren@suse.com + +- clvmd: try to refresh device cache on the first failure + (bsc#978055, bsc#1076042) + + bug-978055_clvmd-try-to-refresh-device-cache-on-the-first-failu.patch + +------------------------------------------------------------------- +Wed Jan 10 10:41:45 UTC 2018 - zren@suse.com + +- lvmlockd: add lockopt values for skipping selected locks (fate#323203) + + fate-323203_lvmlockd-add-lockopt-values-for-skipping-selected-lo.patch + +------------------------------------------------------------------- +Tue Dec 19 07:35:11 UTC 2017 - zren@suse.com + +- device-mapper.spec: fix wrong replacement of DM_VERSION (bsc#1072524) +- Fixes failure of some testcases caused by nc behavior change (bsc#1072624) + + bug-1072624_test-lvmetad_dump-always-timed-out-when-using-nc.patch +- Refreshed fate-31841_fsadm-add-support-for-btrfs.patch +- Update to LVM2.2.02.177 + When writing text metadata content, use complete 4096 byte blocks. + Change text format metadata alignment from 512 to 4096 bytes. + When writing metadata, consistently skip mdas marked as failed. + Refactor and adjust text format metadata alignment calculation. + Ensure _node_send_message always uses clean status of thin pool. + Fix lvmlockd to use pool lock when accessing _tmeta volume. + Report expected sanlock_convert errors only when retries fail. + Avoid blocking in sanlock_convert on SH to EX lock conversion. + Deactivate missing raid LV legs (_rimage_X-missing_Y_Z) on decativation. + Categorise I/O with reason annotations in debug messages. + Allow extending of raid LVs created with --nosync after a failed repair. + Command will lock memory only when suspending volumes. + Merge segments when pvmove is finished. + Activation code for pvmove automatically discovers holding LVs for resume. + Make a pvmove LV locking holder. + Do not change critical section counter on resume path without real resume. + Enhance activation code to automatically suspend pvmove participants. + Prevent conversion of thin volumes to snapshot origin when lvmlockd is used. + Add support for pvmove of cache and snapshot origins. + Avoid using precommitted metadata for suspending pvmove tree. + Deactivate activated LVs on error path when pvmove activation fails. + Add "io" to log/debug_classes for logging low-level I/O. + Avoid importing persistent filter in vgscan/pvscan/vgrename. + Fix memleak of string buffer when vgcfgbackup runs in secure mode. + Do not print error when clvmd cannot find running clvmd. + Prevent start of new merge of snapshot if origin is already being merged. + Fix offered type for raid6_n_6 to raid5 conversion (raid5_n). + Deactivate sub LVs when removing unused cache-pool. + Do not take backup with suspended devices. + +------------------------------------------------------------------- +Tue Nov 21 09:29:02 UTC 2017 - zren@suse.com + +- Update to LVM2.2.02.176: + Keep Install section only in lvm2-{lvmetad,lvmpolld}.socket systemd unit. + Fix segfault in lvm_pv_remove in liblvm. (2.02.173) + Do not allow storing VG metadata with LV without any segment. + Fix printed message when thin snapshot was already merged. + Remove created spare LV when creation of thin-pool failed. + Avoid reading ignored metadata when mda gets used again. + Fix detection of moved PVs in vgsplit. (2.02.175) + Ignore --stripes/--stripesize on RAID takeover + Improve used paths for generated systemd units and init shells. + Disallow creation of snapshot of mirror/raid subLV (was never supported). + Fix regression in more advanced vgname extraction in lvconvert (2.02.169). + Allow lvcreate to be used for caching of _tdata LV. + Avoid internal error when resizing cache type _tdata LV (not yet supported). + Show original converted names when lvconverting LV to pool volume. + Move lib code used only by liblvm into metadata-liblvm.c. + Distinguish between device not found and excluded by filter. + Monitor external origin LVs. + Remove the replicator code, including configure --with-replicators. + Allow lvcreate --type mirror to work with 100%FREE. + Improve selection of resource name for complex volume activation lock. + Avoid cutting first character of resource name for activation lock. + Support for encrypted devices in fsadm. + Improve thin pool overprovisioning and repair warning messages. + Fix incorrect adjustment of region size on striped RaidLVs. +- Drop: bug-960044_lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch +- Refresh: fate-31841_fsadm-add-support-for-btrfs.patch + +------------------------------------------------------------------- +Thu Nov 2 12:48:23 UTC 2017 - zren@suse.com + +- Re-add a strict requires on sanlock, fate#323203 + +------------------------------------------------------------------- +Mon Oct 23 07:50:33 UTC 2017 - zren@suse.com + +- Update to LVM2.2.02.175 +- Use week dependency for lvm2-lockd on libdlm and sanlock +- Rename/refresh patches: + - display-dm-name-for-lv-name.diff to fate-309425_display-dm-name-for-lv-name.patch + - fsadm-add-support-for-btrfs.patch to fate-31841_fsadm-add-support-for-btrfs.patch + - dmeventd-fix-dso-name-wrong-compare.patch to bug-935623_dmeventd-fix-dso-name-wrong-compare.patch + - lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch to bug-960044_lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch + - simplify-special-case-for-md-in-69-dm-lvm-metadata.patch to bug-1012973_simplify-special-case-for-md-in-69-dm-lvm-metadata.patch + - lvm2-testsuite.patch to bug-950089_test-fix-lvm2-testsuite-build-error.patch + +------------------------------------------------------------------- +Thu Sep 14 09:51:18 UTC 2017 - zren@suse.com + +- Drop resource agents for clvmd and cmirror (bsc#1058680) + - clvmd.ocf + - cmirrord.ocf +- Drop all patches for cmirror (bsc#1058661) + - cluster_support_mirrord_log.diff + - cmirrord_improvment_performance.patch + - lvconvert-cluster-mirrored-disk-failed.patch + - improve-mirror-legs-on-different-tag-pvs.patch + - make-mirror-legs-on-different-tag-pvs.patch + - use-mirrortype-asdefault-whenclvmdrunning.patch + +------------------------------------------------------------------- +Fri Aug 18 09:53:39 UTC 2017 - mwilck@suse.com + +- Dropped udev rule patches (bsc#1054363) + * dropped udev_rules-update.diff + * dropped device-mapper-dmsetup-export.patch + * dropped udev-Check-for-DM_NR_VALID_PATHS.patch + * dropped Import-ID_FS_XXX-variables-bnc909358.patch + * dropped 69-dm-lvm-metad.rules-Do-not-process-rules-for-multi.patch + +------------------------------------------------------------------- +Tue Aug 1 05:59:29 UTC 2017 - zren@suse.com + +- Dropped several not-upstreamed patches, some of them neither have + history reference nor patch header, some were temporary workaround + fix. + - device-mapper-gcc-warnings.patch + - device-mapper-type_punning.diff + - fix-closedown-before-thread-finish.patch + - libdm-iface-not-output-error-message-inside-retry-loop.patch + - pvcreate-enhance-the-error-message.patch + - pvmove_support_clustered_vg.diff + - version-plugins-in-libdir.patch + +------------------------------------------------------------------- +Tue Jul 25 13:48:00 UTC 2017 - zren@suse.com + +- Update to LVM2.2.02.173 +- Sync our lvm.conf with V2.02.173 + +------------------------------------------------------------------- +Thu Jul 13 13:09:35 UTC 2017 - tchvatal@suse.com + +- Require device-mapper-devel rather than recommend. It is really + needed (the .h files are required by the lvm2app and lvm2cmd) + +------------------------------------------------------------------- +Thu Jul 6 10:18:09 UTC 2017 - zren@suse.com + +- Don't create symlink for invisible device like thin-pool (bsc#1046591) + * drop 10-dm.rules-Reset-state-variable-for-spurious-events.patch + +------------------------------------------------------------------- +Tue Jul 4 10:24:40 UTC 2017 - zren@suse.com + +- Update to LVM2.2.02.172 +- Cleanup spec file, and refresh patches + * removed device-mapper-link.patch + * removed bug-1033691_tests-missed-to-export-lvm-binary-for-fsadm.patch + * removed Makefile-skip-compliling-daemons-lvmlockd-directory.patch + * added bug-1037309_Makefile-skip-compliling-daemons-lvmlockd-directory.patch + +------------------------------------------------------------------- +Thu Jun 29 16:38:05 UTC 2017 - dimstar@opensuse.org + +- Fix zypper update issue with device-mapper package, see bsc#1045396 + +------------------------------------------------------------------- +Sat Jun 17 16:50:53 UTC 2017 - zren@suse.com + +- Backport fix for lvresize-full.sh failed, see bsc#1033691 + + bug-1033691_tests-missed-to-export-lvm-binary-for-fsadm.patch + +------------------------------------------------------------------- +Sat Jun 17 14:56:58 UTC 2017 - zren@suse.com + +- Fix test failures about read ahead issue, see bsc#1043040 + + bug-1043040_test-fix-read-ahead-issues-in-test-scripts.patch +- Reorder the patches to put them into the right groups + +------------------------------------------------------------------- +Fri Jun 9 19:27:45 UTC 2017 - kukuk@suse.com + +- Don't package dynamic directories in /run + +------------------------------------------------------------------- +Wed May 17 08:21:27 UTC 2017 - zren@suse.com + +- Add lvmlockd-related configuration items in lvm.conf, fate#323203 + +------------------------------------------------------------------- +Tue May 16 07:45:25 UTC 2017 - zren@suse.com + +- Fix compiling issue of lvmlockd, bsc#1037309 + + Makefile-skip-compliling-daemons-lvmlockd-directory.patch + +------------------------------------------------------------------- +Fri May 5 11:33:28 UTC 2017 - tchvatal@suse.com + +- Remove comments breaking scriptlets: + * warning: %postun(libdevmapper1_03-1.02.137-5.1.x86_64) scriptlet failed + +------------------------------------------------------------------- +Wed May 3 09:01:42 UTC 2017 - zren@suse.com + +- This patch has been dropped since SLE12 (bsc#952300) + * removed sys_mount_instead_linux_fs.diff +- Drop obsolete patches: + * removed improve_probing.diff (bsc#49657) + * removed no-inc-audit.diff + * removed suppress_format1_size_warning.diff +- Add more bug/fate references, and reorder the patches accordingly + +------------------------------------------------------------------- +Tue Apr 25 12:00:23 UTC 2017 - zren@suse.com + +- Add check_pv_device_sizes option to check PV and disk sizes + bsc#999878 + +------------------------------------------------------------------- +Mon Apr 24 17:08:34 UTC 2017 - arvidjaar@gmail.com + +- BuildRequire modutils so build script detects modprobe and module + autoloading works again (boo#983221) + +------------------------------------------------------------------- +Tue Apr 18 11:07:01 UTC 2017 - tchvatal@suse.com + +- Update to 2.02.170: + * Few smal fixes around; obsoleted 169 release that was removed + from mirrors +- Refresh patch: + * display-dm-name-for-lv-name.diff + +------------------------------------------------------------------- +Wed Apr 12 01:33:15 UTC 2017 - zren@suse.com + +- Update device mapper version to 1.02.138, see WHATS_NEW_DM for + detailed changelogs + * Drop obsolete lvmchange files accordingly +- Refresh libdm-iface-not-output-error-message-inside-retry-loop.patch +- Refresh make-mirror-legs-on-different-tag-pvs.patch +- device-mapper-dmsetup-export.patch + +------------------------------------------------------------------- +Mon Apr 10 23:08:45 UTC 2017 - jnelson-suse@jamponi.net + +- Version update to 2.02.169 release, see WHATS_NEW and WHATS_NEW_DM + files for detailed changelogs + +------------------------------------------------------------------- +Mon Apr 10 10:41:02 UTC 2017 - tchvatal@suse.com + +- Split configure options to have one per line +- Pass over with spec-cleaner +- Enable internal cache +- Enable lvmpolld + +------------------------------------------------------------------- +Mon Apr 10 07:41:10 UTC 2017 - zren@suse.com + +- Add 'lvm2-lockd' subpackage, fate#323203 to lvm2-clvm to not pull + corosync and other deps to the core lvm2 package + +------------------------------------------------------------------- +Fri Feb 24 10:57:16 UTC 2017 - zren@suse.com + +- Improve the layout and readability of spec files + * Place subpackages' sections at the bottom of spec file, making + the layout more reasonable: 1. main package's spec sections are + contiguous without a break; 2. subpackage's spec spections can + also be placed together. + * Get rid of wild-card usage in %files section; spec file is a + perfect place for packager to know what files are exactly delivered + with each RPMs; staring at wild-card doesn't give much information. + * Put bsc#xxx at previous line of each SUSE patch at my best, some + are still missing. + +------------------------------------------------------------------- +Thu Feb 23 06:27:55 UTC 2017 - zren@suse.com + +- Enable lvmetad in sync with SLE + +------------------------------------------------------------------- +Wed Feb 22 11:25:01 UTC 2017 - zren@suse.com + +- Add systemid feature + * update lvm.conf accordingly + * replace whitespaces with tab in lvm.conf + +------------------------------------------------------------------- +Wed Feb 22 10:43:38 UTC 2017 - zren@suse.com + +- Fix several issues about clvmd/cmorriord RAs (bsc#1023283, + bsc#1025560) + * deal with time values passed down with time units + * make correct "return code" + * fix format issue that tab messes up with spaces + +------------------------------------------------------------------- +Wed Feb 22 06:39:27 UTC 2017 - zren@suse.com + +- udev: simplify special-case for md in 69-dm-lvm-metadata.rules + * fix regression of bsc#1012973 + * drop remove-special-case-for-md-in-69-dm-lvm-metadata.rul.patch + * add simplify-special-case-for-md-in-69-dm-lvm-metadata.patch + +------------------------------------------------------------------- +Fri Jan 20 09:46:27 UTC 2017 - tchvatal@suse.com + +- Remove special case for md (bsc#1012973) + * remove-special-case-for-md-in-69-dm-lvm-metadata.rul.patch + +------------------------------------------------------------------- +Tue Jan 10 09:25:17 UTC 2017 - zlliu@suse.com + +- add a new test package named lvm2-testsuite bnc#950089 + * lvm2-testsuite.patch + +------------------------------------------------------------------- +Wed Dec 28 11:08:23 UTC 2016 - tchvatal@suse.com + +- Version update to 2.02.168 release, see WHATS_NEW and WHATS_NEW_DM + files for detailed changelogs + * Refresh patch cluster_support_mirrord_log.diff + +------------------------------------------------------------------- +Wed Dec 28 10:58:29 UTC 2016 - zlliu@suse.com + +- fix bsc#1015357 about blkid_wiping printed warning. + * Add dependency on pkgconfig(blkid) + +------------------------------------------------------------------- +Fri Sep 9 09:24:19 UTC 2016 - tchvatal@suse.com + +- This is sync commit from Leap/SLE12 only +- Add patch pvcreate-enhance-the-error-message.patch bsc#960744 +- Modify GPL-2.0 to GPL-2.0+ and LGPL-2.1 to LGPL-2.1+ to avoid + license conflict with thin-provisioning-tools which is using GPL-3.0 +- Also contains fix for bsc#969310 +- Fix clvmd.ocf and cmirrord to remove "-d" option for cmirrod + (bsc#971334) +- Fix clvmd.ocf to add lvmconf --enable-cluster before start daemon + when locking_type is not 3 or use_lvmetad is 1 in setting + (bsc#970439) +- Modified spec to enable blkid-wiping (fate#319908) +- Fix clvmd binary not found in case that users still use RA from + ocf:lvm2:clvm (bsc#980200) + Add sbindir=$HA_SBIN_DIR for clvmd.ocf and cmirrord.ocf +- The bsc#979635 wnd bsc#991181 as fixed in past thanks to proper /usr + migration code +- Modified raid10_segtype_default from "mirror" to "raid10"(bsc#982329) +- Remove lvm2-clvmd/cmirrord.service and related activation services + from %service_add _pre/post/preun/postun because we start clvmd + /clmirrord and activate via pacemaker and RA. (bsc#980296) +- Lvchange improve refresh by trying to deactivate snapshot thinLV + in case it's preventing merge process change integrated upstream. + (bsc#984321) +- Fixed in past bsc#992843 +- Fixed by upstream bsc#984321 +- Fixed by upstream bsc#970943 +- 69-dm-lvm-metad.rules: Do not process rules for multipath + devices (bsc#bsc#990538, bsc#986734) + Add: 69-dm-lvm-metad.rules-Do-not-process-rules-for-multi.patch +- Rewrite patches to include patch header: + * 10-dm.rules-Reset-state-variable-for-spurious-events.patch + * device-mapper-link + * device-mapper-type_punning.diff + * udev_rules-update.diff +- Sync also lvm.conf + +------------------------------------------------------------------- +Fri Sep 2 08:23:06 UTC 2016 - tchvatal@suse.com + +- Update to 2.02.164 release, WHATS_NEW for changelog + * Mostly because the old tarball was no longer available + * Refresh fuzz on patch: + + make-mirror-legs-on-different-tag-pvs.patch + + cluster_support_mirrord_log.diff +- Update patch to use correct api: + + make-mirror-legs-on-different-tag-pvs.patch + +------------------------------------------------------------------- +Fri Jul 8 13:43:41 UTC 2016 - tchvatal@suse.com + +- Update to 2.02.160 release, read WHATS_NEW for detailed log. + * Most notable is lvconvert refactor/enhancements + * Refresh patch: + + cluster_support_mirrord_log.diff + +------------------------------------------------------------------- +Tue Jun 7 12:08:24 UTC 2016 - tchvatal@suse.com + +- Add thin-provisioning-tools to deps to fix configure warnings + +------------------------------------------------------------------- +Tue Jun 7 11:45:56 UTC 2016 - tchvatal@suse.com + +- Do not run initrd regenerating twice in post + +------------------------------------------------------------------- +Tue Jun 7 11:40:41 UTC 2016 - tchvatal@suse.com + +- Update to 2.02.155 release, read WHATS_NEW for detailed log. + * Mostly few bugfixes around caching +- Refresh patch pvmove_support_clustered_vg.diff + +------------------------------------------------------------------- +Thu May 19 12:07:09 UTC 2016 - tchvatal@suse.com + +- Add compat symlinks for binaries to /sbin/ to avoid errors on + hardcoded systems, obsolete them with leap 43 + +------------------------------------------------------------------- +Thu May 12 08:12:54 UTC 2016 - tchvatal@suse.com + +- Add conflicts on unsplit packages to allow smooth upgrade path + Also do the conflict properly in baselibs.conf + +------------------------------------------------------------------- +Wed May 11 07:54:19 UTC 2016 - tchvatal@suse.com + +- Add dependencies to the devel pacakge in baselibs.conf + +------------------------------------------------------------------- +Wed May 4 10:36:40 UTC 2016 - tchvatal@suse.com + +- Update patch use-mirrortype-asdefault-whenclvmdrunning.patch + to match up the patches/pvmove_support_clustered_vg.diff and not + use the define declared only when building clvm codebase; + it is still broken if someone changes the PID location, but at least + it now does not depend on clvm code +- Regenerate_initrd in post of the lvm2 main pkg +- Update baselibs to point to split-out devicemapper libraries + +------------------------------------------------------------------- +Wed May 4 09:27:30 UTC 2016 - tchvatal@suse.com + +- Keep in sync the common configuration options that are shared among + all the variants dm/lvm2/clvm + +------------------------------------------------------------------- +Tue May 3 14:03:30 UTC 2016 - tchvatal@suse.com + +- Provide symlinks to 1.02 versions of dm and dm-event libs + * this should sort out binary packages without the need of double + rebuilding + +------------------------------------------------------------------- +Tue May 3 13:23:52 UTC 2016 - tchvatal@suse.com + +- Update to 2.02.152 release, read WHATS_NEW for detailed log. +- Refresh patches: + * 10-dm.rules-Reset-state-variable-for-spurious-events.patch + * device-mapper-gcc-warnings.patch + * device-mapper-link.patch + * udev-Check-for-DM_NR_VALID_PATHS.patch +- Slightly tweak btrfs patch as the code changed for the detection: + * fsadm-add-support-for-btrfs.patch + +------------------------------------------------------------------- +Tue May 3 12:55:34 UTC 2016 - tchvatal@suse.com + +- Build and install properly cluster files +- Remove csm-converter.tar.gz as the evms was last present on sle10 + and thus migration is bit out of scope today + +------------------------------------------------------------------- +Tue May 3 09:23:48 UTC 2016 - tchvatal@suse.com + +- Add pre_checkin.sh to allow syncing of patches between packages: + workflow = add everything to lvm2.spec and run pre_checkin.sh + +------------------------------------------------------------------- +Mon May 2 17:41:55 UTC 2016 - tchvatal@suse.com + +- Refresh patch use-mirrortype-asdefault-whenclvmdrunning.patch to + work without clvm code enabled + +------------------------------------------------------------------- +Mon May 2 17:29:09 UTC 2016 - tchvatal@suse.com + +- Regenerate lvm2 tmpfiles after install so they won't populate just + after the reboot +- Split out lvm2 libraries to separate subpkgs per standards +- Rename versioning of plugins patch: + * version-plugins-in-libdir -> version-plugins-in-libdir.patch + +------------------------------------------------------------------- +Mon May 2 16:51:09 UTC 2016 - tchvatal@suse.com + +- Remove evms provides/obsoletes, last seen on sle10 +- Mark configs as such +- Ghost the during-run created dirs +- Install rcbla compat service symlinks + +------------------------------------------------------------------- +Mon May 2 15:13:35 UTC 2016 - tchvatal@suse.com + +- Sync with device-mapper.spec, build only lvm and wipe devicemapper + binaries +- Install in /usr there is no technical reason to keep this out + of /usr + +------------------------------------------------------------------- +Mon May 2 13:23:49 UTC 2016 - tchvatal@suse.com + +- Split out device-mapper and clvm to separate spec files + * No factual changes just deletion in the spec to keep it out + of interacting with those parts + +------------------------------------------------------------------- +Fri Apr 29 11:05:04 UTC 2016 - tchvatal@suse.com + +- Do not explicitely require expat it is only used by thin_provisioning + +------------------------------------------------------------------- +Thu Apr 28 20:40:17 UTC 2016 - tchvatal@suse.com + +- There is no factual reason to keep the device mapper out of /usr + so just match everything else + +------------------------------------------------------------------- +Thu Apr 28 20:12:48 UTC 2016 - tchvatal@suse.com + +- Remove device-mapper-static.patch as there should be no need to + have static library here and it can be reenabled with some explanation + if needed + +------------------------------------------------------------------- +Thu Apr 28 19:57:54 UTC 2016 - tchvatal@suse.com + +- Rename device-mapper-link to device-mapper-link.patch + +------------------------------------------------------------------- +Mon Mar 7 01:53:34 UTC 2016 - lwang@suse.com + +- not output error message inside retry loops to avoid noisy error + message being output inside retry loops in case of remove failure + because device busy. (bsc#940298 boo#957059) + add: libdm-iface-not-output-error-message-inside-retry-loop.patch + +------------------------------------------------------------------- +Thu Jan 28 03:47:31 UTC 2016 - lwang@suse.com + +- Add 'Also=lvm2-lvmetad.socket' in '[Install]' section of lvm2-lvmetad. + service to remove lvm2-lvmetad.socket when disable lvm2-lvmetad.service. + (bsc#960044) + add: lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch + +------------------------------------------------------------------- +Wed Jan 27 05:38:07 UTC 2016 - lwang@suse.com + +- Split thin-provisioning-tools from lvm2 package for easier maintenance. +- Update to lvm2-2.02.141 (device-mapper-1.02.115) + - Remove patches: + lvm2-do-not-strip-pdata_tools.patch: thin-provisioning-tools patch + lvmetad.c-ignore-lvmetad-global-handle-on-disconnect.patch: + already in upstream + no_buildroot_shared.diff: LVM_SHARED_PATH dropped by upstream + +------------------------------------------------------------------- +Mon Dec 14 14:52:00 CET 2015 - tiwai@suse.de + +- Fix missing dependency on coreutils for initrd macros (boo#958562) +- Call missing initrd macro at postun (boo#958562) + +------------------------------------------------------------------- +Fri Dec 11 16:03:58 UTC 2015 - dimstar@opensuse.org + +- Re-add lvm2-do-not-strip-pdata_tools.patch: this is still needed. + +------------------------------------------------------------------- +Tue Aug 25 02:27:10 UTC 2015 - lwang@suse.com + +- Fix boot failed due to segfault at libc (bnc#942755) + add: lvmetad.c-ignore-lvmetad-global-handle-on-disconnect.patch + +------------------------------------------------------------------- +Thu Aug 6 06:13:20 UTC 2015 - lwang@suse.com + +- fix spec to change /sbin/thin-check to %{_sbindir}/thin-check. + (bnc#940754) + +------------------------------------------------------------------- +Mon Jul 27 19:35:15 UTC 2015 - mpluskal@suse.com + +- Update thin-provisioning tools to 0.5.3 + * Fix bug where the tools would crash if given a very large + metadata device to restore to. + * - thin_delta, thin_trim + * --clear-needs-check flag for cache_check + * space map checking for thin check +- Drop unnecessary lvm2-do-not-strip-pdata_tools.patch + +------------------------------------------------------------------- +Fri Jul 24 13:16:09 UTC 2015 - dvaleev@suse.com + +- Allow building without clvm (boo#923127) + Keep clvm2 building by default + +------------------------------------------------------------------- +Tue Jul 14 09:05:13 UTC 2015 - lwang@suse.com + +- dmeventd: fix dso_name compare error. dso_name is thought as not + empty and doesn't create monitor thread. (bnc#935623) + add: dmeventd-fix-dso-name-wrong-compare.patch + +------------------------------------------------------------------- +Tue Jul 14 05:41:55 UTC 2015 - lzhong@suse.com + +- 13-dm-disk.rules: Import ID_FS_XXX variables from udev + database(bnc#909358) + If the disk is unavailable we need to import the existing ID_FS_XXX + variables from the database, otherwise the filesystem UUID won't + be set and the by-uuid symlink will disappear, leading to + intermittent boot failures + + Import-ID_FS_XXX-variables-bnc909358.patch + +- 10-dm.rules: Reset state variables for spurious events (bsc#932300) + + 10-dm.rules-Reset-state-variable-for-spurious-events.patch + +------------------------------------------------------------------- +Tue May 19 16:30:47 UTC 2015 - jeffm@suse.com + +- Update to 2.02.120 + - Fixed numerous bugs(see WHATS_NEW for full details) + - Deleted dab3ebce-devices-Do-not-support-unpartitioned-DASD.patch (upstream) + +------------------------------------------------------------------- +Fri Apr 3 02:45:02 UTC 2015 - lzhong@suse.com + +- fsadm: add support for btrfs(fate#318413) + fsadm-add-support-for-btrfs.patch + +------------------------------------------------------------------- +Mon Mar 23 07:50:05 UTC 2015 - lwang@suse.com + +- Moved BuildRequires: libcorosync-devel and libdlm-devel from lvm package + to clmv package to avoid dracut build needing cluster stack to be built. + (bsc#923127) + +------------------------------------------------------------------- +Sat Feb 14 14:06:36 UTC 2015 - i@marguerite.su + +- provides libdevmapper.so.1.02 libdevmapper-event.so.1.02 + for VirtualBox. + +------------------------------------------------------------------- +Thu Feb 5 03:13:52 UTC 2015 - lwang@suse.com + +- LVM2 does not support unpartitioned DASD device which has special + format in the first 2 tracks and will siliently discards LVM2 lable + information written to it when pvcreate. (bsc#894202) + Add: dab3ebce-devices-Do-not-support-unpartitioned-DASD.patch +- Delete lvm2-lvmetad.socket from %service_del_preun/postun to avoid + lvmetad.service being started by 'systemctl retry-start' when updating + package. (bsc#914415) + +------------------------------------------------------------------- +Thu Jan 22 09:45:12 UTC 2015 - mpluskal@suse.com + +- Don't replace lvm.conf + +------------------------------------------------------------------- +Mon Jan 12 08:33:14 UTC 2015 - mpluskal@suse.com + +- Re-add lvm2-lvmetad.service to %service_add_pre/post +- Add service registrations for cmirrord and clvm +- Correct category for device-mapper-devel + +------------------------------------------------------------------- +Thu Jan 8 15:21:17 UTC 2015 - dimstar@opensuse.org + +- Add lvm2-do-not-strip-pdata_tools.patch: Change build system to + not strip pdata_tools during installation. We need the file in + tact in order to be able to produce valid debuginfo packages + (boo#910327). + +------------------------------------------------------------------- +Mon Dec 22 07:10:10 UTC 2014 - lwang@suse.com + +- delete lvm2-lvmetad.service from %service_add_pre/post and + %service_del_preun/postun to avoid lvm2-lvmetad.service running + when use_lvmetad=0. (bnc#901859) +- locking_type is set to 3(clustered lock) by default will output + warning message if cmirrord is not running. Set to 1 to be same + with upstream. (bnc#906710) +- Set silent default to 0 to avoid some commands have no output + and to be same with upstream. (bnc#888798) + +------------------------------------------------------------------- +Mon Dec 8 21:19:13 UTC 2014 - jengelh@inai.de + +- spec: replace some shell variables and paths by rpm macros +- shorten filelists by using wildcards + +------------------------------------------------------------------- +Wed Dec 3 03:23:47 UTC 2014 - jeffm@suse.com + +- Update to 2.02.114 + - Removed cmirrord-fix-s390-endian-issue.patch + - Renumbered patches to allow for upstream patches to be applied + before local ones. + +------------------------------------------------------------------- +Wed Nov 19 22:40:13 UTC 2014 - dimstar@opensuse.org + +- Drop libudev-devel BuildRequires: we already buildrequire + pkgconfig(libudev), which is the better choice, as it allows us + to get libudev-mini-devel. + +------------------------------------------------------------------- +Mon Nov 10 09:01:35 UTC 2014 - dimstar@opensuse.org + +- Require device-mapper by device-mapper-devel: otherwise, the .so + symlinks might happen to point to no target. + +------------------------------------------------------------------- +Tue Oct 28 07:18:36 UTC 2014 - lwang@suse.com + +- Delete BuildRequire for device-mapper-devel for all symbols needed + is created in ./include/.symlinks file. +- Add link /usr/sbin/lvm file to avoid others using /usr/sbin/lvm + +------------------------------------------------------------------- +Fri Sep 26 07:09:27 UTC 2014 - lwang@suse.com + +- recover no_buildroot_shared.diff, this may cause gcc error + +------------------------------------------------------------------- +Wed Sep 24 08:24:13 UTC 2014 - lwang@suse.com + +- All patches eliminated since update to 2.02.111 + - Eliminated 25 patches in lvm2 package: + no_buildroot_shared.diff: don't know why necessary change this + pipe_buff-definition.diff: don't know why necessary + handle_extended_devt.diff: not need(bnc#525060 not reproduce even without this patch) + support-drbd-filter.diff: source to patch not found + lvm-path.patch: not needed, upstream fixed hardcode + suppress_locking_failer_message.patch: no doc as to why suppress warning + add_scm_support.patch: definition device_info_t _device_info is no longer exist + upstream patches(18): + man_page_sectors.diff + make_raid1_default.diff + remove-fedora-systemd.patch + 0001-lvmetad-Init-lazily-to-avoid-socket-access-on-config.patch + do_not_read_from_mirrors_have_failed_devices.diff + avoid_reading_failed_dev_in_mirrored_log.diff + mirrored_log_fixed_when_double_fault_occurs.diff + device_is_usable_mem_leak.diff + clmvd-fix-decriptor-leak-on-restart.patch + clvmd-Fix-node-up-down-handing-in-corosync-module.patch + clvmd-Avoid-a-3-way-deadlock-in-dead-client-cleanup.patch + 0001-clvmd-avoid-logging-in-signal-handler.patch + 0001-RAID-Make-RAID-4-5-6-display-sync-status-under-headi.patch + clvmd-fix-debugging-level-set-in-clvmd_set_debug-function.patch + 0001-toolcontext-Only-reopen-stdin-if-readable.patch + systemd-lvm2-activation-generator-report-only-error.patch + systemd-use-umask-022-for-generated-systemd-units-by.patch + remove-quote-in-lvm2-monitor.patch + + - Eliminated 6 patches in device-mapper package: + bug-479104_device-mapper-dmsetup-deps-export.patch:merged with device-mapper-dmsetup-export.patch + udev_sync-cookie_set-1-on-each-dm_task_set_cookie-ca.patch: already included in upstream + increase-minor-version.diff: not needed + segault_for_truncated_string_token.patch: upstream + s390-sectorsize4096.patch: upstream + add_integrate_flush_flag.patch: included in cmirrord_improvment_performance.patch + + - Moved device-mapper patches to lvm2: + device-mapper-dmsetup-export.patch(bnc#707253) + device-mapper-gcc-warnings.patch + device-mapper-static.patch + device-mapper-link + udev_rules-update.diff(bnc#78902,bnc#789019,bnc#789020) + +------------------------------------------------------------------- +Wed Sep 24 02:34:46 UTC 2014 - lwang@suse.com + +- cmirrord has endian issue which cause cmirrord start fail on s390 + patch: cmirrord-fix-s390-endian-issue.patch(bnc#890452,bnc#893684) + +------------------------------------------------------------------- +Thu Sep 11 15:55:50 UTC 2014 - jeffm@suse.com + +- Integrated device-mapper and thin-provisioning packages into + lvm2 package. device-mapper and lvm2 have been included in + the same source repository for some time. + +------------------------------------------------------------------- +Thu Sep 11 05:17:27 UTC 2014 - jeffm@suse.com + +- Update to 2.02.111 + - Eliminated 21 patches. + +------------------------------------------------------------------- +Wed Sep 3 01:48:48 CEST 2014 - ro@suse.de + +- sanitize release line in specfile + +------------------------------------------------------------------- +Fri Jul 4 09:14:10 UTC 2014 - dmzhang@suse.com + +- bnc#885632, set multipath_componnet_detection = 1 per default + +------------------------------------------------------------------- +Fri Jun 13 10:31:48 CEST 2014 - hare@suse.de + +- Generate all symlinks even for multipath events (bnc#875233) + patch: udev-Check-for-DM_NR_VALID_PATHS.patch + +------------------------------------------------------------------- + +Tue May 30 09:01:08 UTC 2014 - lmb@suse.com + +- Versioning for the lvm2-cmirrord dependencies + +------------------------------------------------------------------- +Thu May 29 10:01:35 UTC 2014 - dmzhang@suse.com + +- bnc#878930, systemd is putting out an erroneous message about lvm2-monitor.service + patch: remove-quote-in-lvm2-monitor.patch + +------------------------------------------------------------------- +Wed May 28 16:45:45 UTC 2014 - lwang@suse.com + +- fix lvm2-activation{,-early}.service is marked world-inaccessible (bnc#878481) + add systemd-use-umask-022-for-generated-systemd-units-by.patch +- add comment to lvm.conf to inform user to start lvm2-lvmetad.socket + if it is not started in case of use_lvmetad = 1 (bnc#878473) +- disable lvmetad in lvm.conf to fix it (bnc#862076) + +------------------------------------------------------------------- +Wed May 28 15:46:58 UTC 2014 - lwang@suse.com + +- bnc#878121, modify clvmd.ocf start debug level -d2 to d0 + +------------------------------------------------------------------- +Wed May 28 14:57:23 UTC 2014 - lwang@suse.com + +- bnc#870598, change lockdir to /run/lvm/lock + modify lvm.conf + bnc#854092, backport patches to fix 'nohup lvm' crash + patch:0001-toolcontext-Only-reopen-stdin-if-readable.patch + bnc#870824, defaut the mirrortype to mirror when clvmd is running + patch:use-mirrortype-asdefault-whenclvmdrunning.patch + bnc#859824, get rid of the annoying message 'LVM activation generator successfully completed' + patch:systemd-lvm2-activation-generator-report-only-error.patch + bnc#837538, fix closedown of clvmd + patch:fix-closedown-before-thread-finish.patch + +------------------------------------------------------------------- +Wed May 28 14:50:13 UTC 2014 - lwang@suse.com + +- Added: clvmd-fix-debugging-level-set-in-clvmd_set_debug-function.patch + This patch is missed in sle12, added from sle11sp3 + Fix debugging level set in clvmd_set_debug by using the correct + variable (bnc#785467),change default -d0 to -d2 + +------------------------------------------------------------------- +Wed May 28 14:34:04 UTC 2014 - meissner@suse.com + +- add missing %pre section, specify all sockets and services in + all 4 calls. + +------------------------------------------------------------------- +Mon May 12 08:11:08 UTC 2014 - lwang@suse.com + +-bnc#871176, 0001-RAID-Make-RAID-4-5-6-display-sync-status-under-headi.patch + +------------------------------------------------------------------- +Wed Apr 16 09:11:32 UTC 2014 - trenn@suse.de + +- Switch from mkinitrd to dracut + - Dracut already has a lvm module and takes care that the right stuff is + include into initrd, therefore remove: + - mkinitrd-lvm2-boot.sh + - mkinitrd-lvm2-setup.sh + mkinitrd scripts from sources + - Add dracut macros in %post and %posttrans to ensure initrd recreation +- Remove unneeded comments in .spec file +- Do not compile in DATE and TIME to avoid build unneeded retriggering in obs + Add: cmirrord_remove_date_time_from_compilation.patch + +------------------------------------------------------------------- +Tue Apr 8 08:47:51 UTC 2014 - lwang@suse.com + +- bnc#862403, modify lvm.conf to add filter to exclude floppy and cdrom + +------------------------------------------------------------------- +Tue Mar 25 09:08:16 UTC 2014 - dmzhang@suse.com + +- backport more patches from slesp3(bnc#831518) + scm support: + add_scm_support.patch + mirrored log fix: + do_not_read_from_mirrors_have_failed_devices.diff + avoid_reading_failed_dev_in_mirrored_log.diff + mirrored_log_fixed_when_double_fault_occurs.diff + device_is_usable_mem_leak.diff + clvmd: + clmvd-fix-decriptor-leak-on-restart.patch + clvmd-Avoid-a-3-way-deadlock-in-dead-client-cleanup.patch + clvmd-Fix-node-up-down-handing-in-corosync-module.patch + 0001-clvmd-avoid-logging-in-signal-handler.patch + fate#314367, missing patch + lvconvert-cluster-mirrored-disk-failed.patch + other fix: + pvmove_support_clustered_vg.diff + suppress_format1_size_warning.diff + display-dm-name-for-lv-name.diff + no longer needed patches: + autoactivate-lvmetad-with-generator.patch + +------------------------------------------------------------------- +Thu Feb 20 16:23:21 UTC 2014 - arvidjaar@gmail.com + +- add 0001-lvmetad-Init-lazily-to-avoid-socket-access-on-config.patch + avoid connect to lvmetad.socket too early to prevent deadlock during + "systemctl daemon-reload" (bnc#862076) + +------------------------------------------------------------------- +Thu Feb 13 06:39:47 UTC 2014 - dmzhang@suse.com + +- fate#315092, improve performance of cluster mirror + add cmirrord_improvment_performance.patch + +------------------------------------------------------------------- +Wed Feb 12 15:17:05 UTC 2014 - arvidjaar@gmail.com + +- add autoactivate-lvmetad-with-generator.patch - if use_lvmetad=1, + automatically activate lvm2-lvmetad.socket to ensure lvmetad is + started when required (bnc#862076) + +------------------------------------------------------------------- +Wed Jan 22 14:34:41 UTC 2014 - henrik.kuhn@origenis.de + +- added a lvm2-devel package definition + +------------------------------------------------------------------- +Mon Jan 6 07:43:59 UTC 2014 - dmzhang@suse.com + +- add csm_convert to lvm2-clvm package(bnc#854076) +- system fails to boot due to missing /usr/sbin/lvm(bnc#837954) +- lvm2 systemd incorrectly uses dependencies on Fedora services(bnc#851741) +- set use_lvmetad = 1 as default of lvm.conf(bnc#854413) +- drop patch dont_ignore_tmp_device_file.diff +- backport patches from sle11sp3 + fate#314367,cluster_support_mirrord_log.diff + fate#312248,make-mirror-legs-on-different-tag-pvs.patch + improve-mirror-legs-on-different-tag-pvs.patch +- set default mirror to md_raid1 insdead of dm_mirror for better performance +- enable lvm2-lvmetad.socket by default + +------------------------------------------------------------------- +Sun Oct 27 21:44:41 CET 2013 - ohering@suse.de + +- Remove /etc/sysconfig/lvm to avoid errors during mkinitrd run + LVM_VGS_ACTIVATED_ON_BOOT is not handled anymore with systemd +- Remove fillup and insserv from PreReq + +------------------------------------------------------------------- +Mon Oct 21 08:09:41 UTC 2013 - dmzhang@suse.com + +- bnc#779965, use export before %configure in spec + +------------------------------------------------------------------- +Wed Sep 11 10:18:47 CEST 2013 - fcrozat@suse.com + +- Add lvm-path.patch: fix lvm binary path in systemd generator. +- Use %_tmpfilesdir macro for tmpfiles directory. + +------------------------------------------------------------------- +Sun Sep 8 22:20:46 UTC 2013 - crrodriguez@opensuse.org + +- Set all "run" directories relative to /run not just the "lock" + location +- Install /usr/lib/tmpfiles.d/lvm2.conf as required to ensure + such runtime directories are _always_ there. + +------------------------------------------------------------------- +Wed Aug 28 11:15:54 UTC 2013 - meissner@suse.com + +- replace BuildRequires: systemd by pkgconfig(udev) again + to avoid cycles. + +------------------------------------------------------------------- +Tue Aug 20 07:59:06 UTC 2013 - dmzhang@suse.com + +- add systemd support to lvm2 package + split device-mapper to another package. + +------------------------------------------------------------------- +Tue Jul 16 14:55:10 CEST 2013 - ohering@suse.de + +- Remove usage of absolute paths in mkinitrd scripts + +------------------------------------------------------------------- +Tue Jul 16 14:39:31 CEST 2013 - ohering@suse.de + +- Fix parsing lvdisplay -c output with more than 10 volumes in + mkinitrd-lvm2-setup.sh (bnc#826727) + +------------------------------------------------------------------- +Mon Apr 22 14:01:29 UTC 2013 - cfarrell@suse.com + +- license update: GPL-2.0 and LGPL-2.1 + Presence of multiple files (both GPL and LGPL) with "only" licenses + +------------------------------------------------------------------- +Tue Apr 16 11:57:28 UTC 2013 - mmeister@suse.com + +- Added url as source. + Please see http://en.opensuse.org/SourceUrls + +------------------------------------------------------------------- +Fri Feb 15 11:44:36 UTC 2013 - rmilasan@suse.com + +- Move all udev releated files in the appropriate udev directory. + +------------------------------------------------------------------- +Wed Nov 28 09:37:23 UTC 2012 - rmilasan@suse.com + +- udev_sync-cookie_set-1-on-each-dm_task_set_cookie-ca.patch: + cookie_set=1 on each dm_task_set_cookie call (bnc#788882) + +------------------------------------------------------------------- +Mon Nov 12 10:41:45 UTC 2012 - seife+obs@b1-systems.com + +- fix 10-dm.rules (bnc#789021) +- port dmsetup export patch to new LVM code (bnc#789019,bnc#789020) + +------------------------------------------------------------------- +Mon Nov 5 21:10:28 UTC 2012 - hrvoje.senjan@gmail.com + +- Now also fix devmapper-setup + +------------------------------------------------------------------- +Mon Nov 5 12:08:26 UTC 2012 - hrvoje.senjan@gmail.com + +- Adapt mkinitrd scripts to new udev locataion + +------------------------------------------------------------------- +Sun Nov 4 02:31:00 UTC 2012 - crrodriguez@opensuse.org + +- Fix booting ... place udev rules in the proper location.. + +------------------------------------------------------------------- +Thu Oct 18 12:35:30 UTC 2012 - hrvoje.senjan@gmail.com + +- Change the default locking dir to reflect the change in filesystem package + +------------------------------------------------------------------- +Wed Oct 17 23:01:54 UTC 2012 - nfbrown@suse.com + +- lvm2.spec: merge rules for device-mapper and + lvm2-clvm packages, so there is only one + spec file and all packages are built consistently. + +------------------------------------------------------------------- +Tue Oct 16 09:34:40 UTC 2012 - coolo@suse.com + +- build against the minimal udev to avoid cycles +- the sysvinit requires are no longer necessary + +------------------------------------------------------------------- +Tue Oct 16 04:19:59 UTC 2012 - nfbrown@suse.com + +- Upgrade to LVM2-2-02-98. Improvements include + improved interaction with udev and systemd, + improved dmraid support, and new command + "blkdeactivate". + +------------------------------------------------------------------- +Thu Sep 27 01:11:17 UTC 2012 - nfbrown@suse.com + +- lvm2.spec: make sure MODPROBE_CMD is set properly + when configure is run. Without it, modules are + not auto-loaded. (bnc#779965) + +------------------------------------------------------------------- +Fri Apr 20 07:52:09 UTC 2012 - rmilasan@suse.com + +- Run update of initrd at %post and %postun. + We need this to make sure initrd reflects the updates. + +------------------------------------------------------------------- +Sun Sep 18 17:17:12 UTC 2011 - jengelh@medozas.de + +- Remove redundant tags/sections from specfile + (cf. packaging guidelines) +- Use %_smp_mflags for parallel build + +------------------------------------------------------------------- +Fri May 27 09:09:35 UTC 2011 - lnussel@suse.de + +- don't unconditionally enable boot.lvm by default. yast takes care + of enabling the script when creating lvm volumes. +- don't hard require boot.device-mapper in boot.dmraid. dm-mod is + autoloaded when accessing /dev/mapper/control anyways. + +------------------------------------------------------------------- +Thu Mar 10 11:07:22 UTC 2011 - coolo@novell.com + +- prereq sysvinit(boot.device-mapper) to fix build + +------------------------------------------------------------------- +Tue Feb 15 08:48:48 UTC 2011 - xwhu@novell.com + +- Update to LVM 2.02.84 + - Fix handling of simultaneous mirror image and mirrored log + image failure. + - Fix vgremove to allow removal of VG with missing PVs + - Remove log directly if all mirror images of a mirrored log fail + - Fix potential for corruption during cluster mirror device + failure + - Allow internal suspend and resume of origin without its + snapshots + - Allow exclusive activation of snapshots in a cluster + +------------------------------------------------------------------- +Thu Nov 11 12:24:04 UTC 2010 - coolo@novell.com + +- own parent directories for device-mapper files + +------------------------------------------------------------------- +Sun Oct 31 12:37:02 UTC 2010 - jengelh@medozas.de + +- Use %_smp_mflags + +------------------------------------------------------------------- +Fri Jul 16 10:11:59 UTC 2010 - xwhu@novell.com + +- bnc#556177, undefined symbol error while loading dmevent so. + +------------------------------------------------------------------- +Wed Jun 23 05:50:12 UTC 2010 - xwhu@novell.com + +- Update to LVM.2.02.67 + - Require partial option in lvchange --refresh for partial LVs + - Add replicators' LVs to dtree for activation + - Add lvm2app interfaces to lookup a vgname from a pvid and pvname + - Fix memory leak for invalid regex pattern input + - Disallow the direct removal of a merging snapshot + - Fix lvconvert error message when existing mirrored LV is not found + - Add LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES environment variable + - Improve snapshot merge metadata import validation + +------------------------------------------------------------------- +Tue Jun 1 14:06:38 UTC 2010 - xwhu@novell.com + +- Specify udev_sync and udev_rules in /etc/lvm/lvm.conf + +------------------------------------------------------------------- +Fri May 21 03:41:47 UTC 2010 - xwhu@novell.com + +- Fix mkinitrd-lvm2 to use udev rules for lvm2 + +------------------------------------------------------------------- +Mon Apr 26 16:51:10 CEST 2010 - ro@suse.de + +- fix lvm2-clvm specfile so that patches apply + +------------------------------------------------------------------- +Sat Apr 3 03:17:12 UTC 2010 - xwhu@novell.com + +- Upgrade to LVM2 2.02.58 + - Rename liblvm.so to liblvm2app.so + - Introduce lvconvert --use_policies + - Add readonly locking type to replace implementation of + --ignorelockingfailure + - Add liblvm APIs to implement creation and deletion of VGs + - Add activation/udev_sync to lvm.conf + - Enable dmeventd monitoring section of config file by default + - Add --pvmetadatacopies for pvcreate, vgcreate, vgextend, + vgconvert. + +------------------------------------------------------------------- +Sun Nov 29 06:58:45 UTC 2009 - xwhu@novell.com + +- Link liblvm2cmd.so to libdevmapper-event.so (bnc#556177) + +------------------------------------------------------------------- +Sun Nov 15 10:40:19 CET 2009 - meissner@suse.de + +- quilt refreshed all patches. + +------------------------------------------------------------------- +Mon Oct 12 13:31:12 UTC 2009 - xwhu@novell.com + +- make $tmp_mnt/etc/sysconfig before copying file into (bnc#525237) + +------------------------------------------------------------------- +Wed Sep 23 06:38:47 UTC 2009 - xwhu@novell.com + +- Add -lvm2- infix to mkinitrd scripts +- collect_lvm reads /etc/sysconfig/lvm (bnc#523944) + +------------------------------------------------------------------- +Fri Aug 28 07:37:13 UTC 2009 - xwhu@novell.com + +- Support extended dev with major 259 + +------------------------------------------------------------------- +Fri Jun 26 11:08:39 CST 2009 - xwhu@suse.de + +- bnc#510058, typo in dont_ignore_tmp_device_file.diff, which hangs + mkinitrd + +Mon May 25 16:47:18 CST 2009 - xwhu@suse.de +------------------------------------------------------------------- + +- Cleanup scripts for mkinitrd, so that udev can activate root LV. + +Mon Apr 27 18:37:32 CST 2009 - xwhu@suse.de +------------------------------------------------------------------- + +- Upgrade to LVM2 2.02.45 + Avoid scanning empty metadata areas for VG names + Pass --test from lvresize to fsadm as --dry-run. + Remove duplicate cpg_initialize from clvmd startup. + Add option to /etc/sysconfig/cluster to select cluster type for clvmd. + Remove external dependency on the 'cut' command from fsadm. + Fix pvs segfault when pv mda attributes requested for not available PV. + Fix lvresize size conversion for fsadm when block size is not 1K. + Add pv_mda_size to pvs and vg_mda_size to vgs. + Add "--refresh" functionality to vgchange and vgmknodes. + Fix vgrename using UUID if there are VGs with identical names. + Fix segfault when invalid field given in reporting commands. + Merge device-mapper into the lvm2 tree. + Exit with non-zero status from vgdisplay if couldn't show any requested VG. + Fix snapshot monitoring library to not cancel monitoring invalid snapshot. + Fix conversion of md chunk size into sectors. + Fix misleading error message when there are no allocatable extents in VG. + Fix handling of PVs which reappeared with old metadata version. + Fix mirror DSO to call vgreduce with proper parameters. + Fix validation of --minor and --major in lvcreate to require -My always. + Fix release: clvmd build, vgreduce consolidate & tests, /dev/ioerror warning. + +------------------------------------------------------------------- +Tue Mar 31 11:59:03 CST 2009 - xwhu@suse.de + +- Handle the case that drbd virtual device has the same PV uuid + with the underlining physical device. + +------------------------------------------------------------------- +Wed Mar 25 23:14:29 CST 2009 - xwhu@suse.de + +- Do not filter out tmp device file(bnc#485572) +- Do not try to activate VG when all paths are down already(bnc#479104) + +------------------------------------------------------------------- +Wed Mar 25 22:50:50 CST 2009 - xwhu@suse.de + +- Split CLVMD as a independent package + +------------------------------------------------------------------- +Tue Mar 24 00:23:13 CST 2009 - xwhu@suse.de + +- Fix for bnc#486952 + use "killproc -INT" instead of "killproc" + handle signal in the main loop thread only + +------------------------------------------------------------------- +Thu Feb 26 14:08:22 CST 2009 - xwhu@suse.de + +- add daemon_options parameter to clvmd.ocf +- check EUNLOCK for dlm_ls_unlock_wait + +------------------------------------------------------------------- +Wed Feb 25 18:39:26 CST 2009 - xwhu@suse.de + +- bnc#479422, check both lksb.sb_status and status. + +------------------------------------------------------------------- +Fri Feb 20 10:24:00 CET 2009 - xwhu@suse.de + +- simplify patch of dlm lock to clvmd + +------------------------------------------------------------------- +Fri Feb 20 08:06:37 CET 2009 - xwhu@suse.de + +- bnc#476861, clvmd.ocf doesn't report the correct status when + kill -9 doesn't terminate the process + +------------------------------------------------------------------- +Thu Jan 22 13:00:26 CST 2009 - xwhu@suse.de + +- bnc#464851, use dlm instead of openais lck + +------------------------------------------------------------------- +Wed Jan 21 15:23:31 CET 2009 - ro@suse.de + +- do not require a specific package release from subpackage + (bnc#467704) + +------------------------------------------------------------------- +Wed Dec 3 18:51:27 CST 2008 - xwhu@suse.de + +- Add OCF script for clvmd + +------------------------------------------------------------------- +Wed Nov 12 02:22:56 CST 2008 - xwhu@suse.de + +- bnc#443677. dmeventd DSOs are linked against liblvm2cmd + +------------------------------------------------------------------- +Thu Oct 9 11:54:47 CEST 2008 - xwhu@suse.de + +- bnc#432782. Remove vol_id in 64-lvm2.rules. + +------------------------------------------------------------------- +Mon Sep 29 14:09:33 CEST 2008 - ro@suse.de + +- buildreq: replace openais-devel by libopenais-devel + +------------------------------------------------------------------- +Wed Sep 24 18:25:40 CEST 2008 - ro@suse.de + +- change "udevsettle" to "udevadm settle" + +------------------------------------------------------------------- +Sat Sep 13 11:59:34 CEST 2008 - xwhu@novell.com + +- added missing directories to filelist + +------------------------------------------------------------------- +Wed Sep 10 13:43:17 CEST 2008 - xwhu@novell.com + +- Upgrade to 2.0.39 + Fix up cache for PVs without mdas after consistent VG metadata is processed. + Update validation of safe mirror log type conversions in lvconvert. + Fix lvconvert to disallow snapshot and mirror combinations. + Fix reporting of LV fields alongside unallocated PV segments. + Add --unquoted and --rows to reporting tools. + Avoid undefined return value after _memlock manipulation in lvm2_run. + Avoid link failure if configured without --enable-cmdlib or --enable-readline. + Make clvmd return at once if other nodes down in a gulm or openais cluster. + Fix and improve readahead 'auto' calculation for stripe_size. + Fix lvchange output for -r auto setting if auto is already set. + Fix ambiguous use of identifier error_message_produced. + Fix add_mirror_images not to dereference uninitialized log_lv upon failure. + Don't call openlog for every debug line output by clvmd. + Add --force to lvextend and lvresize. + Fix vgchange to not activate mirror leg and log volumes directly. + Fix test directory clean up in make distclean. +- pvcreate/pvremove/pvchange will create symlinks in /dev/disk/by-id/ + to the device file +------------------------------------------------------------------- +Wed Sep 3 11:09:34 CEST 2008 - hare@suse.de + +- Call mkinitrd_setup during %post and %postun (bnc#413709) + +------------------------------------------------------------------- +Tue Sep 2 16:59:00 CEST 2008 - hare@suse.de + +- Fix initrd scripts if no 'root=' parameter is given + (bnc#421546) + +------------------------------------------------------------------- +Mon Aug 25 12:49:58 CEST 2008 - aj@suse.de + +- Provide and obsolete evms. + +------------------------------------------------------------------- +Mon Aug 25 12:04:29 CEST 2008 - prusnak@suse.cz + +- enabled SELinux support [Fate#303662] + +------------------------------------------------------------------- +Fri Aug 22 12:58:08 CEST 2008 - xwhu@suse.de + +- Remove the -p option for fillup_and_insserv + +------------------------------------------------------------------- +Wed Aug 13 06:18:44 CEST 2008 - xwhu@suse.de + +- Add Should-Stop to boot.lvm + +------------------------------------------------------------------- +Thu Jul 31 16:13:59 CST 2008 - xwhu@suse.de + +- repack LVM2.2.02.38.tar.bz2 into bz2 format + +------------------------------------------------------------------- +Wed Jul 23 15:38:13 CEST 2008 - hare@suse.de + +- Include mkinitrd scriptlets. + +------------------------------------------------------------------- +Fri Jun 27 07:51:31 CEST 2008 - xwhu@suse.de + +- update to 2.02.38 + Fix tracking of validity of PVs with no mdas in lvmcache. + Fix return values for reporting commands when run with no PVs, LVs, or VGs. + Fix free_count when reading pool metadata. + Fix segfault when using pvcreate on a device containing pool metadata. + Fix segfault after _free_vginfo by remembering to remove vginfo from list. + Fix setpriority error message to signed int. + Fix uninitialised mutex in clvmd if all daemons are not running at startup. + Fix fsadm.sh to work with older blockdev, blkid & readlink binaries. + Fix lvresize to pass new size to fsadm when extending device. + Fix nodes list in clvmd-openais, and allow for broadcast messages. + Fix vgsplit internal counting of snapshot LVs. + Fix vgmerge snapshot_count when source VG contains snapshots. + Fix internal LV counter when a snapshot is removed. + Fix metadata corruption writing lvm1-formatted metadata with snapshots. + Fix lvconvert -m0 allocatable space check. + Fix vgdisplay 'Cur LV' field to match lvdisplay output. + Fix lv_count report field to exclude hidden LVs. + Fix vgsplit to only move hidden 'snapshotN' LVs when necessary. + Fix vgreduce to use vg_split_mdas to check sufficient mdas remain. + Fix orphan VG name used for format_pool. + Fix output if overriding command_names on cmdline. + Fix vgsplit locking of new VG (2.02.30). + Fix redundant lvresize message if vg doesn't exist. + Fix another allocation bug with clvmd and large node IDs. + Fix uninitialised variable in clvmd that could cause odd hangs. + +------------------------------------------------------------------- +Mon May 5 11:19:29 CEST 2008 - aj@suse.de + +- Fix requires of clvm. + +------------------------------------------------------------------- +Wed Apr 30 12:17:29 CEST 2008 - hare@suse.de + +- Fixup build errors + +------------------------------------------------------------------- +Wed Apr 30 09:22:55 CEST 2008 - xwhu@suse.de + +- Cleanup clvmd code on openais stack to make it work +- Split clvmd into a separate package (bnc#384708) + +------------------------------------------------------------------- +Wed Apr 23 12:16:22 CEST 2008 - xwhu@suse.de + +- Change async lock primitives to sync + +------------------------------------------------------------------- +Wed Apr 23 07:29:12 CEST 2008 - xwhu@suse.de + +- Fix build aginst beta + definition of PIPE_BUF is missing + +------------------------------------------------------------------- +Tue Apr 22 10:47:17 CEST 2008 - xwhu@suse.de + +- Enable CLVM support in LVM2 + +------------------------------------------------------------------- +Wed Feb 20 11:47:30 CET 2008 - fehr@suse.de + +- allow large minor number on command line with option --minor + (bnc#362960) + +------------------------------------------------------------------- +Wed Feb 13 14:11:32 CET 2008 - fehr@suse.de + +- update to new version 2.02.33 + Fix mirror log name construction during lvconvert. (2.02.30) + Make monitor_dev_for_events recurse through the stack of LVs. + Clean up some more compiler warnings. + +------------------------------------------------------------------- +Thu Feb 7 08:59:16 CET 2008 - hare@suse.de + +- Enable dmeventd (FATE#303381) + +------------------------------------------------------------------- +Thu Jan 31 12:01:35 CET 2008 - fehr@suse.de + +- update to new version 2.02.32 + Fix two check_lv_segments error messages to show whole segment + Refactor mirror log attachment code + Fix pvs, vgs, lvs error exit status on some error paths + Avoid readahead error message with default setting of lvcreate -M1 + Set default readahead to twice maximium stripe size + Reinstate VG extent size and stripe size defaults (halved) + Change vgsplit -l (for unimplemented --list) into --maxlogicalvolumes + Fix process_all_pvs to detect non-orphans with no MDAs correctly + Don't use block_on_error with mirror targets version 1.12 and above + Update vgsplit to accept vgcreate options when new VG is destination + Update vgsplit to accept existing VG as destination + lvconvert waits for completion of initial sync by default + Refactor vgcreate for parameter validation and add tests + Add new convert_lv field to lvs output + Print warning when lvm tools are running as non-root + Prevent pvcreate from overwriting MDA-less PVs belonging to active VGs + Fix a segfault if using pvs with --all argument + Update --uuid argument description in man pages + Fix vgreduce PV list processing not to process every PV in the VG + Extend lvconvert to use polldaemon + Add support for stacked mirrors + Major restructuring of pvmove and lvconvert layer manipulation code + +------------------------------------------------------------------- +Mon Dec 10 12:29:12 CET 2007 - fehr@suse.de + +- update to new version 2.02.29 + Accept sizes with --readahead argument. + Store size arguments as sectors internally. + Attempt to remove incomplete LVs with lvcreate zeroing/activation problems. + Add read_ahead activation code. + Extend readahead arg to accept "auto" and "none". + Prevent lvconvert -s from using same LV as origin and snapshot. + Fix human-readable output of odd numbers of sectors. + Show 'not usable' space when PV is too large for device in pvdisplay. + Ignore and fix up any excessive device size found in metadata. + Detect md superblocks version 1.0, 1.1 and 1.2. + Handle new sysfs subsystem/block/devices directory structure. + Add %PVS extents option to lvresize, lvextend, and lvcreate. + Modify lvremove to prompt for removal if LV active on other cluster nodes. + Add '-f' to vgremove to force removal of VG even if LVs exist. + +------------------------------------------------------------------- +Thu Nov 22 14:49:39 CET 2007 - fehr@suse.de + +- adapt man page for pvdisplay to program (#342862) +- fix spec file to detect path to modprobe binary (#331968) + +------------------------------------------------------------------- +Thu Nov 22 12:44:16 CET 2007 - fehr@suse.de + +- update to new version 2.02.28 + Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. + Add support for renaming mirrored LVs. + Add --mirrorlog argument to specify log type for mirrors. + Fix lvdisplay man page to say LV size is reported in sectors, not KB. + Fix snapshot cow area deactivation if origin is not active. + Add vg_mda_count and pv_mda_count columns to reports. + Handle vgsplit of an entire VG as a vgrename. + Print warnings to stderr instead of stdout. + Update vgcfgrestore man page. + Allow keyboard interrupt during user prompts when appropriate. + Add -f to vgcfgrestore to list metadata backup files. + Add pvdisplay --maps implementation. + Remove unsupported LVM1 options from vgcfgrestore man page. + Update vgcfgrestore man page to show mandatory VG name. + Update vgrename man page to include UUID and be consistent with lvrename. + +------------------------------------------------------------------- +Mon May 7 14:02:16 CEST 2007 - fehr@suse.de + +- update to new version 2.02.25 + Add devices/preferred_names config regex list for displayed device names + Update pvck to include text metadata area and record detection + Fix creation and conversion of mirrors with tags + Fix vgsplit for lvm1 format (set and validate VG name in PVs metadata) + Split metadata areas in vgsplit properly + Fix vgremove to require at least one vg argument + Fix reading of striped LVs in LVM1 format + Fix vgsplit to handle mirrors + Fix md signature check to handle both endiannesses + Add devices/ignore_suspended_devices to ignore suspended dm devices + +------------------------------------------------------------------- +Tue Feb 20 16:57:34 CET 2007 - fehr@suse.de + +- add boot.dmraid to Should-Start in boot.lvm2 + +------------------------------------------------------------------- +Sun Feb 11 18:49:50 CET 2007 - ro@suse.de + +- fix build as non-root and use DESTDIR + +------------------------------------------------------------------- +Mon Jan 8 16:15:23 CET 2007 - fehr@suse.de + +- fix buggy pointer arithmetic (#232117) + +------------------------------------------------------------------- +Mon Dec 18 10:39:49 CET 2006 - fehr@suse.de + +- update to new version 2.02.17 + Add missing pvremove error message when device doesn't exist. + When lvconvert allocates a mirror log, respect parallel area constraints. + Use loop to iterate through the now-ordered policy list in _allocate(). + Check for failure to allocate just the mirror log. + Introduce calc_area_multiple(). + Support mirror log allocation when there is only one PV: area_count now 0. + Fix detection of smallest area in _alloc_parallel_area() for cling policy. + Add manpage entry for clvmd -T + Fix gulm operation of clvmd, including a hang when doing lvchange -aey + Fix hang in clvmd if a pre-command failed. + +------------------------------------------------------------------- +Wed Dec 6 10:07:57 CET 2006 - fehr@suse.de + +- update to new version 2.02.16 + Fix VG clustered read locks to use PR not CR. + Adjust some alignments for ia64/sparc. + Fix mirror segment removal to use temporary error segment. + Add -T (startup timeout) switch to clvmd. + Install lvmdump by default. + Fix check for snapshot module when activating snapshot. + Fix pvremove error path for case when PV is in use. + Warn if certain duplicate config file entries are seen. + Fix --autobackup argument which could never disable backups. + Fix a label_verify error path. + Fix adjusted_mirror_region_size() to handle 64-bit size. + Add some missing bounds checks on 32-bit extent counters. + Add Petabyte and Exabyte support. + Fix lvcreate error message when 0 extents requested. + lvremove man page: volumes must be cluster inactive before being removed. + Protect .cache manipulations with fcntl locking. + Change .cache timestamp comparisons to use ctime. + Fix mirror log LV writing to set all bits in whole LV. + Fix high-level free space check for partial allocations. + +------------------------------------------------------------------- +Mon Oct 30 12:19:07 CET 2006 - fehr@suse.de + +- update to new version 2.02.13 to finally fix bug #178321 + Add couple of missing files to tools/Makefile CLEAN_TARGETS. + When adding snapshot leave cow LV mapped device active after zeroing. + Fix a clvmd debug message. + Add dev_flush() to set_lv(). + Add lvchange --resync. + Perform high-level free space check before each allocation attempt. + Don't allow a node to remove an LV that's exclusively active on anther node. + Cope if same PV is included more than once in cmdline PE range list. + Set PV size to current device size if it is found to be zero. + Add segment parameter to target_present functions. + +------------------------------------------------------------------- +Tue Oct 17 10:55:33 CEST 2006 - fehr@suse.de + +- update to new version 2.02.12 + Fix pvdisplay to use vg_read() for non-orphans. + Fall back to internal locking if external locking lib is missing or fails. + Retain activation state after changing LV minor number with --force. + Propagate clustered flag in vgsplit and require resizeable flag. + Add clvmd function to return the cluster name. not used by LVM yet. + Add cling allocation policy. + Change _check_contiguous() to use _for_each_pv(). + Extend _for_each_pv() to allow termination without error. + Abstract _is_contiguous(). + Remove duplicated pv arg from _check_contiguous(). + Accept regionsize with lvconvert. + Add report columns with underscore before field names ending 'size'. + Correct regionsize default on lvcreate man page (MB). + Fix clvmd bug that could cause it to die when a node with a long name crashed + Add device size to text metadata. + Fix format_text mda_setup pv->size and pv_setup pe_count calculations. + Fix _for_each_pv() for mirror with core log. + Add lvm_dump.sh script to create a tarball of debugging info from a system. + Capture error messages in clvmd and pass them back to the user. + Remove unused #defines from filter-md.c. + Make clvmd restart init script wait until clvmd has died before starting it. + Add -R to clvmd which tells running clvmds to reload their device cache. + Add LV column to reports listing kernel modules needed for activation. + Show available fields if report given invalid field. (e.g. lvs -o list) + Add timestamp functions with --disable-realtime configure option. + Add %VG, %LV and %FREE suffices to lvcreate/lvresize --extents arg. + Fix two potential NULL pointer derefs in error cases in vg_read(). + Separate --enable-cluster from locking lib options in lvmconf.sh. + Add a missing comma in lvcreate man page. + +------------------------------------------------------------------- +Wed Sep 20 13:26:58 CEST 2006 - fehr@suse.de + +- update to new version 2.02.10 + Fix lvconvert mirror change case detection logic. + Fix mirror log detachment so it correctly becomes a standalone LV. + Extend _check_contiguous() to detect single-area LVs. + Include mirror log (untested) in _for_each_pv() processing. + Use MIRROR_LOG_SIZE constant. + Remove struct seg_pvs from _for_each_pv() to generalise. + Avoid adding duplicates to list of parallel PVs to avoid. + Fix several incorrect comparisons in parallel area avoidance code. + Fix segment lengths when flattening existing parallel areas. + Log existing parallel areas prior to allocation. + Fix mirror log creation when activation disabled. + Don't attempt automatic recovery without proper locking. + When using local file locking, skip clustered VGs. + Add fallback_to_clustered_locking and fallback_to_local_locking parameters. + lvm.static uses built-in cluster locking instead of external locking. + Don't attempt to load shared libraries if built statically. + Change default locking_lib to liblvm2clusterlock.so. + Add skip_dev_dir() to process command line VGs. + Stop clvmd complaining about nodes that have left the cluster. + Move lvm_snprintf(), split_words() and split_dm_name() into libdevmapper. + Add lvconvert man page. + Add mirror options to man pages. + Prevent mirror renames. + Move CMDLIB code into separate file and record whether static build. + +------------------------------------------------------------------- +Wed Sep 13 13:00:55 CEST 2006 - fehr@suse.de + +- change BuildRequires to device-mapper-devel + +------------------------------------------------------------------- +Mon Aug 21 12:26:17 CEST 2006 - fehr@suse.de + +- update to new version 2.02.09 + Fix PE_ALIGN for pagesize over 32KB. + Separate out LVM1_PE_ALIGN and pe_align(). + Add lvm_getpagesize wrapper. + Add --maxphysicalvolumes to vgchange. + +------------------------------------------------------------------- +Wed Aug 16 11:16:13 CEST 2006 - fehr@suse.de + +- update to new version 2.02.08 + Add checks for duplicate LV name, lvid and PV id before writing metadata. + Report all sanity check failures, not just the first. + Fix missing lockfs on first snapshot creation. (#197850) + Add unreliable --trustcache option to reporting commands. + Fix locking for mimage removal. + Fix clvmd_init_rhel4 'status' exit code. + +------------------------------------------------------------------- +Fri Jul 28 13:05:38 CEST 2006 - olh@suse.de + +- remove dropped boot.ibmsis from boot.lvm +- boot.rootfsck should start before boot.lvm (#181972) + +------------------------------------------------------------------- +Wed Jul 26 16:34:45 CEST 2006 - fehr@suse.de + +- update to new version 2.02.06 + Fix activation logic in lvchange --persistent. + Don't ignore persistent minor numbers when activating. + Fix vgreduce --removemissing to return success if VG is already consistent. + Fix return code if VG specified on command line is not found. + Fix PV tools to include orphaned PVs in default output again. + Prevent snapshots of mirrors. + Fix lvcreate corelog validation. + Add --config for overriding most config file settings from cmdline. + Quote arguments when printing command line. + Remove linefeed from 'initialising logging' message. + Add 'Completed' debug message. + Don't attempt library exit after reloading config files. + Always compile with libdevmapper, even if device-mapper is disabled. + +------------------------------------------------------------------- +Mon May 22 17:13:21 CEST 2006 - fehr@suse.de + +- update to new version 2.02.06 + Propagate --monitor around cluster. + Add --monitor to vgcreate and lvcreate to control dmeventd registration. + Filter LCK_NONBLOCK in clvmd lock_vg. + Add --nosync to lvcreate with LV flag NOTSYNCED. + Use mirror's uuid for a core log. + Add mirror log fault-handling policy. + Improve mirror warning messages and tidy dmeventd syslog output. + Propagate nosync flag around cluster. + Allow vgreduce to handle mirror log failures. + Add --corelog to lvcreate and lvconvert. + Create a log header for replacement in-sync mirror log. + Use set_lv() and dev_set() to wipe sections of devices. + Add mirror_library description to example.conf. + Fix uuid_from_num() buffer overrun. + Increase maximum stripe size limit to physical extent size for lvm2 metadata. + Fix activation code to check for pre-existing mirror logs. + Ignore empty strings in config files. + Require non-zero regionsize and document parameter on lvcreate man page. + Invalidate cache if composition of VG changed externally. + +------------------------------------------------------------------- +Wed Apr 26 10:01:52 CEST 2006 - hare@suse.de + +- add LVM_DEVICE_TIMEOUT sysconfig variable to make sure + udev has finished processing (#149979) +- Fix init script dependencies + +------------------------------------------------------------------- +Mon Apr 24 18:32:56 CEST 2006 - fehr@suse.de + +- update to new version 2.02.05 + Fix vgid string termination in recent cache code + +------------------------------------------------------------------- +Thu Apr 20 17:11:07 CEST 2006 - fehr@suse.de + +- update to new version 2.02.04 + Check for libsepol. + Add some cflow & scope support. + Separate out DEFS from CFLAGS. + Remove inlines and use unique function names. + +------------------------------------------------------------------- +Wed Apr 19 09:48:51 CEST 2006 - fehr@suse.de + +- update to new version 2.02.03 + vgrename accepts vgid and exported VG. + Add --partial to pvs. + When choosing between identically-named VGs, also consider creation_host. + Provide total log suppression with 2. + Fix vgexport/vgimport to set/reset PV exported flag so pv_attr is correct. + Add vgid to struct physical_volume and pass with vg_name to some functions. + If two or more VGs are found with the same name, use one that is not exported. + Whenever vgname is captured, also capture vgid and whether exported. + Remove an incorrect unlock_vg() from process_each_lv(). + Update extent size information in vgchange and vgcreate man pages. + Introduce origin_from_cow() and lv_is_visible(). + pvremove without -f now fails if there's no PV label. + Support lvconvert -s. + Suppress locking library load failure message if --ignorelockingfailure. + Propagate partial mode around cluster. + Fix archive file expiration. + Fix dmeventd build. + clvmd now uses libcman rather than cman ioctls. + clvmd will allow new cman to shutdown on request. + +------------------------------------------------------------------- +Thu Apr 6 15:57:04 CEST 2006 - fehr@suse.de + +- add option --mknodes to vgscan call in /etc/init.d/boot.lvm to + avoid potential inconsistencies in minor number of dm devices after + reboot when root fs is LVM LV (#139740) + +------------------------------------------------------------------- +Tue Mar 14 11:25:42 CET 2006 - fehr@suse.de + +- update to new version 2.02.02 + Add %.so: %.a make template rule. + Switchover library building to use LIB_SUFFIX. + Only do lockfs filesystem sync when suspending snapshots. + Always print warning if activation is disabled. + vgreduce removes mirror images. + Add --mirrorsonly to vgreduce. + vgreduce replaces active LVs with error segment before removing them. + Set block_on_error parameter if available. + Add target_version. + Add details to format1 'Invalid LV in extent map' error message. + Fix lvscan snapshot full display. + Bring lvdisplay man page example into line. + Add mirror dmeventd library. + Add some activation logic to remove_mirror_images(). + lvconvert can remove specified PVs from a mirror. + lvconvert turns an existing LV into a mirror. + Allow signed mirrors arguments. + Move create_mirror_log() into toollib. + Determine parallel PVs to avoid with ALLOC_NORMAL allocation. + Fix lv_empty. + +------------------------------------------------------------------- +Wed Jan 25 21:38:06 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Mon Dec 19 11:19:41 CET 2005 - fehr@suse.de + +- add new binary /sbin/lvconvert to file list + +------------------------------------------------------------------- +Tue Dec 13 13:09:21 CET 2005 - fehr@suse.de + +- add patch lvm-lock.diff to fix bug #138128 + +------------------------------------------------------------------- +Tue Dec 6 16:10:12 CET 2005 - fehr@suse.de + +- update to new version 2.02.01 + +------------------------------------------------------------------- +Tue Nov 8 12:05:32 CET 2005 - fehr@suse.de + +- add fix_striped_old_format.diff to allow striped volumes with + old metadata format (#130433) +- add fix_dm_as_pv.diff to allow usage of dm devices as PVs (#129960) + +------------------------------------------------------------------- +Mon Oct 17 12:38:18 CEST 2005 - fehr@suse.de + +- update to new version 2.01.15 + +------------------------------------------------------------------- +Mon Sep 26 13:39:41 CEST 2005 - fehr@suse.de + +- fix bug in pvscan.c with PVs larger than 2TB in VGs + +------------------------------------------------------------------- +Thu Aug 4 14:49:51 CEST 2005 - fehr@suse.de + +- update to new version 2.01.14 + +------------------------------------------------------------------- +Mon Jul 18 19:05:08 CEST 2005 - fehr@suse.de + +- update to new version 2.01.13 + +------------------------------------------------------------------- +Thu Jun 16 10:21:03 CEST 2005 - fehr@suse.de + +- update to new version 2.01.12 + +------------------------------------------------------------------- +Wed Jun 15 13:36:23 CEST 2005 - meissner@suse.de + +- add libselinux to nfb to enable selinux support. +- use RPM_OPT_FLAGS. + +------------------------------------------------------------------- +Tue Jun 14 10:55:51 CEST 2005 - fehr@suse.de + +- update to new version 2.01.11 + +------------------------------------------------------------------- +Wed May 4 11:01:23 CEST 2005 - fehr@suse.de + +- update to new version 2.01.10 + +------------------------------------------------------------------- +Mon Apr 11 12:43:23 CEST 2005 - fehr@suse.de + +- use -y instead of -Y in options for call to fillup_and_insserv + (#76689) +- update to new version 2.01.09 + +------------------------------------------------------------------- +Wed Mar 9 11:12:58 CET 2005 - fehr@suse.de + +- update to new version 2.01.07 + +------------------------------------------------------------------- +Mon Mar 7 12:03:14 CET 2005 - fehr@suse.de + +- update to new version 2.01.06 + +------------------------------------------------------------------- +Thu Feb 10 16:28:53 CET 2005 - fehr@suse.de + +- update to new version 2.01.04 + +------------------------------------------------------------------- +Wed Feb 2 13:01:12 CET 2005 - fehr@suse.de + +- update to new version 2.01.03 + +------------------------------------------------------------------- +Mon Jan 24 12:08:59 CET 2005 - fehr@suse.de + +- update to new version 2.01.02 + +------------------------------------------------------------------- +Thu Jan 20 14:48:58 CET 2005 - fehr@suse.de + +- update to new version 2.01.01 + +------------------------------------------------------------------- +Wed Jan 19 11:13:53 CET 2005 - fehr@suse.de + +- update to new version 2.01.00 + +------------------------------------------------------------------- +Tue Jan 11 17:41:04 CET 2005 - fehr@suse.de + +- update to new version 2.00.33 + +------------------------------------------------------------------- +Wed Jan 05 12:33:00 CET 2005 - arvin@suse.de + +- update to new version 2.00.32 + +------------------------------------------------------------------- +Fri Dec 17 10:12:03 CET 2004 - arvin@suse.de + +- fixed -s option of vgdisplay (bug #49177) + +------------------------------------------------------------------- +Mon Nov 29 13:01:31 CET 2004 - fehr@suse.de + +- update to new version 2.00.29 + +------------------------------------------------------------------- +Thu Nov 25 11:39:49 CET 2004 - fehr@suse.de + +- update to new version 2.00.27 + +------------------------------------------------------------------- +Wed Nov 24 12:40:10 CET 2004 - fehr@suse.de + +- update to new version 2.00.26 + +------------------------------------------------------------------- +Wed Sep 29 17:24:52 CEST 2004 - fehr@suse.de + +- update to new version 2.00.25 + +------------------------------------------------------------------- +Wed Sep 22 17:40:28 CEST 2004 - fehr@suse.de + +- prevent buggy macro for MAJOR in kdev_t.h creep into code via + include of linux/fs.h + +------------------------------------------------------------------- +Mon Sep 20 11:45:30 CEST 2004 - fehr@suse.de + +- update to new version 2.00.24 + +------------------------------------------------------------------- +Thu Sep 16 15:03:58 CEST 2004 - fehr@suse.de + +- update to new version 2.00.23 + +------------------------------------------------------------------- +Mon Sep 6 12:09:54 CEST 2004 - fehr@suse.de + +- update to new version 2.00.22 + +------------------------------------------------------------------- +Mon Aug 23 12:46:37 CEST 2004 - fehr@suse.de + +- update to new version 2.00.21 +- new version obsoletes lvm2-vgscan.patch + +------------------------------------------------------------------- +Wed Jul 14 15:21:48 CEST 2004 - fehr@suse.de + +- update to new version 2.00.20 + +------------------------------------------------------------------- +Mon Jun 7 11:45:15 CEST 2004 - fehr@suse.de + +- update to new version 2.00.16 +- add forgotten patch no-inc-audit.diff needed for STABLE + +------------------------------------------------------------------- +Mon May 24 14:14:37 CEST 2004 - fehr@suse.de + +- update to new version 2.00.15 to fix bug #41020 + +------------------------------------------------------------------- +Mon May 24 08:31:31 CEST 2004 - hare@suse.de + +- Fixed vgscan on S/390 (readdir returned DT_UNKNOWN) + +------------------------------------------------------------------- +Thu May 13 17:49:47 CEST 2004 - fehr@suse.de + +- ignore udev names in default configuration to prevent yast2 + confusion (#36869) + +------------------------------------------------------------------- +Mon Apr 19 18:09:49 CEST 2004 - fehr@suse.de + +- accept additional devices (IDE->64, iseries/vd->8, #39114) + +------------------------------------------------------------------- +Thu Apr 1 10:28:39 CEST 2004 - fehr@suse.de + +- update to new version 2.00.09 (fixes #34657 and #36877) + +------------------------------------------------------------------- +Tue Mar 2 02:03:07 CET 2004 - ro@suse.de + +- boot.lvm: root-fs is mounted-rw by boot.rootfsck + +------------------------------------------------------------------- +Thu Feb 26 20:14:53 CET 2004 - fehr@suse.de + +- skip cdroms and device with zero size on probing + +------------------------------------------------------------------- +Wed Feb 4 10:58:46 CET 2004 - fehr@suse.de + +- update to new version 2.00.08 +- now lvm2 obsoletes lvm + +------------------------------------------------------------------- +Thu Sep 18 13:05:20 CEST 2003 - fehr@suse.de + +- fix boot.lvm to cope with LABEL= and UUID= in /etc/fstab + also check reiser filesystem (#31060) + +------------------------------------------------------------------- +Wed Sep 17 16:20:18 CEST 2003 - fehr@suse.de + +- update to new version 2.00.07 + +------------------------------------------------------------------- +Thu Aug 21 10:00:04 CEST 2003 - fehr@suse.de + +- update to new version 2.00.06 + +------------------------------------------------------------------- +Mon Aug 18 17:41:31 CEST 2003 - garloff@suse.de + +- (#29083) Add # X-UnitedLinux-Should-Start: boot.scsidev + +------------------------------------------------------------------- +Tue Jul 1 16:13:06 CEST 2003 - fehr@suse.de + +- created initial version of a SuSE package + +------------------------------------------------------------------- diff --git a/lvm2.spec b/lvm2.spec new file mode 100644 index 0000000..b6714ef --- /dev/null +++ b/lvm2.spec @@ -0,0 +1,819 @@ +# +# spec file +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define _unpackaged_files_terminate_build 0 +%define libname libdevmapper1_03 +%define libname_event libdevmapper-event1_03 +%define _udevdir %(pkg-config --variable=udevdir udev) +%define cmdlib liblvm2cmd2_03 +%define lvm2_version 2.03.22 +# For device_mapper_version, it's package version, see bsc#1199074. +# Also note there is another dm version on below "sed -ie ... VERSION_DM". +%define upstream_device_mapper_version 1.02.196 +%define device_mapper_version %{lvm2_version}_1.02.196 +%define thin_provisioning_version 0.7.0 +%define _supportsanlock 1 +%define dlm_version 4.0.9 +# from lvm2 version 2.03, suse obsoleted clvm, cmirrord, liblvm2app & liblvm2cmd. +# so the obseletes version is 2.03 +%define lvm2_clvm_version 2.03 +%define lvm2_cmirrord_version 2.03 +%define liblvm2app2_2_version 2.03 +%define liblvm2cmd2_02_version 2.03 + +%if 0%{_supportsanlock} == 1 + %define sanlock_version 3.3.0 +%endif + +%global flavor @BUILD_FLAVOR@%{nil} +%define psuffix %{nil} + +%if "%{flavor}" == "devicemapper" + %define psuffix -device-mapper + %bcond_without devicemapper +%else + %bcond_with devicemapper +%endif + +%if "%{flavor}" == "lockd" + %define psuffix -lvmlockd + %bcond_without lockd +%else + %bcond_with lockd +%endif + +Name: lvm2%{psuffix} +Version: %{lvm2_version} +Release: 0 +Summary: Logical Volume Manager Tools +License: GPL-2.0-or-later AND LGPL-2.1-or-later +Group: System/Base +URL: https://www.sourceware.org/lvm2/ +Source: ftp://sourceware.org/pub/lvm2/LVM2.%{version}.tgz +Source1: lvm.conf +Source2: lvm2-rpmlintrc +Source42: ftp://sourceware.org/pub/lvm2/LVM2.%{version}.tgz.asc +Source99: baselibs.conf + +# Upstream patches +Patch0001: 0001-lvconvert-swapmetadata-fix-lvmlockd-locking.patch +Patch0002: 0002-lvconvert-fix-ret-values-fro-integrity-remove.patch +Patch0003: 0003-lvconvert-fix-regresion-from-integrity-check.patch +Patch0004: 0004-gcc-cleanup-warnings.patch +Patch0005: 0005-lvmlockd-fix-thick-to-thin-lv-conversion.patch +Patch0006: 0006-lvmlockd-let-lockd_init_lv_args-set-lock_args.patch +Patch0007: 0007-lvmlockd-fix-lvconvert-to-thin-pool.patch +Patch0008: 0008-lvconvert-run-error-path-code-only-for-shared-VG.patch +Patch0009: 0009-vgchange-acquire-an-exclusive-VG-lock-for-refresh.patch +Patch0010: 0010-lvmlockd-client-mutex-ordering.patch +Patch0011: 0011-filesystem-move-stat-after-open-check.patch +Patch0012: 0012-tests-check-for-writecache.patch +Patch0013: 0013-lvresize-fix-32-bit-overflow-in-size-calculation.patch +Patch0014: 0014-gcc-fix-warnings-for-x32-architecture.patch +Patch0015: 0015-gcc-warning-missing-braces-around-initializer.patch +Patch0016: 0016-test-improve-aux-teardown.patch +Patch0017: 0017-tests-aux-try-with-extra-sleep.patch +Patch0018: 0018-tests-aux-using-singl-lvmconf-call.patch +Patch0019: 0019-tests-missing-to-check-for-writecache-support.patch +Patch0020: 0020-tests-pvmove-large-disk-area.patch +Patch0021: 0021-tests-enforce-full-fs-check.patch +Patch0022: 0022-tests-update-for-work-in-fake-dev-environment.patch +Patch0023: 0023-tests-skip-test-when-lvmdbusd-runs-on-the-system.patch +Patch0024: 0024-tests-better-slowdown.patch +# SUSE patches: 1000+ for LVM +# Never upstream +Patch1001: cmirrord_remove_date_time_from_compilation.patch +Patch1002: fate-309425_display-dm-name-for-lv-name.patch +Patch1003: bug-935623_dmeventd-fix-dso-name-wrong-compare.patch +Patch1004: bug-998893_make_pvscan_service_after_multipathd.patch +Patch1005: bug-1184687_Add-nolvm-for-kernel-cmdline.patch +Patch1006: fate-31841-01_fsadm-add-support-to-resize-check-btrfs-filesystem.patch +Patch1007: fate-31841-02_man-add-support-for-btrfs.patch +Patch1008: fate-31841-03_tests-new-test-suite-of-fsadm-for-btrfs.patch +Patch1009: bug-1214071-blkdeactivate_calls_wrong_mountpoint.patch +# SUSE patches 2000+ for device mapper, udev rules +Patch2001: bug-1012973_simplify-special-case-for-md-in-69-dm-lvm-rules.patch +# SUSE patches 3000+ for test code +Patch3001: bug-1184124-link-tests-as-PIE.patch +# SUSE patches 4000+ for lvm2.spec +Patch4001: bug-1037309_Makefile-skip-compliling-daemons-lvmlockd-directory.patch +# To detect modprobe during build +BuildRequires: kmod-compat +BuildRequires: libaio-devel +BuildRequires: pkgconfig +BuildRequires: thin-provisioning-tools >= %{thin_provisioning_version} +BuildRequires: pkgconfig(libsystemd) +BuildRequires: pkgconfig(libudev) +Requires: device-mapper >= %{device_mapper_version} +Requires: modutils +Requires(post): coreutils +Requires(postun):coreutils +Provides: lvm = %{version} +Obsoletes: lvm2-cmirrord <= %{lvm2_cmirrord_version} +%{?systemd_requires} + +%if %{with devicemapper} +BuildRequires: gcc-c++ +BuildRequires: suse-module-tools +BuildRequires: pkgconfig(libselinux) +BuildRequires: pkgconfig(libsepol) +%else +BuildRequires: libcorosync-devel +BuildRequires: pkgconfig(blkid) +%if %{with lockd} +BuildRequires: libdlm-devel >= %{dlm_version} +%if 0%{_supportsanlock} == 1 +BuildRequires: sanlock-devel >= %{sanlock_version} +%endif +%else +BuildRequires: gcc-c++ +BuildRequires: libselinux-devel +BuildRequires: readline-devel +BuildRequires: pkgconfig(udev) +%endif +%endif + +%description +Programs and man pages for configuring and using the LVM2 Logical +Volume Manager. + +%prep +%setup -q -n LVM2.%{version} +%patch0001 -p1 +%patch0002 -p1 +%patch0003 -p1 +%patch0004 -p1 +%patch0005 -p1 +%patch0006 -p1 +%patch0007 -p1 +%patch0008 -p1 +%patch0009 -p1 +%patch0010 -p1 +%patch0011 -p1 +%patch0012 -p1 +%patch0013 -p1 +%patch0014 -p1 +%patch0015 -p1 +%patch0016 -p1 +%patch0017 -p1 +%patch0018 -p1 +%patch0019 -p1 +%patch0020 -p1 +%patch0021 -p1 +%patch0022 -p1 +%patch0023 -p1 +%patch0024 -p1 +%patch1001 -p1 +%patch1002 -p1 +%patch1003 -p1 +%patch1004 -p1 +%patch1005 -p1 +%patch1006 -p1 +%patch1007 -p1 +%patch1008 -p1 +%patch1009 -p1 +%patch2001 -p1 +%patch3001 -p1 + +%if !%{with lockd} +%patch4001 -p1 +%endif + +%build +%if !%{with devicemapper} && !%{with lockd} +extra_opts=" + --enable-blkid_wiping + --with-cache=internal + --with-writecache=internal + --with-integrity=internal + --with-default-locking-dir=/run/lock/lvm + --with-default-pid-dir=/run + --with-default-run-dir=/run/lvm + --enable-fsadm + --enable-write_install + --with-vdo=internal + --with-vdo-format=%{_bindir}/vdoformat +" +%endif + +%if %{with lockd} +extra_opts=" + --enable-blkid_wiping + --with-default-locking-dir=/run/lock/lvm + --with-default-pid-dir=/run + --with-default-run-dir=/run/lvm + --with-cluster=internal + --enable-lvmlockd-dlm + --enable-lvmlockd-dlmcontrol +%if 0%{_supportsanlock} == 1 + --enable-lvmlockd-sanlock +%endif +" +%endif + +### COMMON-CONFIG-BEGIN ### +export PATH=$PATH:/sbin:%{_sbindir} +# Why this messy fix here? someone released a wrong version... +# There will change library version to 1.03.01, see output "dmsetup --version". +sed -ie "s/%{upstream_device_mapper_version}/1.03.01/g" VERSION_DM +%configure \ + --enable-dmeventd \ + --enable-dmfilemapd \ + --enable-lvmpolld \ + --enable-cmdlib \ + --enable-udev_rules \ + --enable-udev_sync \ + --with-udev-prefix="%{_prefix}/" \ + --enable-selinux \ + --enable-pkgconfig \ + --with-usrlibdir=%{_libdir} \ + --with-usrsbindir=%{_sbindir} \ + --with-libexecdir=%{_libexecdir} \ + --with-default-dm-run-dir=/run \ + --with-tmpfilesdir=%{_tmpfilesdir} \ + --with-thin=internal \ + --with-device-gid=6 \ + --with-device-mode=0640 \ + --with-device-uid=0 \ + --with-dmeventd-path=%{_sbindir}/dmeventd \ + --with-thin-check=%{_sbindir}/thin_check \ + --with-thin-dump=%{_sbindir}/thin_dump \ + --with-thin-repair=%{_sbindir}/thin_repair \ + --disable-silent-rules \ + $extra_opts +### COMMON-CONFIG-END ### + +%if %{with devicemapper} + %make_build device-mapper +%else + %make_build +%endif + +%install +%if %{with devicemapper} + make DESTDIR=%{buildroot} \ + install_device-mapper \ + install_systemd_units + + ln -s service %{buildroot}/%{_sbindir}/rcdm-event + + # provide 1.02 compat links for the shared libraries + # this is needed for various binary packages + ln -s libdevmapper.so.1.03 %{buildroot}/%{_libdir}/libdevmapper.so.1.02 + ln -s libdevmapper-event.so.1.03 %{buildroot}/%{_libdir}/libdevmapper-event.so.1.02 + + # remove blkd, will be in lvm2 proper + # without force on purpose to detect changes and fail if it happens + rm %{buildroot}%{_sbindir}/blkdeactivate + rm %{buildroot}%{_unitdir}/blk-availability.service + rm %{buildroot}%{_unitdir}/lvm2-monitor.service + rm %{buildroot}%{_mandir}/man8/blkdeactivate.8 + + # remove files, which will be in lvm2 & lockd packages + rm %{buildroot}%{_unitdir}/lvm2-lvmpolld.service + rm %{buildroot}%{_unitdir}/lvm2-lvmpolld.socket + rm %{buildroot}%{_unitdir}/lvmlockd.service + rm %{buildroot}%{_unitdir}/lvmlocks.service + + # compat symlinks in /sbin remove with Leap 43 + %if 0%{?suse_version} < 1550 + mkdir -p %{buildroot}/sbin + ln -s %{_sbindir}/dmsetup %{buildroot}/sbin/dmsetup + %endif + +%else + + %if %{with lockd} + make DESTDIR=%{buildroot} \ + install_systemd_units install_systemd_generators + make DESTDIR=%{buildroot} install -C daemons/lvmlockd + + # lvmlockd does not have separate target install the mans by hand for now + install -m0644 -D man/lvmlockd.8 %{buildroot}%{_mandir}/man8/lvmlockd.8 + install -m0644 -D man/lvmlockctl.8 %{buildroot}%{_mandir}/man8/lvmlockctl.8 + + # rc services symlinks + ln -s service %{buildroot}%{_sbindir}/rclvm2-lvmlockd + ln -s service %{buildroot}%{_sbindir}/rclvm2-lvmlocking + + # remove files from lvm2 split due to systemd_generators picking them up + rm %{buildroot}%{_unitdir}/blk-availability.service + rm %{buildroot}%{_unitdir}/dm-event.service + rm %{buildroot}%{_unitdir}/dm-event.socket + rm %{buildroot}%{_unitdir}/lvm2-monitor.service + rm %{buildroot}%{_unitdir}/lvm2-lvmpolld.service + rm %{buildroot}%{_unitdir}/lvm2-lvmpolld.socket + %else + %make_install + make install_system_dirs DESTDIR=%{buildroot} + make install_systemd_units DESTDIR=%{buildroot} + make install_systemd_generators DESTDIR=%{buildroot} + make install_tmpfiles_configuration DESTDIR=%{buildroot} + # Install configuration file + install -m 644 %{SOURCE1} "%{buildroot}/%{_sysconfdir}/lvm/" + # Install testsuite + make -C test install DESTDIR=%{buildroot} + + pushd "%{buildroot}/%{_libdir}" + ln -sf liblvm2cmd.so.2.03 liblvm2cmd.so + for i in libdevmapper-event-lvm2{mirror,raid,snapshot,thin}; do + ln -sf "device-mapper/$i.so" "$i.so" + ln -sf "device-mapper/$i.so" "$i.so.2.03" + done + popd + + #rc compat symlinks + ln -s service %{buildroot}%{_sbindir}/rcblk-availability + ln -s service %{buildroot}%{_sbindir}/rclvm2-monitor + ln -s service %{buildroot}%{_sbindir}/rclvm2-lvmpolld + + # Remove devicemapper binaries, plain rm so we fail if something change + rm %{buildroot}%{_sbindir}/dmsetup + rm %{buildroot}%{_sbindir}/dmeventd + rm %{buildroot}%{_sbindir}/dmstats + rm %{buildroot}%{_sbindir}/dmfilemapd + rm %{buildroot}%{_udevrulesdir}/10-dm.rules + rm %{buildroot}%{_udevrulesdir}/13-dm-disk.rules + rm %{buildroot}%{_udevrulesdir}/95-dm-notify.rules + rm %{buildroot}%{_unitdir}/dm-event.socket + rm %{buildroot}%{_unitdir}/dm-event.service + # See bsc#1037309 for more info + rm %{buildroot}%{_unitdir}/lvmlockd.service + rm %{buildroot}%{_unitdir}/lvmlocks.service + rm %{buildroot}%{_includedir}/libdevmapper*.h + rm %{buildroot}%{_libdir}/libdevmapper.so.* + rm %{buildroot}%{_libdir}/libdevmapper-event.so.* + rm %{buildroot}%{_libdir}/libdevmapper.so + rm %{buildroot}%{_libdir}/libdevmapper-event.so + rm %{buildroot}%{_libdir}/pkgconfig/devmapper*.pc + rm %{buildroot}%{_mandir}/man8/lvmlockctl.8 + rm %{buildroot}%{_mandir}/man8/lvmlockd.8 + rm %{buildroot}%{_mandir}/man8/dmstats.8 + rm %{buildroot}%{_mandir}/man8/dmsetup.8 + rm %{buildroot}%{_mandir}/man8/dmeventd.8 + rm %{buildroot}%{_mandir}/man8/dmfilemapd.8 + + %if 0%{?suse_version} < 1550 + # compat symlinks in /sbin remove with Leap 43 + mkdir -p %{buildroot}/sbin + pushd %{buildroot}/%{_sbindir} + for i in {vg,pv,lv}*; do + ln -s %{_sbindir}/$i %{buildroot}/sbin/$i + done + popd + %endif + + %endif +%endif + +%if %{with devicemapper} +%package -n device-mapper +Version: %{device_mapper_version} +Release: 0 +Summary: Device Mapper Tools +Group: System/Base +Requires: thin-provisioning-tools >= %{thin_provisioning_version} +Requires(post): coreutils + +%description -n device-mapper +Programs and man pages for configuring and using the device mapper. + +%pre -n device-mapper +%service_add_pre dm-event.service dm-event.socket + +%post -n device-mapper +%service_add_post dm-event.service dm-event.socket +%{?regenerate_initrd_post} + +%posttrans -n device-mapper +%{?regenerate_initrd_posttrans} + +%preun -n device-mapper +%service_del_preun dm-event.service dm-event.socket + +%postun -n device-mapper +%service_del_postun dm-event.service dm-event.socket +%{?regenerate_initrd_post} + +%files -n device-mapper +%license COPYING COPYING.LIB +%doc README +%doc udev/12-dm-permissions.rules +%if 0%{?suse_version} < 1550 +/sbin/dmsetup +%endif +%{_sbindir}/dmsetup +%{_sbindir}/dmeventd +%{_sbindir}/dmstats +%{_sbindir}/dmfilemapd +%{_mandir}/man8/dmstats.8%{?ext_man} +%{_mandir}/man8/dmsetup.8%{?ext_man} +%{_mandir}/man8/dmeventd.8%{?ext_man} +%{_mandir}/man8/dmfilemapd.8%{?ext_man} +%{_udevrulesdir}/10-dm.rules +%{_udevrulesdir}/13-dm-disk.rules +%{_udevrulesdir}/95-dm-notify.rules +%{_unitdir}/dm-event.socket +%{_sbindir}/rcdm-event +%{_unitdir}/dm-event.service + +%package -n %{libname} +Version: %{device_mapper_version} +Release: 0 +Summary: Library for device-mapper +Group: System/Libraries +Conflicts: %{name} < %{version} + +%description -n %{libname} +Device mapper main shared library + +%files -n %{libname} +%{_libdir}/libdevmapper.so.1.03 +%{_libdir}/libdevmapper.so.1.02 + +%post -n %{libname} +%if 0%{?suse_version} < 1550 +# in usrmerged scenario we better don't remove ourselves :-) +if [ -f /%{_lib}/libdevmapper.so.1.03 ]; then + # Special migration - the library is now in %{_libdir}, but up to the point where + # zypp removes the 'old' device-mapper package, the old library 'wins' the ldloader race + # resulting in binaries asking for the newer version still getting the old one. + # This in turn results in funny bugs like boo#1045396 + # Remove /%{_lib}/libdevmapper.so.1.02 - and the run ldconfig + rm /%{_lib}/libdevmapper.so.1.03 +fi +%endif +/sbin/ldconfig + +%postun -n %{libname} -p /sbin/ldconfig + +%package -n %{libname_event} +Version: %{device_mapper_version} +Release: 0 +Summary: Event library for device-mapper +Group: System/Libraries +Conflicts: %{name} < %{version} + +%description -n %{libname_event} +Device mapper event daemon shared library + +%files -n %{libname_event} +%{_libdir}/libdevmapper-event.so.1.03 +%{_libdir}/libdevmapper-event.so.1.02 + +%post -n %{libname_event} -p /sbin/ldconfig +%postun -n %{libname_event} -p /sbin/ldconfig + +%package -n device-mapper-devel +Version: %{device_mapper_version} +Release: 0 +Summary: Development package for the device mapper +Group: Development/Libraries/C and C++ +Requires: %{libname_event} = %{device_mapper_version} +Requires: %{libname} = %{device_mapper_version} +Requires: device-mapper = %{device_mapper_version} + +%description -n device-mapper-devel +Files needed for software development using the device mapper + +%files -n device-mapper-devel +%{_libdir}/libdevmapper.so +%{_libdir}/libdevmapper-event.so +%{_includedir}/libdevmapper.h +%{_includedir}/libdevmapper-event.h +%{_libdir}/pkgconfig/devmapper.pc +%{_libdir}/pkgconfig/devmapper-event.pc + +%else +%if %{with lockd} +%package -n lvm2-lockd +Summary: LVM locking daemon +Group: System/Base +Requires: corosync +Requires: device-mapper >= %{device_mapper_version} +Requires: libdlm >= %{dlm_version} +Requires: lvm2 = %{version} +Obsoletes: lvm2-clvm <= %{lvm2_clvm_version} +%{?systemd_requires} +%if 0%{_supportsanlock} == 1 +Requires: sanlock >= %{sanlock_version} +%endif + +%description -n lvm2-lockd +LVM commands use lvmlockd to coordinate access to shared storage. + +%pre -n lvm2-lockd +%service_add_pre lvmlockd.service lvmlocks.service + +%post -n lvm2-lockd +%service_add_post lvmlockd.service lvmlocks.service + +%preun -n lvm2-lockd +%service_del_preun lvmlockd.service lvmlocks.service + +%postun -n lvm2-lockd +%service_del_postun lvmlockd.service lvmlocks.service + +%files -n lvm2-lockd +%defattr(-,root,root,) +%{_sbindir}/lvmlockd +%{_sbindir}/lvmlockctl +%{_mandir}/man8/lvmlockd.8%{?ext_man} +%{_mandir}/man8/lvmlockctl.8%{?ext_man} +%{_unitdir}/lvmlockd.service +%{_unitdir}/lvmlocks.service +%{_sbindir}/rclvm2-lvmlockd +%{_sbindir}/rclvm2-lvmlocking + +%else + +%pre +%service_add_pre blk-availability.service lvm2-monitor.service lvm2-lvmpolld.service lvm2-lvmpolld.socket + +%post +/sbin/ldconfig +%{?regenerate_initrd_post} +%service_add_post blk-availability.service lvm2-monitor.service lvm2-lvmpolld.service lvm2-lvmpolld.socket +# Use %%tmpfiles_create when 13.2 is oldest in support scope +%{_bindir}/systemd-tmpfiles --create %{_tmpfilesdir}/lvm2.conf || : + +%posttrans +%{?regenerate_initrd_posttrans} + +%preun +%service_del_preun blk-availability.service lvm2-monitor.service lvm2-lvmpolld.service lvm2-lvmpolld.socket + +%postun +/sbin/ldconfig +%{?regenerate_initrd_post} +%service_del_postun lvm2-lvmpolld.service lvm2-lvmpolld.socket +%service_del_postun_without_restart blk-availability.service lvm2-monitor.service + +%files +%license COPYING COPYING.LIB +%doc README VERSION WHATS_NEW +%doc doc/lvm_fault_handling.txt + +# Main binaries +%{_sbindir}/blkdeactivate +%{_sbindir}/fsadm +%{_libexecdir}/lvresize_fs_helper +%{_sbindir}/lvm +%{_sbindir}/lvmconfig +%{_sbindir}/lvmdevices +%{_sbindir}/lvmdump +%{_sbindir}/lvmpolld +%{_sbindir}/lvm_import_vdo +%{_sbindir}/lvchange +%{_sbindir}/lvconvert +%{_sbindir}/lvcreate +%{_sbindir}/lvdisplay +%{_sbindir}/lvextend +%{_sbindir}/lvmdiskscan +%{_sbindir}/lvmsadc +%{_sbindir}/lvmsar +%{_sbindir}/lvreduce +%{_sbindir}/lvremove +%{_sbindir}/lvrename +%{_sbindir}/lvresize +%{_sbindir}/lvs +%{_sbindir}/lvscan +%{_sbindir}/pvchange +%{_sbindir}/pvck +%{_sbindir}/pvcreate +%{_sbindir}/pvdisplay +%{_sbindir}/pvmove +%{_sbindir}/pvremove +%{_sbindir}/pvresize +%{_sbindir}/pvs +%{_sbindir}/pvscan +%{_sbindir}/vgcfgbackup +%{_sbindir}/vgcfgrestore +%{_sbindir}/vgchange +%{_sbindir}/vgck +%{_sbindir}/vgconvert +%{_sbindir}/vgcreate +%{_sbindir}/vgdisplay +%{_sbindir}/vgexport +%{_sbindir}/vgextend +%{_sbindir}/vgimport +%{_sbindir}/vgimportclone +%{_sbindir}/vgimportdevices +%{_sbindir}/vgmerge +%{_sbindir}/vgmknodes +%{_sbindir}/vgreduce +%{_sbindir}/vgremove +%{_sbindir}/vgrename +%{_sbindir}/vgs +%{_sbindir}/vgscan +%{_sbindir}/vgsplit +%{_sbindir}/rcblk-availability +%{_sbindir}/rclvm2-lvmpolld +%{_sbindir}/rclvm2-monitor +# compat symlinks in /sbin +%if 0%{?suse_version} < 1550 +/sbin/lvm +/sbin/lvmconfig +/sbin/lvmdevices +/sbin/lvmdump +/sbin/lvmpolld +/sbin/lvm_import_vdo +/sbin/lvchange +/sbin/lvconvert +/sbin/lvcreate +/sbin/lvdisplay +/sbin/lvextend +/sbin/lvmdiskscan +/sbin/lvmsadc +/sbin/lvmsar +/sbin/lvreduce +/sbin/lvremove +/sbin/lvrename +/sbin/lvresize +/sbin/lvs +/sbin/lvscan +/sbin/pvchange +/sbin/pvck +/sbin/pvcreate +/sbin/pvdisplay +/sbin/pvmove +/sbin/pvremove +/sbin/pvresize +/sbin/pvs +/sbin/pvscan +/sbin/vgcfgbackup +/sbin/vgcfgrestore +/sbin/vgchange +/sbin/vgck +/sbin/vgconvert +/sbin/vgcreate +/sbin/vgdisplay +/sbin/vgexport +/sbin/vgextend +/sbin/vgimport +/sbin/vgimportclone +/sbin/vgimportdevices +/sbin/vgmerge +/sbin/vgmknodes +/sbin/vgreduce +/sbin/vgremove +/sbin/vgrename +/sbin/vgs +/sbin/vgscan +/sbin/vgsplit +%endif +%{_mandir}/man5/lvm.conf.5%{?ext_man} +%{_mandir}/man7/lvmautoactivation.7%{?ext_man} +%{_mandir}/man7/lvmcache.7%{?ext_man} +%{_mandir}/man7/lvmraid.7%{?ext_man} +%{_mandir}/man7/lvmreport.7%{?ext_man} +%{_mandir}/man7/lvmthin.7%{?ext_man} +%{_mandir}/man7/lvmsystemid.7%{?ext_man} +%{_mandir}/man7/lvmvdo.7%{?ext_man} +%{_mandir}/man8/fsadm.8%{?ext_man} +%{_mandir}/man8/lvchange.8%{?ext_man} +%{_mandir}/man8/lvconvert.8%{?ext_man} +%{_mandir}/man8/lvcreate.8%{?ext_man} +%{_mandir}/man8/lvdisplay.8%{?ext_man} +%{_mandir}/man8/lvextend.8%{?ext_man} +%{_mandir}/man8/lvm.8%{?ext_man} +%{_mandir}/man8/lvm-config.8%{?ext_man} +%{_mandir}/man8/lvmconfig.8%{?ext_man} +%{_mandir}/man8/lvmdevices.8%{?ext_man} +%{_mandir}/man8/lvm-dumpconfig.8%{?ext_man} +%{_mandir}/man8/lvmdiskscan.8%{?ext_man} +%{_mandir}/man8/lvmdump.8%{?ext_man} +%{_mandir}/man8/lvm-fullreport.8%{?ext_man} +%{_mandir}/man8/lvmsadc.8%{?ext_man} +%{_mandir}/man8/lvmsar.8%{?ext_man} +%{_mandir}/man8/lvreduce.8%{?ext_man} +%{_mandir}/man8/lvremove.8%{?ext_man} +%{_mandir}/man8/lvrename.8%{?ext_man} +%{_mandir}/man8/lvresize.8%{?ext_man} +%{_mandir}/man8/lvs.8%{?ext_man} +%{_mandir}/man8/lvscan.8%{?ext_man} +%{_mandir}/man8/pvchange.8%{?ext_man} +%{_mandir}/man8/pvck.8%{?ext_man} +%{_mandir}/man8/pvcreate.8%{?ext_man} +%{_mandir}/man8/pvdisplay.8%{?ext_man} +%{_mandir}/man8/pvmove.8%{?ext_man} +%{_mandir}/man8/pvremove.8%{?ext_man} +%{_mandir}/man8/pvresize.8%{?ext_man} +%{_mandir}/man8/pvs.8%{?ext_man} +%{_mandir}/man8/pvscan.8%{?ext_man} +%{_mandir}/man8/vgcfgbackup.8%{?ext_man} +%{_mandir}/man8/vgcfgrestore.8%{?ext_man} +%{_mandir}/man8/vgchange.8%{?ext_man} +%{_mandir}/man8/vgck.8%{?ext_man} +%{_mandir}/man8/vgconvert.8%{?ext_man} +%{_mandir}/man8/vgcreate.8%{?ext_man} +%{_mandir}/man8/vgdisplay.8%{?ext_man} +%{_mandir}/man8/vgexport.8%{?ext_man} +%{_mandir}/man8/vgextend.8%{?ext_man} +%{_mandir}/man8/vgimport.8%{?ext_man} +%{_mandir}/man8/vgimportclone.8%{?ext_man} +%{_mandir}/man8/vgimportdevices.8%{?ext_man} +%{_mandir}/man8/vgmerge.8%{?ext_man} +%{_mandir}/man8/vgmknodes.8%{?ext_man} +%{_mandir}/man8/vgreduce.8%{?ext_man} +%{_mandir}/man8/vgremove.8%{?ext_man} +%{_mandir}/man8/vgrename.8%{?ext_man} +%{_mandir}/man8/vgs.8%{?ext_man} +%{_mandir}/man8/vgscan.8%{?ext_man} +%{_mandir}/man8/vgsplit.8%{?ext_man} +%{_mandir}/man8/blkdeactivate.8%{?ext_man} +%{_mandir}/man8/lvmpolld.8%{?ext_man} +%{_mandir}/man8/lvm-lvpoll.8%{?ext_man} +%{_mandir}/man8/lvm_import_vdo.8%{?ext_man} +%{_udevdir}/rules.d/11-dm-lvm.rules +%{_udevdir}/rules.d/69-dm-lvm.rules +%dir %{_sysconfdir}/lvm +%config(noreplace) %{_sysconfdir}/lvm/lvm.conf +%config(noreplace) %{_sysconfdir}/lvm/lvmlocal.conf +%dir %{_sysconfdir}/lvm/profile +%{_sysconfdir}/lvm/profile/command_profile_template.profile +%{_sysconfdir}/lvm/profile/metadata_profile_template.profile +%{_sysconfdir}/lvm/profile/thin-generic.profile +%{_sysconfdir}/lvm/profile/thin-performance.profile +%{_sysconfdir}/lvm/profile/cache-mq.profile +%{_sysconfdir}/lvm/profile/cache-smq.profile +%{_sysconfdir}/lvm/profile/lvmdbusd.profile +%{_sysconfdir}/lvm/profile/vdo-small.profile +%dir %{_sysconfdir}/lvm/cache +%ghost %{_sysconfdir}/lvm/cache/.cache +%dir %{_sysconfdir}/lvm/archive +%dir %{_sysconfdir}/lvm/backup +%{_tmpfilesdir}/%{name}.conf +%{_unitdir}/blk-availability.service +%{_unitdir}/lvm2-monitor.service +%{_unitdir}/lvm2-lvmpolld.socket +%{_unitdir}/lvm2-lvmpolld.service +%dir %{_libdir}/device-mapper +%{_libdir}/device-mapper/libdevmapper-event-lvm2*.so +%{_libdir}/libdevmapper-event-lvm2*.so +%{_libdir}/libdevmapper-event-lvm2*.so.2.03 + +%package -n %{cmdlib} +Summary: LVM2 command line library +Group: System/Libraries +Conflicts: %{name} < %{version} +Obsoletes: liblvm2app2_2 <= %{liblvm2app2_2_version} +Obsoletes: liblvm2cmd2_02 <= %{liblvm2cmd2_02_version} + +%description -n %{cmdlib} +The lvm2 command line library allows building programs that manage +lvm devices without invoking a separate program. + +%post -n %{cmdlib} -p /sbin/ldconfig +%postun -n %{cmdlib} -p /sbin/ldconfig + +%files -n %{cmdlib} +%{_libdir}/liblvm2cmd.so.* + +%package devel +Summary: Development files for LVM2 +Group: Development/Libraries/C and C++ +Requires: %{cmdlib} = %{version} +Requires: device-mapper-devel +Requires: lvm2 = %{version} + +%description devel +This package provides development files for the LVM2 Logical Volume Manager. + +%files devel +%{_includedir}/lvm2cmd.h +%{_libdir}/liblvm2cmd.so + +%package testsuite +Summary: LVM2 Testsuite +Group: Development/Libraries/C and C++ +Requires: %{cmdlib} = %{version} +Requires: lvm2 = %{version} + +%description testsuite +An extensive functional testsuite for the LVM2 Logical Volume Manager. + +%files testsuite +%{_datarootdir}/lvm2-testsuite/ +%{_libexecdir}/lvm2-testsuite/ +%{_bindir}/lvm2-testsuite + +%endif +%endif + +%changelog