master - man: lvm2-activation-generator fix vgchange comment
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=fbdcc45255497e2f926...
Commit: fbdcc45255497e2f926ac28ba33aa819d53f5c7c
Parent: dd0fdd846d85d7028e65bb801c27791a8e2cee2d
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Mar 10 14:41:51 2020 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Mar 10 14:41:51 2020 -0500
man: lvm2-activation-generator fix vgchange comment
generated services use vgchange -aay (not -ay)
---
man/lvm2-activation-generator.8_main | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man/lvm2-activation-generator.8_main b/man/lvm2-activation-generator.8_main
index ba7fd0dda..478c23bd5 100644
--- a/man/lvm2-activation-generator.8_main
+++ b/man/lvm2-activation-generator.8_main
@@ -9,7 +9,7 @@ lvm2-activation-generator - generator for systemd units to activate LVM volumes
The lvm2-activation-generator is called by \fBsystemd\fP(1) on boot to
generate systemd units at runtime to activate LVM Logical Volumes (LVs)
when global/event_activation=0 is set in \fBlvm.conf\fP(5). These units use
-\fBvgchange -ay\fP to activate LVs.
+\fBvgchange -aay\fP to activate LVs.
If event_activation=1, the lvm2-activation-generator exits immediately without
generating any systemd units, and LVM fully relies on event-based
2 years, 10 months
master - lvmlockd: use transient LV lock when creating snapshot
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=dd0fdd846d85d7028e6...
Commit: dd0fdd846d85d7028e65bb801c27791a8e2cee2d
Parent: a5b1b52903fe3c71e8515f5592ab10d69896b5e7
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Mon Mar 9 12:25:26 2020 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Mar 9 12:25:26 2020 -0500
lvmlockd: use transient LV lock when creating snapshot
Creating a snapshot was using a persistent LV lock
on the origin, so if the origin LV was inactive at
the time of the snapshot the LV lock would remain.
(Running lvchange -an on the inactive LV would
clear the LV lock.) Use a transient LV lock so it
will be dropped if it was not locked previously.
---
lib/locking/lvmlockd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/locking/lvmlockd.c b/lib/locking/lvmlockd.c
index 416121011..e378fe6cb 100644
--- a/lib/locking/lvmlockd.c
+++ b/lib/locking/lvmlockd.c
@@ -2679,7 +2679,7 @@ int lockd_init_lv(struct cmd_context *cmd, struct volume_group *vg, struct logic
log_error("Failed to find origin LV %s/%s", vg->name, lp->origin_name);
return 0;
}
- if (!lockd_lv(cmd, origin_lv, "ex", LDLV_PERSISTENT)) {
+ if (!lockd_lv(cmd, origin_lv, "ex", 0)) {
log_error("Failed to lock origin LV %s/%s", vg->name, lp->origin_name);
return 0;
}
2 years, 11 months
master - writecache: require inactive LV to attach
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a5b1b52903fe3c71e85...
Commit: a5b1b52903fe3c71e8515f5592ab10d69896b5e7
Parent: c9526e859eba5a406e49853d59041a3497154fa8
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Mon Mar 9 11:18:10 2020 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Mar 9 11:18:10 2020 -0500
writecache: require inactive LV to attach
Prevent attaching writecache to an active LV until
we can determine the block size of the fs on the LV,
and use that to enforce an appropriate writecache
block size. Changing the block size under a mounted
fs can cause panic/corruption.
---
tools/lvconvert.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index 68bd75cb5..f6d9a29f6 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -5603,6 +5603,16 @@ static int _lvconvert_writecache_attach_single(struct cmd_context *cmd,
goto bad;
}
+ /*
+ * To permit this we need to check the block size of the fs using lv
+ * (recently in libblkid) so that we can use a matching writecache
+ * block size. We also want to do that if the lv is inactive.
+ */
+ if (lv_is_active(lv)) {
+ log_error("LV %s must be inactive to attach writecache.", display_lvname(lv));
+ goto bad;
+ }
+
/* fast LV shouldn't generally be active by itself, but just in case. */
if (lv_info(cmd, lv_fast, 1, NULL, 0, 0)) {
log_error("LV %s must be inactive to attach.", display_lvname(lv_fast));
@@ -5643,15 +5653,6 @@ static int _lvconvert_writecache_attach_single(struct cmd_context *cmd,
memcpy(&lockd_fast_id, &lv_fast->lvid.id[1], sizeof(struct id));
}
- /*
- * TODO: use libblkid to get the sector size of lv. If it doesn't
- * match the block_size we are using for the writecache, then warn that
- * an existing file system on lv may become unmountable with the
- * writecache attached because of the changing sector size. If this
- * happens, then use --splitcache, and reattach the writecache using a
- * writecache block_size value matching the sector size of lv.
- */
-
if (!_writecache_zero(cmd, lv_fast)) {
log_error("LV %s could not be zeroed.", display_lvname(lv_fast));
return ECMD_FAILED;
2 years, 11 months
stable-2.02 - pvs: fix locking_type 4
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=20d61a2553a16057083...
Commit: 20d61a2553a160570835cad6790108fa2365b936
Parent: deaf304ee6d88cd47632a345b92b3949cd06d752
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Mar 3 12:59:20 2020 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri Mar 6 09:06:10 2020 -0600
pvs: fix locking_type 4
Fix for commit 79c4971210a6337563ffa2fca08fb636423d93d4.
This bug leads lvm to attempt a bogus recovery of the
orphan VG whenever the orphan VG is read.
No recovery code exists for the orphan VG, but lvm still
attempts it when the "consistent" variable is not set to 1.
When lvm attempts the bogus/no-op orphan recovery, it tries
to get a write lock. Usually the write lock succeeds, and
"recovery" does nothing, so fairly harmless. But, with
locking_type=4, the write lock fails, which bubbles up to
cause the whole command failure.
---
lib/metadata/metadata.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index 81a6029..666ad78 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -3433,6 +3433,8 @@ static struct volume_group *_vg_read_orphans(struct cmd_context *cmd,
dm_list_init(&head.list);
+ *consistent = 1;
+
if (!(vginfo = lvmcache_vginfo_from_vgname(orphan_vgname, NULL)))
return_NULL;
2 years, 11 months
master - WHATS_NEW_DM: update
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=c9526e859eba5a406e4...
Commit: c9526e859eba5a406e49853d59041a3497154fa8
Parent: f439716b7583556352f1b7a6696ada32f52e44b4
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Mar 5 17:38:00 2020 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Mar 5 17:38:55 2020 +0100
WHATS_NEW_DM: update
---
WHATS_NEW_DM | 2 ++
1 file changed, 2 insertions(+)
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index c707538..4cb0bd3 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,7 @@
Version 1.02.171 -
=====================================
+ 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
=====================================
2 years, 11 months
master - container_of: use offsetof from stddef
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=f439716b7583556352f...
Commit: f439716b7583556352f1b7a6696ada32f52e44b4
Parent: b3fa71fbd8e583c040c04e655f3ebe70a3d941b2
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Mar 5 12:58:34 2020 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Mar 5 17:38:55 2020 +0100
container_of: use offsetof from stddef
Use standardized offsetof() macro from stddef.
Helps to build valid code with latest gcc10 with -O2.
---
base/memory/container_of.h | 6 ++++--
lib/device/bcache.h | 9 +--------
2 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/base/memory/container_of.h b/base/memory/container_of.h
index 4e4c662..ddb7959 100644
--- a/base/memory/container_of.h
+++ b/base/memory/container_of.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2018 Red Hat, Inc. All rights reserved.
+// Copyright (C) 2018 - 2020 Red Hat, Inc. All rights reserved.
//
// This file is part of LVM2.
//
@@ -13,10 +13,12 @@
#ifndef BASE_MEMORY_CONTAINER_OF_H
#define BASE_MEMORY_CONTAINER_OF_H
+#include <stddef.h> // offsetof
+
//----------------------------------------------------------------
#define container_of(v, t, head) \
- ((t *)((const char *)(v) - (const char *)&((t *) 0)->head))
+ ((t *)((const char *)(v) - offsetof(t, head)))
//----------------------------------------------------------------
diff --git a/lib/device/bcache.h b/lib/device/bcache.h
index 4ef044c..2950afa 100644
--- a/lib/device/bcache.h
+++ b/lib/device/bcache.h
@@ -16,19 +16,12 @@
#define BCACHE_H
#include "device_mapper/all.h"
+#include "base/memory/container_of.h"
#include <linux/fs.h>
#include <stdint.h>
#include <stdbool.h>
-/*----------------------------------------------------------------*/
-
-// FIXME: move somewhere more sensible
-#define container_of(v, t, head) \
- ((t *)((const char *)(v) - (const char *)&((t *) 0)->head))
-
-/*----------------------------------------------------------------*/
-
enum dir {
DIR_READ,
DIR_WRITE
2 years, 11 months
master - libdm: fix dm_list pointer arithmentic for new gcc 10 optimization
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=b3fa71fbd8e583c040c...
Commit: b3fa71fbd8e583c040c04e655f3ebe70a3d941b2
Parent: 212cf8efbdc1c67f8ea85c951873b0fc3249eb07
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Mar 4 16:07:22 2020 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Mar 5 17:38:55 2020 +0100
libdm: fix dm_list pointer arithmentic for new gcc 10 optimization
---
base/data-struct/list.h | 6 ++++--
libdm/libdevmapper.h | 5 +++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/base/data-struct/list.h b/base/data-struct/list.h
index 1a107d1..54cb1c1 100644
--- a/base/data-struct/list.h
+++ b/base/data-struct/list.h
@@ -1,6 +1,8 @@
#ifndef BASE_DATA_STRUCT_LIST_H
#define BASE_DATA_STRUCT_LIST_H
+#include <stddef.h> /* offsetof */
+
//----------------------------------------------------------------
/*
@@ -98,7 +100,7 @@ struct dm_list *dm_list_next(const struct dm_list *head, const struct dm_list *e
* contained in a structure of type t, return the containing structure.
*/
#define dm_list_struct_base(v, t, head) \
- ((t *)((const char *)(v) - (const char *)&((t *) 0)->head))
+ ((t *)((const char *)(v) - offsetof(t, head)))
/*
* Given the address v of an instance of 'struct dm_list list' contained in
@@ -111,7 +113,7 @@ struct dm_list *dm_list_next(const struct dm_list *head, const struct dm_list *e
* return another element f.
*/
#define dm_struct_field(v, t, e, f) \
- (((t *)((uintptr_t)(v) - (uintptr_t)&((t *) 0)->e))->f)
+ (((t *)((uintptr_t)(v) - offsetof(t, e)))->f)
/*
* Given the address v of a known element e in a known structure of type t,
diff --git a/libdm/libdevmapper.h b/libdm/libdevmapper.h
index 18fe9f9..03a43eb 100644
--- a/libdm/libdevmapper.h
+++ b/libdm/libdevmapper.h
@@ -30,6 +30,7 @@
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
+#include <stddef.h> /* offsetof */
#ifndef __GNUC__
# define __typeof__ typeof
@@ -2470,7 +2471,7 @@ struct dm_list *dm_list_next(const struct dm_list *head, const struct dm_list *e
* contained in a structure of type t, return the containing structure.
*/
#define dm_list_struct_base(v, t, head) \
- ((t *)((const char *)(v) - (const char *)&((t *) 0)->head))
+ ((t *)((const char *)(v) - offsetof(t, head)))
/*
* Given the address v of an instance of 'struct dm_list list' contained in
@@ -2483,7 +2484,7 @@ struct dm_list *dm_list_next(const struct dm_list *head, const struct dm_list *e
* return another element f.
*/
#define dm_struct_field(v, t, e, f) \
- (((t *)((uintptr_t)(v) - (uintptr_t)&((t *) 0)->e))->f)
+ (((t *)((uintptr_t)(v) - offsetof(t, e))->f)
/*
* Given the address v of a known element e in a known structure of type t,
2 years, 11 months
master - dmeventd: enhance time waiting loop
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=212cf8efbdc1c67f8ea...
Commit: 212cf8efbdc1c67f8ea85c951873b0fc3249eb07
Parent: caecbcbeac633c6f1f09edb18916830d3020db36
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Mar 4 15:56:09 2020 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Mar 5 17:38:55 2020 +0100
dmeventd: enhance time waiting loop
dmeventd is 'scanning' statuses in loop (most usually in 10sec
intervals) - and meanwhile it sleeps within:
pthread_cond_timedwait()
However this function call tends to wakeup sometimes a short amount of
time sooner - and our code still believe the 'right time' has not yet
arrived and basically for a moment 'busy-looped' on calling this
function - so for systems with 'clock_gettime()' present we obtain
time and we go 10ms to the future second - this avoids unneeded
repeated invocation of our time scheduling loop.
TODO: monitoring during 1 hour 'time-change'...
---
daemons/dmeventd/dmeventd.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/daemons/dmeventd/dmeventd.c b/daemons/dmeventd/dmeventd.c
index 36a35ba..96e7091 100644
--- a/daemons/dmeventd/dmeventd.c
+++ b/daemons/dmeventd/dmeventd.c
@@ -752,7 +752,7 @@ static void _exit_timeout(void *unused __attribute__((unused)))
static void *_timeout_thread(void *unused __attribute__((unused)))
{
struct thread_status *thread;
- struct timespec timeout;
+ struct timespec timeout, real_time;
time_t curr_time;
int ret;
@@ -763,7 +763,16 @@ static void *_timeout_thread(void *unused __attribute__((unused)))
while (!dm_list_empty(&_timeout_registry)) {
timeout.tv_sec = 0;
timeout.tv_nsec = 0;
+#ifndef HAVE_REALTIME
curr_time = time(NULL);
+#else
+ if (clock_gettime(CLOCK_REALTIME, &real_time)) {
+ log_error("Failed to read clock_gettime().");
+ break;
+ }
+ /* 10ms back to the future */
+ curr_time = real_time.tv_sec + ((real_time.tv_nsec > (1000000000 - 10000000)) ? 1 : 0);
+#endif
dm_list_iterate_items_gen(thread, &_timeout_registry, timeout_list) {
if (thread->next_time <= curr_time) {
2 years, 11 months
master - pvck: use dm_config_parse_without_dup_node_check
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=caecbcbeac633c6f1f0...
Commit: caecbcbeac633c6f1f09edb18916830d3020db36
Parent: 4b5bfa779a744b3ad3b3d28dcb6797110a39dbab
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Mar 4 11:32:13 2020 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed Mar 4 11:32:13 2020 -0600
pvck: use dm_config_parse_without_dup_node_check
instead of dm_config_parse. Some strange case could
cause dm_config_parse to print duplicate warnings about
all the metadata fileds.
---
tools/pvck.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/pvck.c b/tools/pvck.c
index 566dfc3..71bfc1b 100644
--- a/tools/pvck.c
+++ b/tools/pvck.c
@@ -258,7 +258,7 @@ static int _text_buf_parse(char *text_buf, uint64_t text_size, struct dm_config_
return 0;
}
- if (!dm_config_parse(cft, text_buf, text_buf + text_size)) {
+ if (!dm_config_parse_without_dup_node_check(cft, text_buf, text_buf + text_size)) {
config_destroy(cft);
return 0;
}
@@ -952,7 +952,7 @@ static int _dump_current_text(struct device *dev, struct devicefile *def,
log_print("CHECK: failed to set up metadata parsing");
bad++;
} else {
- if (!dm_config_parse(cft, meta_buf, meta_buf + meta_size)) {
+ if (!dm_config_parse_without_dup_node_check(cft, meta_buf, meta_buf + meta_size)) {
log_print("CHECK: failed to parse metadata text at %llu size %llu",
(unsigned long long)(mda_offset + meta_offset),
(unsigned long long)meta_size);
2 years, 11 months
master - tests: reduce sizes in pvck-dump and improve checks
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=4b5bfa779a744b3ad3b...
Commit: 4b5bfa779a744b3ad3b3d28dcb6797110a39dbab
Parent: f6667f94cb1204aad5703d129aeeca8286ebaf18
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Mar 4 11:30:50 2020 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed Mar 4 11:30:50 2020 -0600
tests: reduce sizes in pvck-dump and improve checks
Smaller devs can be used so tests can be run on small vms.
Improve checks.
---
test/shell/pvck-dump.sh | 66 +++++++++++++++++++++++++++++++++++++------------
1 file changed, 50 insertions(+), 16 deletions(-)
diff --git a/test/shell/pvck-dump.sh b/test/shell/pvck-dump.sh
index 5c662f6..3277312 100644
--- a/test/shell/pvck-dump.sh
+++ b/test/shell/pvck-dump.sh
@@ -12,13 +12,16 @@
. lib/inittest
-aux prepare_devs 8 512
+# 4 devs each 128MB
+aux prepare_devs 4 128
get_devs
-dd if=/dev/zero of="$dev1" || true
-dd if=/dev/zero of="$dev2" || true
+dd if=/dev/zero of="$dev1" bs=1M count=32 || true
+dd if=/dev/zero of="$dev2" bs=1M count=32 || true
+dd if=/dev/zero of="$dev3" bs=1M count=32 || true
+dd if=/dev/zero of="$dev4" bs=1M count=32 || true
+# clear entire dev to cover mda2
dd if=/dev/zero of="$dev3" || true
-dd if=/dev/zero of="$dev4" || true
pvcreate "$dev1"
pvcreate "$dev2"
@@ -27,6 +30,8 @@ pvcreate --pvmetadatacopies 0 "$dev4"
vgcreate $SHARED $vg "$dev1" "$dev2" "$dev3"
+pvs
+
pvck --dump headers "$dev1" > h1
pvck --dump headers "$dev2" > h2
pvck --dump headers "$dev3" > h3
@@ -129,14 +134,17 @@ diff area1 area3b
vgremove -ff $vg
-pvremove "$dev1"
-pvremove "$dev2"
-pvremove "$dev3"
-pvremove "$dev4"
+
+dd if=/dev/zero of="$dev1" bs=1M count=32 || true
+dd if=/dev/zero of="$dev2" bs=1M count=32 || true
+dd if=/dev/zero of="$dev3" bs=1M count=32 || true
+dd if=/dev/zero of="$dev4" bs=1M count=32 || true
+# clear entire dev to cover mda2
+dd if=/dev/zero of="$dev1" || true
pvcreate --pvmetadatacopies 2 --metadatasize 32M "$dev1"
-vgcreate $SHARED -s 512K --metadatasize 32M $vg "$dev1" "$dev2" "$dev3" "$dev4" "$dev5" "$dev6" "$dev7" "$dev8"
+vgcreate $SHARED -s 512K --metadatasize 32M $vg "$dev1" "$dev2" "$dev3" "$dev4"
for i in `seq 1 500`; do lvcreate -an -n lv$i -l1 $vg; done
@@ -145,20 +153,46 @@ pvck --dump headers "$dev1" > h1
pvck --dump metadata_search "$dev1" > m1
grep "seqno 500" m1
-dd if="$dev1" of=dev1dd bs=1M count=32
+# When metadatasize is 32M, headers/rounding can mean that
+# we need more than the first 32M of the dev to get all the
+# metadata.
+dd if="$dev1" of=dev1dd bs=1M count=34
+
+# Clear the header so that we force metadata_search to use
+# the settings instead of getting the mda_size/mda_offset
+# from the headers.
dd if=/dev/zero of="$dev1" bs=4K count=1
-# mda_size for mda1 is 32M - 4K
-pvck --dump metadata_search --settings "mda_num=1 mda_size=33550336" "$dev1" > m1b
+# Warning: these checks are based on copying specific numbers
+# seen when running these commands, but these numbers could
+# change as side effects of other things. That makes this
+# somewhat fragile, and we might want to remove some of the
+# these checks if they are hard to keep working.
+
+# by experimentation, mda_size for mda1 is 34598912
+pvck --dump metadata_search --settings "mda_num=1 mda_size=34598912" "$dev1" > m1b
+# by experimentation, metadata 484 is the last in the mda1 buffer
+grep "seqno 484" m1b
+# by experimentation, metadata 485 is the last in the mda1 buffer
+grep "seqno 485" m1b
grep "seqno 500" m1b
-pvck --dump metadata_search --settings "mda_num=1 mda_size=33550336" dev1dd > m1c
-grep "seqno 500" m1c
+# same results when using file as on device
+pvck --dump metadata_search --settings "mda_num=1 mda_size=34598912" dev1dd > m1c
+# by experimentation, metadata 484 is the last in the mda1 buffer
+grep "seqno 484" m1b
+# by experimentation, metadata 485 is the last in the mda1 buffer
+grep "seqno 485" m1b
+grep "seqno 500" m1b
-# mda_size for mda2 is 32M
+# by experimentation, mda_size for mda2 is 33554432
pvck --dump metadata_search --settings "mda_num=2 mda_size=33554432" "$dev1" > m2
+# by experimentation, metadata 477 is the last in the mda2 buffer
+grep "seqno 477" m1b
+# by experimentation, metadata 478 is the last in the mda2 buffer
+grep "seqno 478" m1b
grep "seqno 500" m2
-dd if=dev1dd of="$dev1" bs=1M count=32
+dd if=dev1dd of="$dev1" bs=4K count=1
vgremove -ff $vg
2 years, 11 months