dumpon opens geom devices non-exclusively. This might be required in order to share a device for swap and dump purposes. However, it's also dangerous as it allows a single device to be used as both a dump device and a storage device.
Steps to reproduce:
> sudo dumpon vtbd1
> sudo zpool create foo vtbd1
A commit references this bug:
Date: Sat Oct 5 03:19:55 UTC 2019
New revision: 353118
ZFS: fix several of the "zpool create" tests
* Remove zpool_create_013_neg. FreeBSD doesn't have an equivalent of
Solaris's metadevices. GEOM would be the equivalent, but since all geoms
are the same from ZFS's perspective, this test would be redundant with
* Remove zpool_create_014_neg. FreeBSD does not support swapping to regular
* Remove zpool_create_016_pos. This test is redundant with literally every
other test that creates a disk-backed pool.
* s:/etc/vfstab:/etc/fstab in zpool_create_011_neg
* Delete the VTOC-related portion of zpool_create_008_pos. FreeBSD doesn't
* Replace dumpadm with dumpon and swap with swapon in multiple tests.
* In zpool_create_015_neg, don't require "zpool create -n" to fail. It's
reasonable for that variant to succeed, because it doesn't actually open
* Greatly simplify zpool_create_012_neg. Make it safer, too, but not
interfering with the system's regular swap devices.
* Expect zpool_create_011_neg to fail (PR 241070)
* Delete some redundant cleanup steps in various tests
* Remove some unneeeded ATF timeout specifications. The default is fine.
MFC after: 2 weeks
Sponsored by: Axcient