lvm2/fate-31841-01_fsadm-add-support-to-resize-check-btrfs-filesystem.patch

192 lines
6.0 KiB
Diff
Raw Normal View History

From 29562a0f53dad77d5d62f5d8b3bf29401d619867 Mon Sep 17 00:00:00 2001
From: Heming Zhao <heming.zhao@suse.com>
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
Accepting request 900342 from home:hmzhao:branches:openSUSE:Factory - 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 OBS-URL: https://build.opensuse.org/request/show/900342 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=300
2021-06-16 11:38:53 +02:00
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 <okozina@redhat.com>
https://listman.redhat.com/archives/lvm-devel/2012-November/msg00052.html
- Lidong Zhong <lzhong@suse.com>
https://listman.redhat.com/archives/lvm-devel/2015-March/msg00053.html
Accepting request 900342 from home:hmzhao:branches:openSUSE:Factory - 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 OBS-URL: https://build.opensuse.org/request/show/900342 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=300
2021-06-16 11:38:53 +02:00
Signed-off-by: Heming Zhao <heming.zhao@suse.com>
---
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
Accepting request 900342 from home:hmzhao:branches:openSUSE:Factory - 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 OBS-URL: https://build.opensuse.org/request/show/900342 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=300
2021-06-16 11:38:53 +02:00
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<<EOF
+$($FINDMNT -nuP -o TARGET,UUID 2>$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() {
2016-05-11 05:42:15 +02:00
- 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
2016-05-11 05:42:15 +02:00
+ 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() {
Accepting request 558347 from network:ha-clustering:Unstable - 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. OBS-URL: https://build.opensuse.org/request/show/558347 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=212
2017-12-19 11:40:00 +01:00
dry "$CRYPTSETUP" resize "$1" --size $CRYPT_RESIZE_BLOCKS || error "$CRYPTSETUP failed to resize device $1"
}
+########################
+# Resize btrfs filesystem
+# - mounted for upsize/downsize
2016-05-11 05:42:15 +02:00
+# - 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")
Accepting request 900342 from home:hmzhao:branches:openSUSE:Factory - 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 OBS-URL: https://build.opensuse.org/request/show/900342 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=300
2021-06-16 11:38:53 +02:00
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." ;;
Accepting request 900342 from home:hmzhao:branches:openSUSE:Factory - 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 OBS-URL: https://build.opensuse.org/request/show/900342 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=300
2021-06-16 11:38:53 +02:00
esac
@@ -762,6 +840,12 @@ check() {
Accepting request 900342 from home:hmzhao:branches:openSUSE:Factory - 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 OBS-URL: https://build.opensuse.org/request/show/900342 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=300
2021-06-16 11:38:53 +02:00
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
2016-05-11 05:42:15 +02:00
+ "$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