Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 May 2019 00:38:09 +0000
From:      bugzilla-noreply@freebsd.org
To:        fs@FreeBSD.org
Subject:   [Bug 238112] Unable to create ZVOL
Message-ID:  <bug-238112-3630@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D238112

            Bug ID: 238112
           Summary: Unable to create ZVOL
           Product: Base System
           Version: 11.2-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: eugen@freebsd.org
                CC: allanjude@FreeBSD.org, fs@FreeBSD.org,
                    markj@FreeBSD.org, mav@FreeBSD.org

A colleague of mine is testing his set of virtual machines under FreeBSD
11.2-STABLE using bhyve (sysutils/vm-bhyve specifically) over GELI-encrypted
non-boot ZFS pool with multiple ZVOLs and faced a problem.

After GELI attached the pool, kernel part of ZFS tastes its internals and
writes to dmesg:

ZFS WARNING: Unable to create ZVOL
sata/vm/ws2019tmplENhalts/C@20190524-225700-before-1st-reboot (error=3D63).

The dataset has recommended volmode=3Ddev.

In sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c the function
zvol_create_minor() prepends mentioned long name of dataset with prefix "zv=
ol/"
and calls make_dev_s() from sys/kern/kern_conf.c that is a wrapper for
make_dev_sv() failing with ENAMETOOLONG (63).

make_dev_sv() uses prep_devname() that returns this error if total length is
more than sizeof(dev->si_name) - 1 that equals to SPECNAMELEN defined to 63=
. So
ZVOL name length is effectively limited to 58 octets due to "zvol/" prefix.

Warning message quoted above is too cryptic for user and this limit is obsc=
ure
and seems to be FreeBSD-specific. Please change the code to test for
ENAMETOOLONG  and issue a warning describing the problem more clearly.

Also, consider replacing kernel printf() with more useful logging like log(=
) so
the warning would hit syslog and get to /var/log/console.log (if enabled) a=
nd
not dmesg buffer only.

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-238112-3630>