mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
tests: improve lib wipefs_a
in wipefs fallback, use limited dd and mdadm --zero-superblock to avoid writing to entire dev in case dev space is provisioned on write.
This commit is contained in:
parent
414f903cdc
commit
a22729a557
@ -804,7 +804,8 @@ wipefs_a() {
|
||||
if wipefs -V >/dev/null; then
|
||||
wipefs -a "$dev"
|
||||
else
|
||||
dd if=/dev/zero of="$dev" bs=1024 || true
|
||||
dd if=/dev/zero of="$dev" bs=4096 count=8 || true
|
||||
mdadm --zero-superblock "$dev" || true
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user