Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 08 May 2010 20:58:46 -0500
From:      "James R. Van Artsdalen" <james-freebsd-fs2@jrv.org>
To:        freebsd-fs@freebsd.org
Subject:   ZFS doesn't mountroot: Unable to open /dev/ad4p3 for writing (error=1).
Message-ID:  <4BE616D6.7000901@jrv.org>

next in thread | raw e-mail | index | archive | help
FreeBSD 9.0-svn207742 #0: Sat May  8 17:13:06 UTC 2010
root@clunk.housenet.jrv:/usr/obj/usr/src/sys/GENERIC amd64

I am no longer able to boot my newly-created ZFS pools in a VirtualBox
VM: the "Unable to open /dev/ad4p3 for writing" error shown below
prevents the pool from being imported even though it is found.

When the pool was created it was on disk ad6, but it is now booting on
ad4: zpool.cache contains wrong disk names so the kernel finds the pool
member(s) by guid, not name.

I'm guessing that the February 4 change to vdev_geom.c may play a role:
if the disk is already exclusively write-opened by the attach-by-guid
code then perhaps the g_access that triggers the error message fails
because the disk is already open?

Also, at newlines are missing from a/some printf in that vdev_geom change.

PS. I am already aware of the FLUSH issues of running ZFS in a VM.

Trying to mount root from zfs:CLANK
vdev_geom_open_by_guid:434[1]: Searching by guid [1167978064333731518].
vdev_geom_read_guid:302[1]: Reading guid from acd0...
vdev_geom_read_guid:302[1]: Reading guid from ad4p3...
vdev_geom_read_guid:340[1]: guid for ad4p3 is 1167978064333731518
vdev_geom_attach:113[1]: Attachi67978064333731518] succeeded, provider
/dev/ad4p3.
vdev_geom_detach:174[1]: Closing access to ad4p3.
vdev_geom_detach:178[1]: Destroyed consumer to ad4p3.
vdev_geom_detach:186[1]: Destroyed geom zfs::vdev.
vdev_geom_open_by_guid:434[1]: Searching by guid [1167978064333731518].
vdev_geom_read_guid:302[1]: Reading guid from acd0...
vdev_geom_read_guid:302[1]: Reading guid from ad4p3...
vdev_geom_read_guid:340[1]: guid for ad4p3 is 1167978064333731518
vdev_geom_attach:113[1]: Attaching to ad4p3.
vdev_geom_attach:134[1]: Created geom and consumer for ad4p3.
vdev_geom_open_by_guid:445[1]: Attach by guid [1167978064333731518]
succeeded, provider /dev/ad4p3.
ZFS WARNING: Unable to open /dev/ad4p3 for writing
(error=1).vdev_geom_detach:174[1]: Closing access to ad4p3.
vdev_geom_detach:178[1]: Destroyed consumer to ad4p3.
vdev_geom_detach:186[1]: Destroyed geom zfs::vdev.
ROOT MOUNT ERROR:




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BE616D6.7000901>