diff options
author | David Teigland <teigland@redhat.com> | 2019-09-30 16:20:17 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2019-09-30 16:20:17 -0500 |
commit | 7368cf8e7df0218d61c9538fee68d0da634b5571 (patch) | |
tree | 95de533ab71a44a3cf3cd06b4f380e732f65ef51 /test/shell/pvck-dump.sh | |
parent | 1bfae5bf8e5905a72f7168562e1bbc074f23b791 (diff) | |
download | lvm2-7368cf8e7df0218d61c9538fee68d0da634b5571.tar.gz |
pvck: handle PVs with zero metadata copies
Diffstat (limited to 'test/shell/pvck-dump.sh')
-rw-r--r-- | test/shell/pvck-dump.sh | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/shell/pvck-dump.sh b/test/shell/pvck-dump.sh index ed8766a07..542fb49b3 100644 --- a/test/shell/pvck-dump.sh +++ b/test/shell/pvck-dump.sh @@ -12,30 +12,35 @@ . lib/inittest -aux prepare_devs 3 +aux prepare_devs 4 get_devs dd if=/dev/zero of="$dev1" || true dd if=/dev/zero of="$dev2" || true dd if=/dev/zero of="$dev3" || true +dd if=/dev/zero of="$dev4" || true pvcreate "$dev1" pvcreate "$dev2" pvcreate --pvmetadatacopies 2 "$dev3" +pvcreate --pvmetadatacopies 0 "$dev4" vgcreate $SHARED $vg "$dev1" "$dev2" "$dev3" pvck --dump headers "$dev1" > h1 pvck --dump headers "$dev2" > h2 pvck --dump headers "$dev3" > h3 +pvck --dump headers "$dev4" > h4 grep "label_header at 512" h1 grep "label_header at 512" h2 grep "label_header at 512" h3 +grep "label_header at 512" h4 grep "pv_header at 544" h1 grep "pv_header at 544" h2 grep "pv_header at 544" h3 +grep "pv_header at 544" h4 grep "pv_header.disk_locn\[0\].offset 1048576" h1 grep "pv_header.disk_locn\[0\].offset 1048576" h2 @@ -49,6 +54,10 @@ grep "pv_header.disk_locn\[2\].size 1044480" h1 grep "pv_header.disk_locn\[2\].size 1044480" h2 grep "pv_header.disk_locn\[2\].size 1044480" h3 +not grep "pv_header.disk_locn\[3\].size" h4 +not grep "pv_header.disk_locn\[4\].size" h4 +not grep "mda_header" h4 + grep "mda_header_1 at 4096" h1 grep "mda_header_1 at 4096" h2 grep "mda_header_1 at 4096" h3 @@ -75,8 +84,11 @@ not grep CHECK h3 pvck --dump metadata "$dev1" > m1 pvck --dump metadata "$dev2" > m2 pvck --dump metadata "$dev3" > m3 +pvck --dump metadata "$dev4" > m4 pvck --dump metadata --pvmetadatacopies 2 "$dev3" > m3b +grep "zero metadata copies" m4 + diff m1 m2 diff m1 m3 |