[Bug 220186] bhyveload zfs boot broken after zfs boot change

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Jun 21 15:05:19 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220186

            Bug ID: 220186
           Summary: bhyveload zfs boot broken after zfs boot change
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: avg at FreeBSD.org

There was a recent change to the ZFS boot code that makes check all vdev labels
for the vdev configuration data.  ZFS boot code now requires information about
the disk sizes and, as a side effect, it now rejects disks with a too small
size.

That change exposed a problem in bhyveload.  Specifically, it uses fstat(2) to
check a size of a disk.  But that seems to work reliably only if the disk is a
file.  If the disk is character device, then st_size is zero and the ZFS boot
code rejects such a "zero-sized" disk.

It seems that bhyveload, cb_diskioctl() to be precise, needs to check the type
of the disk and issue a real DIOCGMEDIASIZE ioctl if it's a character device.

The emulation of illumos fstat64() in sys/cddl/compat/opensolaris/sys/stat.h
seems to be the code that can be easily reused.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list