From owner-freebsd-bugs@FreeBSD.ORG Tue Nov 19 18:20:00 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9165268 for ; Tue, 19 Nov 2013 18:20:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9AE712202 for ; Tue, 19 Nov 2013 18:20:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id rAJIK0RE076378 for ; Tue, 19 Nov 2013 18:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id rAJIK0oH076377; Tue, 19 Nov 2013 18:20:00 GMT (envelope-from gnats) Resent-Date: Tue, 19 Nov 2013 18:20:00 GMT Resent-Message-Id: <201311191820.rAJIK0oH076377@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Christopher Harrison Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 308361AB for ; Tue, 19 Nov 2013 18:17:54 +0000 (UTC) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2024921E8 for ; Tue, 19 Nov 2013 18:17:54 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id rAJIHrRN055495 for ; Tue, 19 Nov 2013 18:17:53 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id rAJIHrUN055493; Tue, 19 Nov 2013 18:17:53 GMT (envelope-from nobody) Message-Id: <201311191817.rAJIHrUN055493@oldred.freebsd.org> Date: Tue, 19 Nov 2013 18:17:53 GMT From: Christopher Harrison To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: kern/184092: zfs zvol devices are not appearing till after reimport of pool X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Nov 2013 18:20:00 -0000 >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 >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Nov 19 18:20:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Christopher Harrison >Release: FreeBSD 9.2-RELEASE amd64 >Organization: Great Lakes SAN >Environment: System: FreeBSD ws.glsan.com 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC 2013 root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 >Description: 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. >How-To-Repeat: 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// No device exists Export the zpool (zpool export ) import the zpool (zpool import ) The zvol device now appears under the device tree in the proper /dev/zvol area. >Fix: 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 >Release-Note: >Audit-Trail: >Unformatted: