ZTS: Simplify zero_partitions on FreeBSD
We can avoid a great deal of `sleep 3` by simply destroying the whole partition table in one shot with gpart. Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #9908
This commit is contained in:
parent
74b4d349b3
commit
395a6b19d3
@ -879,7 +879,9 @@ function zero_partitions #<whole_disk_name>
|
||||
typeset diskname=$1
|
||||
typeset i
|
||||
|
||||
if is_linux; then
|
||||
if is_freebsd; then
|
||||
gpart destroy -F $diskname
|
||||
elif is_linux; then
|
||||
DSK=$DEV_DSKDIR/$diskname
|
||||
DSK=$(echo $DSK | sed -e "s|//|/|g")
|
||||
log_must parted $DSK -s -- mklabel gpt
|
||||
|
Loading…
Reference in New Issue
Block a user