kern/184092: zfs zvol devices are not appearing till after reimport of pool

Christopher Harrison harrison at
Tue Nov 19 18:20:00 UTC 2013

>Number:         184092
>Category:       kern
>Synopsis:       zfs zvol devices are not appearing till after reimport of pool
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 19 18:20:00 UTC 2013
>Originator:     Christopher Harrison
>Release:        FreeBSD 9.2-RELEASE amd64
Great Lakes SAN
System: FreeBSD 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC 2013 root at amd64
cloned zvol's from snapshots do not appear in dev tree.

When creating a zfs volume and snapshoting this volume the volume and snapshot appear just fine in the /dev tree (under /dev/zvol/...).   However, when creating a clone of a snapshot, the dev tree is not updated with the new clone zvol.   The only way I have been able to have the cloned zvol appear in the dev tree is to completely export the zpool and reimport it.   Once the zpool has been reimported the /dev/zvol clone device appears.

It might be related but deleted zvol snapshots also remain and continue to appear in the zvol dev tree after the zvol snapshot has been deleted.
create zfs zvol volume
snapshot the zvol volume
create a clone from the zvol volume snapshot
try to access the zvol device from the zvol device tree under /dev/zvol/<poolname>/<zvol>
No device exists
Export the zpool (zpool export <poolname>)
import the zpool (zpool import <poolname>)
The zvol device now appears under the device tree in the proper /dev/zvol area.
Pure speculation at this point:   

update the zfs clone code to check if the cloned dataset is a volume and create a new zvol device if the clone is a volume from the snapshot.

clean/reindex the zvol dev tree when zvol snapshots are destroyed or cloned


More information about the freebsd-bugs mailing list