main - tests: update mirror test
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=92ee16f7c0d5d6983b9...
Commit: 92ee16f7c0d5d6983b90fe97d31e2884a8e5804d
Parent: 53bad89a7b802890067e1c006775345098cfa4dc
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Mar 16 21:18:53 2021 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Mar 17 00:59:50 2021 +0100
tests: update mirror test
Log results of uniq.
Remove few unneeded lvs calls.
---
test/shell/mirror-vgreduce-removemissing.sh | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/test/shell/mirror-vgreduce-removemissing.sh b/test/shell/mirror-vgreduce-removemissing.sh
index f2f7c1973..ff7eea51f 100644
--- a/test/shell/mirror-vgreduce-removemissing.sh
+++ b/test/shell/mirror-vgreduce-removemissing.sh
@@ -44,7 +44,7 @@ mimages_are_on_ ()
local i
echo "Check if mirror images of $lv are on PVs" "${list_pvs[@]}"
- printf "%s\n" "${list_pvs[@]}" | sort | uniq > out1
+ printf "%s\n" "${list_pvs[@]}" | sort | uniq | tee out1
get lv_field_lv_ "$vg" lv_name -a | grep "${lv}_mimage_" | tee lvs_log
test -s lvs_log || return 1
@@ -53,14 +53,9 @@ mimages_are_on_ ()
mimages+=( "$i" )
done < lvs_log
- for i in "${mimages[@]}"; do
- echo "Checking $vg/$i"
- lvs -a -o+devices "$vg/$i"
- done
-
for i in "${mimages[@]}"; do
get lv_devices "$vg/$i"
- done | sort | uniq > out2
+ done | sort | uniq | tee out2
diff --ignore-blank-lines out1 out2
}
@@ -116,7 +111,7 @@ prepare_lvs_()
check_and_cleanup_lvs_()
{
- lvs -a -o+devices $vg
+ lvs -a -o+lv_uuid,devices $vg
prepare_lvs_
}
3 years, 2 months
main - tests: added check for kernel version
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=53bad89a7b802890067...
Commit: 53bad89a7b802890067e1c006775345098cfa4dc
Parent: 8b2cdd8d3a8ad0b3048f38580a0dc20f6e1e492d
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Mar 16 20:54:28 2021 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Mar 17 00:59:50 2021 +0100
tests: added check for kernel version
With older kernels this test can't work reliable,
since 'suspend' used to clean all dirty blocks
(taking even several seconds).
---
test/shell/lvconvert-cache-abort.sh | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/test/shell/lvconvert-cache-abort.sh b/test/shell/lvconvert-cache-abort.sh
index 652c9f421..ecb0ff44d 100644
--- a/test/shell/lvconvert-cache-abort.sh
+++ b/test/shell/lvconvert-cache-abort.sh
@@ -50,14 +50,15 @@ test "$(get lv_field $vg/$lv1 cache_dirty_blocks)" -gt 0 || {
skip "Cannot make a dirty writeback cache LV."
}
-LVM_TEST_TAG="kill_me_$PREFIX" lvconvert -v --splitcache $vg/$lv1 >logconvert 2>&1 &
+LVM_TEST_TAG="kill_me_$PREFIX" lvconvert -vvvv --splitcache $vg/$lv1 >logconvert 2>&1 &
PID_CONVERT=$!
for i in {1..50}; do
- dmsetup table "$vg-$lv1" | grep cleaner && break
- test "$i" -ge 100 && die "Waited for cleaner policy on $vg/$lv1 too long!"
- echo "Waiting for cleaner policy on $vg/$lv1"
+ dmsetup table "$vg-$lv1" |& tee out
+ grep cleaner out && break
+ echo "$i: Waiting for cleaner policy on $vg/$lv1"
sleep .05
done
+test "$i" -ge 49 && die "Waited for cleaner policy on $vg/$lv1 too long!"
# While lvconvert updated table to 'cleaner' policy now it
# should be running in 'Flushing' loop and just 1 KILL should
@@ -68,9 +69,16 @@ wait
#cat logconvert || true
+# Problem of this test is, in older kernels, even the initial change to cleaner
+# policy table line causes long suspend which in practice is cleaning all the
+# dirty blocks - so the test can't really break the cache clearing.
+#
+# So the failure of test is reported only for recent kernels > 5.6
+# ans skipped otherwise - as those can't be fixed anyway
grep -E "Flushing.*aborted" logconvert || {
cat logconvert || true
vgremove -f $vg
+ aux kernel_at_least 5 6 || skip "Cache missed to abort flushing with older kernel"
die "Flushing of $vg/$lv1 not aborted ?"
}
3 years, 2 months
main - debug: start with upper case
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=8b2cdd8d3a8ad0b3048...
Commit: 8b2cdd8d3a8ad0b3048f38580a0dc20f6e1e492d
Parent: 94701b700b83971a49c242e070070526d4eb42dd
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Mar 16 14:16:36 2021 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Mar 17 00:50:40 2021 +0100
debug: start with upper case
Use upper case letter to start sentence.
Also drop unneded check for vg as it's already non-null.
---
lib/metadata/metadata.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index 47d3d8b3e..4471f7c86 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -4557,7 +4557,7 @@ static bool _scan_text_mismatch(struct cmd_context *cmd, const char *vgname, con
continue;
if (!(dev = mda_get_device(mda))) {
- log_debug("rescan for text mismatch - no mda dev");
+ log_debug("Rescan for text mismatch - no mda dev.");
goto out;
}
@@ -4570,24 +4570,24 @@ static bool _scan_text_mismatch(struct cmd_context *cmd, const char *vgname, con
* Invalidate mda_header in bcache so it will be reread from disk.
*/
if (!dev_invalidate_bytes(dev, 4096, 512)) {
- log_debug("rescan for text mismatch - cannot invalidate");
+ log_debug("Rescan for text mismatch - cannot invalidate.");
goto out;
}
if (!(mdah = raw_read_mda_header(cmd->fmt, area, 1, 0, &bad_fields))) {
- log_debug("rescan for text mismatch - no mda header");
+ log_debug("Rescan for text mismatch - no mda header.");
goto out;
}
rlocn = mdah->raw_locns;
if (bad_fields) {
- log_debug("rescan for text mismatch - bad_fields");
+ log_debug("Rescan for text mismatch - bad_fields.");
} else if (rlocn->checksum != mda->scan_text_checksum) {
- log_debug("rescan for text checksum mismatch - now %x prev %x",
+ log_debug("Rescan for text checksum mismatch - now %x prev %x.",
rlocn->checksum, mda->scan_text_checksum);
} else if (rlocn->offset != mda->scan_text_offset) {
- log_debug("rescan for text offset mismatch - now %llu prev %llu",
+ log_debug("Rescan for text offset mismatch - now %llu prev %llu.",
(unsigned long long)rlocn->offset,
(unsigned long long)mda->scan_text_offset);
} else {
@@ -4608,12 +4608,12 @@ static bool _scan_text_mismatch(struct cmd_context *cmd, const char *vgname, con
if (ret) {
/* shouldn't happen */
- log_debug("rescan for text mismatch - no mdas");
+ log_debug("Rescan for text mismatch - no mdas.");
goto out;
}
out:
if (!ret)
- log_debug("rescan skipped - unchanged offset %llu checksum %x",
+ log_debug("Rescan skipped - unchanged offset %llu checksum %x.",
(unsigned long long)mda->scan_text_offset,
mda->scan_text_checksum);
@@ -4809,7 +4809,7 @@ static struct volume_group *_vg_read(struct cmd_context *cmd,
if (!vg)
continue;
- if (vg && !vg_ret) {
+ if (!vg_ret) {
vg_ret = vg;
dev_ret = mda_dev;
continue;
3 years, 2 months
main - cleanup: use dm_strncpy
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=94701b700b83971a49c...
Commit: 94701b700b83971a49c242e070070526d4eb42dd
Parent: 4d75c4f597b28e4ea014ef61082074187dc6245a
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Mar 16 14:06:24 2021 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Mar 17 00:50:22 2021 +0100
cleanup: use dm_strncpy
Use own function.
---
lib/activate/dev_manager.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c
index cd9d27e11..aa88e6868 100644
--- a/lib/activate/dev_manager.c
+++ b/lib/activate/dev_manager.c
@@ -839,8 +839,7 @@ static int _info(struct cmd_context *cmd,
if (strcmp(suffix_position + 1, suffix))
continue;
- (void) strncpy(old_style_dlid, dlid, sizeof(old_style_dlid));
- old_style_dlid[sizeof(old_style_dlid) - 1] = '\0';
+ (void) dm_strncpy(old_style_dlid, dlid, sizeof(old_style_dlid));
if (!_info_run(old_style_dlid, dminfo, read_ahead, seg_status,
name_check, with_open_count, with_read_ahead,
0, 0))
3 years, 2 months
main - device_is_usable: minor improve
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=4d75c4f597b28e4ea01...
Commit: 4d75c4f597b28e4ea014ef61082074187dc6245a
Parent: 0363e4de70148c7fad5c46c40bc4db30be123545
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Mar 16 10:10:10 2021 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Mar 17 00:49:11 2021 +0100
device_is_usable: minor improve
Replace allocated buffer with local vg_name which doesn't
pass pointer to allocation.
Join some conditions together.
---
lib/activate/dev_manager.c | 77 ++++++++++++++++++++++++----------------------
1 file changed, 41 insertions(+), 36 deletions(-)
diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c
index 1a8f848ac..cd9d27e11 100644
--- a/lib/activate/dev_manager.c
+++ b/lib/activate/dev_manager.c
@@ -627,7 +627,8 @@ int device_is_usable(struct device *dev, struct dev_usable_check_params check, i
const char *name, *uuid;
uint64_t start, length;
char *target_type = NULL;
- char *params, *vgname = NULL, *lvname, *layer;
+ char *params, *vgname, *lvname, *layer;
+ char vg_name[NAME_LEN];
void *next = NULL;
int only_error_target = 1;
int r = 0;
@@ -652,44 +653,49 @@ int device_is_usable(struct device *dev, struct dev_usable_check_params check, i
goto out;
}
- /* Check internal lvm devices */
- if (check.check_reserved &&
- uuid && !strncmp(uuid, UUID_PREFIX, sizeof(UUID_PREFIX) - 1)) {
- if (strlen(uuid) > (sizeof(UUID_PREFIX) + 2 * ID_LEN)) { /* 68 */
- log_debug_activation("%s: Reserved uuid %s on internal LV device %s not usable.",
- dev_name(dev), uuid, name);
- goto out;
- }
+ if (uuid && (check.check_reserved || check.check_lv)) {
+ if (!strncmp(uuid, UUID_PREFIX, sizeof(UUID_PREFIX) - 1)) { /* with LVM- prefix */
+ if (check.check_reserved) {
+ /* Check internal lvm devices */
+ if (strlen(uuid) > (sizeof(UUID_PREFIX) + 2 * ID_LEN)) { /* 68 with suffix */
+ log_debug_activation("%s: Reserved uuid %s on internal LV device %s not usable.",
+ dev_name(dev), uuid, name);
+ goto out;
+ }
- if (!(vgname = strdup(name)) ||
- !dm_split_lvm_name(NULL, NULL, &vgname, &lvname, &layer))
- goto_out;
+ /* Recognize some older reserved LVs just from the LV name (snapshot, pvmove...) */
+ vgname = vg_name;
+ if (!dm_strncpy(vg_name, name, sizeof(vg_name)) ||
+ !dm_split_lvm_name(NULL, NULL, &vgname, &lvname, &layer))
+ goto_out;
- /* FIXME: fails to handle dev aliases i.e. /dev/dm-5, replace with UUID suffix */
- if (lvname && (is_reserved_lvname(lvname) || *layer)) {
- log_debug_activation("%s: Reserved internal LV device %s/%s%s%s not usable.",
- dev_name(dev), vgname, lvname, *layer ? "-" : "", layer);
- goto out;
- }
- }
+ /* FIXME: fails to handle dev aliases i.e. /dev/dm-5, replace with UUID suffix */
+ if (lvname && (is_reserved_lvname(lvname) || *layer)) {
+ log_debug_activation("%s: Reserved internal LV device %s/%s%s%s not usable.",
+ dev_name(dev), vgname, lvname, *layer ? "-" : "", layer);
+ goto out;
+ }
+ }
- if (check.check_lv && uuid && !strncmp(uuid, "LVM-", 4)) {
- /* Skip LVs */
- if (is_lv)
- *is_lv = 1;
- goto out;
- }
+ if (check.check_lv) {
+ /* Skip LVs */
+ if (is_lv)
+ *is_lv = 1;
+ goto out;
+ }
+ }
- if (check.check_reserved && uuid &&
- (!strncmp(uuid, CRYPT_TEMP, sizeof(CRYPT_TEMP) - 1) ||
- !strncmp(uuid, CRYPT_SUBDEV, sizeof(CRYPT_SUBDEV) - 1) ||
- !strncmp(uuid, STRATIS, sizeof(STRATIS) - 1))) {
- /* Skip private crypto devices */
- log_debug_activation("%s: Reserved uuid %s on %s device %s not usable.",
- dev_name(dev), uuid,
- uuid[0] == 'C' ? "crypto" : "stratis",
- name);
- goto out;
+ if (check.check_reserved &&
+ (!strncmp(uuid, CRYPT_TEMP, sizeof(CRYPT_TEMP) - 1) ||
+ !strncmp(uuid, CRYPT_SUBDEV, sizeof(CRYPT_SUBDEV) - 1) ||
+ !strncmp(uuid, STRATIS, sizeof(STRATIS) - 1))) {
+ /* Skip private crypto devices */
+ log_debug_activation("%s: Reserved uuid %s on %s device %s not usable.",
+ dev_name(dev), uuid,
+ uuid[0] == 'C' ? "crypto" : "stratis",
+ name);
+ goto out;
+ }
}
/* FIXME Also check for mpath no paths */
@@ -777,7 +783,6 @@ int device_is_usable(struct device *dev, struct dev_usable_check_params check, i
r = 1;
out:
- free(vgname);
dm_task_destroy(dmt);
return r;
}
3 years, 2 months
main - cleanup: typo
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=0363e4de70148c7fad5...
Commit: 0363e4de70148c7fad5c46c40bc4db30be123545
Parent: e6912cc61cd33e040dcab326b3ea7c292ff3f699
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Mar 15 18:59:15 2021 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Mar 15 18:59:15 2021 +0100
cleanup: typo
---
lib/filters/filter-sysfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/filters/filter-sysfs.c b/lib/filters/filter-sysfs.c
index b626144b2..32ac324dd 100644
--- a/lib/filters/filter-sysfs.c
+++ b/lib/filters/filter-sysfs.c
@@ -218,14 +218,14 @@ static int _read_devs(struct dev_set *ds, const char *dir, unsigned sysfs_depth)
if (dm_snprintf(path, sizeof(path), "%s/%s", dir,
d->d_name) < 0) {
- log_warn("WARGNING: sysfs path name too long: %s in %s.",
+ log_warn("WARNING: sysfs path name too long: %s in %s.",
d->d_name, dir);
continue;
}
/* devices have a "dev" file */
if (dm_snprintf(file, sizeof(file), "%s/dev", path) < 0) {
- log_warn("WARGNING: sysfs path name too long: %s in %s.",
+ log_warn("WARNING: sysfs path name too long: %s in %s.",
d->d_name, dir);
continue;
}
3 years, 2 months
main - WHATS_NEW: updates
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=e6912cc61cd33e040dc...
Commit: e6912cc61cd33e040dcab326b3ea7c292ff3f699
Parent: b4a74d1008e114d5976a235b3a6f793181bc5745
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Mar 15 10:58:00 2021 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Mar 15 11:13:24 2021 +0100
WHATS_NEW: updates
---
WHATS_NEW | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/WHATS_NEW b/WHATS_NEW
index 568a7df90..e4ccd1b0d 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,10 @@
Version 2.03.12 -
===================================
+ 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.
+ 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.
3 years, 2 months
main - tests: add test for merging
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=b4a74d1008e114d5976...
Commit: b4a74d1008e114d5976a235b3a6f793181bc5745
Parent: 800a93d4ac78e2736c43cb2cf8099cf68b68b341
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sun Mar 14 22:48:20 2021 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Mar 15 11:13:24 2021 +0100
tests: add test for merging
Check we handle mething of thin snapshot that is itself thick snapshot
origin.
Also use lvpoll to better wait for finish of merging.
---
test/shell/snapshot-merge-thin.sh | 35 ++++++++++++++++++++++++++++++++---
1 file changed, 32 insertions(+), 3 deletions(-)
diff --git a/test/shell/snapshot-merge-thin.sh b/test/shell/snapshot-merge-thin.sh
index 26fae904d..447a93167 100644
--- a/test/shell/snapshot-merge-thin.sh
+++ b/test/shell/snapshot-merge-thin.sh
@@ -21,21 +21,50 @@ aux have_thin 1 0 0 || skip
aux prepare_vg 2
+lvcreate -T -L1 -V1 -n $lv1 $vg/pool "$dev1"
+lvcreate -s -n $lv2 $vg/$lv1
+
+# Take also thick snapshot of thin snapshot
+lvcreate -s -L1 -n $lv3 $vg/$lv2
+
+sleep 10 < "$DM_DEV_DIR/$vg/$lv1" >/dev/null 2>&1 &
+PID_SLEEP=$!
+
+# initiated merge that cannot proceed, but there is no need to retry
+lvconvert --config 'activation/retry_deactivation=0' --merge $vg/$lv2
+
+kill $PID_SLEEP
+wait
+
+# Remove everything
+lvremove --yes $vg
+
+# No LV left in VG
+check vg_field $vg lv_count "0"
+
+
+# Create again pool with thin and thick snapshot
lvcreate -T -L1 -V1 -n $lv1 $vg/pool "$dev1"
lvcreate -s -n $lv2 -L2 $vg/$lv1 "$dev2"
dd if=/dev/zero of="$DM_DEV_DIR/$vg/$lv2" bs=1M count=1 oflag=direct
+lvs -a -o+lv_merging,lv_merge_failed $vg
+aux delay_dev "$dev1" 0 100 "$(get first_extent_sector "$dev1"):"
+
# Initiate background merge
lvconvert -b --merge $vg/$lv2
# Query status of snapshot immediatelly after start
# - may hit race of checking already in-progress merge
-lvs -a -o+lv_merging,lv_merge_failed $vg
+#lvs -a -o+lv_merging,lv_merge_failed $vg
+check lv_field $vg/$lv1 lv_merging "merging"
-sleep 1
+lvm lvpoll -i 1 --polloperation merge $vg/$lv1
# Here should be everything already merged
-lvs -a -o+lv_merging,lv_merge_failed $vg
+#lvs -a -o+lv_merging,lv_merge_failed $vg
+# check we see thin filled 100% (1MiB written to 1MiB LV)
+check lv_field $vg/$lv1 data_percent "100.00"
# -real must not exist for $vg/$lv1
not dmsetup info ${vg}-${lv1}-real 2>&1 | tee out
3 years, 2 months
main - tests: wait till fs is synchronized
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=800a93d4ac78e2736c4...
Commit: 800a93d4ac78e2736c43cb2cf8099cf68b68b341
Parent: 78406ef6174b20ba2ee3e6405b8ed39804990482
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Mar 11 10:46:31 2021 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Mar 15 11:13:24 2021 +0100
tests: wait till fs is synchronized
Adding full filesystem sync, trying to fight with strange error from losetup:
losetup: loopa: failed to set up loop device: Resource temporarily unavailable
loop0: detected capacity change from 0 to 4096
loop_set_block_size: loop0 () has still dirty pages (nrpages=13)
Also reuse internal aux wipefs_a
---
test/shell/allow-mixed-block-sizes.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/shell/allow-mixed-block-sizes.sh b/test/shell/allow-mixed-block-sizes.sh
index efab1302a..a094338cb 100644
--- a/test/shell/allow-mixed-block-sizes.sh
+++ b/test/shell/allow-mixed-block-sizes.sh
@@ -16,10 +16,10 @@ SKIP_WITH_LVMPOLLD=1
losetup -h | grep sector-size || skip
which fallocate || skip
-which wipefs || skip
fallocate -l 2M loopa
fallocate -l 2M loopb
+sync
LOOP1=$(losetup -f loopa --sector-size 4096 --show)
LOOP2=$(losetup -f loopb --show)
@@ -40,7 +40,7 @@ vgcreate --config 'devices/allow_mixed_block_sizes=1' $vg "$dev1" "$dev2"
vgs --config 'devices/allow_mixed_block_sizes=1' $vg
for i in "$dev1" "$dev2" ; do
- wipefs -a "$i"
+ aux wipefs_a "$i"
# FIXME - we are not missing notification for hinting
# likely in more places - as the test should be able to work without
# system's udev working only on real /dev dir.
3 years, 2 months
main - tests: update handling of thin-pool removal
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=78406ef6174b20ba2ee...
Commit: 78406ef6174b20ba2ee3e6405b8ed39804990482
Parent: e5e957e3308a6a03503b6ded290dc975494204e5
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Mar 11 10:25:41 2021 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Mar 15 11:13:24 2021 +0100
tests: update handling of thin-pool removal
We shall no longer activate thin-pool, when
it's going away together with all thin volumes.
---
test/shell/component-thin.sh | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/test/shell/component-thin.sh b/test/shell/component-thin.sh
index 3cf02f37d..ddadd0f8e 100644
--- a/test/shell/component-thin.sh
+++ b/test/shell/component-thin.sh
@@ -39,11 +39,5 @@ lvs -a
# When component LVs are active, thin-pool cannot be actived
not lvcreate -V20 $vg/pool
-
-# FIXME: ATM removal of thin volumes goes 1-by-1 and needs to activate thin-pool.
-# And thin-pool cannot be activate thus vgremove fails.
-# To fix this it would need to be able to remove volumes without activation.
-should vgremove -f $vg
-
-# -ff bypass activation failure
-vgremove -ff $vg
+# Rremoval of thin volumes should not need to activate thin-pool.
+vgremove -f $vg
3 years, 2 months