Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

zpool create fails on gpart device

22 views
Skip to first unread message

Kurt Touet

unread,
Dec 6, 2009, 2:34:13 PM12/6/09
to
I've been interested in using a gptzfsboot setup on a few of my
systems, and thought I'd try it out in a VM first, but I'm blocked at
creating a zpool. Here's what I did:

- create a new VM with 2 drives (da0 & da1)
- install 8.0R amd64
- install subversion from sysinstall & checkout base/head
- build & install -current

Instead of creating a gptzfsboot install disc, I thought I'd just
create the zpool on the second drive, install things to there, and
then make the VM boot off the second drive afterwards (and remove the
first). I was following the
http://blogs.freebsdish.org/lulf/2008/12/16/setting-up-a-zfs-only-system/
guide, and got to this stage:

# gpart create -s GPT da1
# gpart add -b 34 -s 128 -t freebsd-boot da1
# gpart add -b 162 -s 5242880 -t freebsd-swap da1
# gpart add -b 5243042 -s 57671485 -t freebsd-zfs da1
# gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da1

# gpart show da1
=> 34 62914493 da1 GPT (30G)
34 128 1 freebsd-boot (64K)
162 5242880 2 freebsd-swap (2.5G)
5243042 57671485 3 freebsd-zfs (27G)

# zpool create data /dev/da1p3
cannot create 'data': permission denied
Dec 6 13:30:23 freebase root: ZFS: vdev failure, zpool=data
type=vdev.open_failed

I believe that this is a zpool related issue because the following then works:
# newfs /dev/da1p3
/dev/da1p3: 28159.9MB (57671484 sectors) block size 16384, fragment size 2048
using 154 cylinder groups of 183.72MB, 11758 blks, 23552 inodes.
super-block backups (for fsck -b #) at:
160, 376416, 752672, 1128928, 1505184, 1881440, 2257696, 2633952,
3010208, 3386464, 3762720,
4138976, 4515232, 4891488, 5267744, 5644000, 6020256, 6396512,
6772768, 7149024, 7525280, 7901536,
8277792, 8654048, 9030304, 9406560, 9782816, 10159072, 10535328,
10911584, 11287840, 11664096,
12040352, 12416608, 12792864, 13169120, 13545376, 13921632, 14297888,
14674144, 15050400,
15426656, 15802912, 16179168, 16555424, 16931680, 17307936, 17684192,
18060448, 18436704,
18812960, 19189216, 19565472, 19941728, 20317984, 20694240, 21070496,
21446752, 21823008,
22199264, 22575520, 22951776, 23328032, 23704288, 24080544, 24456800,
24833056, 25209312,
25585568, 25961824, 26338080, 26714336, 27090592, 27466848, 27843104,
28219360, 28595616,
28971872, 29348128, 29724384, 30100640, 30476896, 30853152, 31229408,
31605664, 31981920,
32358176, 32734432, 33110688, 33486944, 33863200, 34239456, 34615712,
34991968, 35368224,
35744480, 36120736, 36496992, 36873248, 37249504, 37625760, 38002016,
38378272, 38754528,
39130784, 39507040, 39883296, 40259552, 40635808, 41012064, 41388320,
41764576, 42140832,
42517088, 42893344, 43269600, 43645856, 44022112, 44398368, 44774624,
45150880, 45527136,
45903392, 46279648, 46655904, 47032160, 47408416, 47784672, 48160928,
48537184, 48913440,
49289696, 49665952, 50042208, 50418464, 50794720, 51170976, 51547232,
51923488, 52299744,
52676000, 53052256, 53428512, 53804768, 54181024, 54557280, 54933536,
55309792, 55686048,
56062304, 56438560, 56814816, 57191072, 57567328
# mkdir /test
# mount /dev/da1p3 /test
# df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/da0s1a 496M 259M 197M 57% /
devfs 1.0K 1.0K 0B 100% /dev
/dev/da0s1e 496M 5.1M 451M 1% /tmp
/dev/da0s1f 8.8G 3.1G 4.9G 39% /usr
/dev/da0s1d 1.9G 1.0M 1.8G 0% /var
/dev/da1p3 27G 4.0K 24G 0% /test


Any help would be appreciated.

Thanks,
-kurt
_______________________________________________
freeb...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-fs
To unsubscribe, send any mail to "freebsd-fs-...@freebsd.org"

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-...@muc.de

Pawel Jakub Dawidek

unread,
Dec 7, 2009, 2:10:48 PM12/7/09
to

Can you ktrace this?

--
Pawel Jakub Dawidek http://www.wheel.pl
p...@FreeBSD.org http://www.FreeBSD.org
FreeBSD committer Am I Evil? Yes, I Am!

Kurt Touet

unread,
Dec 7, 2009, 3:03:09 PM12/7/09
to
On Mon, Dec 7, 2009 at 1:10 PM, Pawel Jakub Dawidek <p...@freebsd.org> wrote:
> On Sun, Dec 06, 2009 at 01:34:13PM -0600, Kurt Touet wrote:
> Can you ktrace this?
>
> --
> Pawel Jakub Dawidek                       http://www.wheel.pl
> p...@FreeBSD.org                           http://www.FreeBSD.org
> FreeBSD committer                         Am I Evil? Yes, I Am!
>

If more than this snippet is of interest, let me know.

5665 zpool CALL readlink(0x8010ee6bb,0x7fffffffa610,0x400)
5665 zpool NAMI "/etc/malloc.conf"
5665 zpool RET readlink -1 errno 2 No such file or directory
5665 zpool CALL issetugid
5665 zpool RET issetugid 0
5665 zpool CALL break(0x600000)
5665 zpool RET break 0
5665 zpool CALL
__sysctl(0x7fffffffa830,0x2,0x7fffffffa84c,0x7fffffffa840,0,0)
5665 zpool SCTL "kern.osreldate"
5665 zpool RET __sysctl 0
5665 zpool CALL
mmap(0,0x200000,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,0xffffffff,0)
5665 zpool RET mmap 19079168/0x801232000
5665 zpool CALL
mmap(0x801432000,0x1ce000,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,0xffffffff,0)
5665 zpool RET mmap 21176320/0x801432000
5665 zpool CALL munmap(0x801232000,0x1ce000)
5665 zpool RET munmap 0
5665 zpool CALL open(0x800783661,O_RDWR,<unused>0)
5665 zpool NAMI "/dev/zfs"
5665 zpool RET open 3
5665 zpool CALL open(0x80078366a,O_RDONLY,<unused>0x1b6)
5665 zpool NAMI "/dev/null"
5665 zpool RET open 4
5665 zpool CALL open(0x800782e7d,O_RDONLY,<unused>0x1b6)
5665 zpool NAMI "/etc/zfs/exports"
5665 zpool RET open 5
5665 zpool CALL open(0x7fffffffedba,O_RDONLY,<unused>0)
5665 zpool NAMI "/dev/da1p3"
5665 zpool RET open 6
5665 zpool CALL ioctl(0x6,DIOCGSECTORSIZE,0x7fffffff9de4)
5665 zpool RET ioctl 0
5665 zpool CALL close(0x6)
5665 zpool RET close 0
5665 zpool CALL open(0x7fffffff9ff0,O_RDONLY,<unused>0x1411040)
5665 zpool NAMI "/dev/da1p3"
5665 zpool RET open 6
5665 zpool CALL close(0x6)
5665 zpool RET close 0
5665 zpool CALL open(0x7fffffff94c0,O_RDONLY,<unused>0)
5665 zpool NAMI "/dev/da1p3"
5665 zpool RET open 6
5665 zpool CALL fstat(0x6,0x7fffffff92a0)
5665 zpool STRU struct stat {dev=100728576, ino=101,
mode=crw-r----- , nlink=1, uid=0, gid=5, rdev=101, atime=1260215299,
stime=1260215299, ctime=1260215299, birthtime=-1, size=0,
blksize=4096, blocks=0, flags=0x0 }
5665 zpool RET fstat 0
5665 zpool CALL pread(0x6,0x801415000,0x40000,0)
5665 zpool GIO fd 6 read 4096 bytes
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\

.... snip ....

\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
\0"
5665 zpool RET pread 262144/0x40000
5665 zpool CALL pread(0x6,0x801415000,0x40000,0x40000)
5665 zpool GIO fd 6 read 4096 bytes
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\

.... snip ....

\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
\0"
5665 zpool RET pread 262144/0x40000
5665 zpool CALL pread(0x6,0x801415000,0x40000,0xfffffffffff80000)
5665 zpool RET pread -1 errno 5 Input/output error
5665 zpool CALL pread(0x6,0x801415000,0x40000,0xfffffffffffc0000)
5665 zpool RET pread -1 errno 5 Input/output error
5665 zpool CALL close(0x6)
5665 zpool RET close 0
5665 zpool CALL stat(0x7fffffffa670,0x7fffffffa590)
5665 zpool NAMI "/data"
5665 zpool RET stat -1 errno 2 No such file or directory
5665 zpool CALL ioctl(0x3,0xcc285a00 ,0x7fffffff9570)
5665 zpool RET ioctl -1 errno 13 Permission denied
5665 zpool CALL write(0x2,0x7fffffff8d80,0x28)
5665 zpool GIO fd 2 wrote 40 bytes


"cannot create 'data': permission denied
"

5665 zpool RET write 40/0x28
5665 zpool CALL close(0x3)
5665 zpool RET close 0
5665 zpool CALL close(0x4)
5665 zpool RET close 0
5665 zpool CALL close(0x5)
5665 zpool RET close 0

Pawel Jakub Dawidek

unread,
Dec 7, 2009, 3:40:12 PM12/7/09
to

Ok, I guess this is HEAD, right? I think you just had bad luck.

I break this here:

Date: Sat Dec 5 14:24:22 2009
New Revision: 200125

And fixed here:

Date: Sat Dec 5 20:16:28 2009
New Revision: 200158

It looks like you get the source from this window.

Please rebuild with r200158 in place and retry. Sorry for the breakage.

Kurt Touet

unread,
Dec 7, 2009, 3:59:04 PM12/7/09
to
On Mon, Dec 7, 2009 at 2:40 PM, Pawel Jakub Dawidek <p...@freebsd.org> wrote:
> On Mon, Dec 07, 2009 at 02:03:09PM -0600, Kurt Touet wrote:
> Ok, I guess this is HEAD, right? I think you just had bad luck.
>
> I break this here:
>
>        Date: Sat Dec  5 14:24:22 2009
>        New Revision: 200125
>
> And fixed here:
>
>        Date: Sat Dec  5 20:16:28 2009
>        New Revision: 200158
>
> It looks like you get the source from this window.
>
> Please rebuild with r200158 in place and retry. Sorry for the breakage.
>
> --
> Pawel Jakub Dawidek                       http://www.wheel.pl
> p...@FreeBSD.org                           http://www.FreeBSD.org
> FreeBSD committer                         Am I Evil? Yes, I Am!
>

I think I managed to miss that -- I'm running FreeBSD 9.0-CURRENT #0
r200177 amd64. But, I will update again and see if that solves the
problem.

Kurt Touet

unread,
Dec 8, 2009, 12:06:18 AM12/8/09
to
On Mon, Dec 7, 2009 at 2:59 PM, Kurt Touet <kto...@gmail.com> wrote:

> On Mon, Dec 7, 2009 at 2:40 PM, Pawel Jakub Dawidek <p...@freebsd.org> wrote:
>> On Mon, Dec 07, 2009 at 02:03:09PM -0600, Kurt Touet wrote:
>> Ok, I guess this is HEAD, right? I think you just had bad luck.
>>
>> I break this here:
>>
>>        Date: Sat Dec  5 14:24:22 2009
>>        New Revision: 200125
>>
>> And fixed here:
>>
>>        Date: Sat Dec  5 20:16:28 2009
>>        New Revision: 200158
>>
>> It looks like you get the source from this window.
>>
>> Please rebuild with r200158 in place and retry. Sorry for the breakage.
>>
>> --
>> Pawel Jakub Dawidek                       http://www.wheel.pl
>> p...@FreeBSD.org                           http://www.FreeBSD.org
>> FreeBSD committer                         Am I Evil? Yes, I Am!
>>
>
> I think I managed to miss that -- I'm running FreeBSD 9.0-CURRENT #0
> r200177 amd64.  But, I will update again and see if that solves the
> problem.
>

I've updated to r200237 and I am getting the same error. Is there
another way that I can go about troubleshooting this?

Thanks,
-kurt

Pawel Jakub Dawidek

unread,
Dec 8, 2009, 5:28:05 AM12/8/09
to
On Mon, Dec 07, 2009 at 11:06:18PM -0600, Kurt Touet wrote:
> I've updated to r200237 and I am getting the same error. Is there
> another way that I can go about troubleshooting this?

I looked at you ktrace closly. Your zpool calls pread(2) four times on
your partition, where in my ktrace I see only one pread(2). Also two of
the pread(2) have invalid offset and get EIO.

Could you show the output of:

# diskinfo -v /dev/da1{,p3}

Try setting vfs.zfs.debug to 2, then retry the creation and watch logs.

Kurt Touet

unread,
Dec 8, 2009, 2:37:29 PM12/8/09
to

/dev/da1
512 # sectorsize
32212254720 # mediasize in bytes (30G)
62914560 # mediasize in sectors
3916 # Cylinders according to firmware.
255 # Heads according to firmware.
63 # Sectors according to firmware.
# Disk ident.

/dev/da1p3
512 # sectorsize
29527800320 # mediasize in bytes (27G)
57671485 # mediasize in sectors
3589 # Cylinders according to firmware.
255 # Heads according to firmware.
63 # Sectors according to firmware.
# Disk ident.

# zpool create data /dev/da1p3
cannot create 'data': permission denied

logs:

kernel: vdev_geom_open_by_path:466[1]: Found provider by name /dev/da1p3.
kernel: vdev_geom_attach:112[1]: Attaching to da1p3.
kernel: vdev_geom_attach:133[1]: Created geom and consumer for da1p3.
kernel: vdev_geom_read_guid:301[1]: Reading guid from da1p3...
kernel: vdev_geom_detach:173[1]: Closing access to da1p3.
kernel: vdev_geom_detach:177[1]: Destroyed consumer to da1p3.
kernel: vdev_geom_detach:185[1]: Destroyed geom zfs::vdev.
kernel: vdev_geom_open_by_path:477[1]: guid mismatch for provider
/dev/da1p3: 16452466135488744636 != 0.
kernel: vdev_geom_open_by_guid:435[1]: Searching by guid [16452466135488744636].
kernel: vdev_geom_read_guid:301[1]: Reading guid from acd0t01...
kernel: vdev_geom_read_guid:301[1]: Reading guid from acd0...
kernel: vdev_geom_read_guid:301[1]: Reading guid from da1p3...
kernel: vdev_geom_read_guid:301[1]: Reading guid from da1p2...
kernel: vdev_geom_read_guid:301[1]: Reading guid from da1p1...
kernel: vdev_geom_read_guid:301[1]: Reading guid from da0s1f...
kernel: vdev_geom_read_guid:301[1]: Reading guid from da0s1e...
kernel: vdev_geom_read_guid:301[1]: Reading guid from da0s1d...
kernel: vdev_geom_read_guid:301[1]: Reading guid from da0s1b...
kernel: vdev_geom_read_guid:301[1]: Reading guid from da0s1a...
kernel: vdev_geom_read_guid:301[1]: Reading guid from da0s1...
kernel: vdev_geom_read_guid:301[1]: Reading guid from da1...
kernel: vdev_geom_read_guid:301[1]: Reading guid from da0...
kernel: vdev_geom_read_guid:301[1]: Reading guid from
gptid/78398fed-e369-11de-a6aa-000c298c3c39...
kernel: vdev_geom_read_guid:301[1]: Reading guid from ufsid/4b1c06d3f7579615...
kernel: vdev_geom_read_guid:301[1]: Reading guid from
gptid/663a8d5a-e293-11de-a6aa-000c298c3c39...
kernel: vdev_geom_read_guid:301[1]: Reading guid from
gptid/5ec68721-e293-11de-a6aa-000c298c3c39...
kernel: vdev_geom_read_guid:301[1]: Reading guid from iso9660/FreeBSD_Install...
kernel: vdev_geom_open_by_guid:449[1]: Search by guid
[16452466135488744636] failed.
kernel: vdev_geom_open_by_path:466[1]: Found provider by name /dev/da1p3.
kernel: vdev_geom_attach:112[1]: Attaching to da1p3.
kernel: vdev_geom_open:521[1]: Provider /dev/da1p3 not found.


root: ZFS: vdev failure, zpool=data type=vdev.open_failed

Pawel Jakub Dawidek

unread,
Dec 8, 2009, 4:23:55 PM12/8/09
to
On Tue, Dec 08, 2009 at 01:37:29PM -0600, Kurt Touet wrote:
> kernel: vdev_geom_read_guid:301[1]: Reading guid from iso9660/FreeBSD_Install...
> kernel: vdev_geom_open_by_guid:449[1]: Search by guid [16452466135488744636] failed.
> kernel: vdev_geom_open_by_path:466[1]: Found provider by name /dev/da1p3.
> kernel: vdev_geom_attach:112[1]: Attaching to da1p3.
> kernel: vdev_geom_open:521[1]: Provider /dev/da1p3 not found.
> root: ZFS: vdev failure, zpool=data type=vdev.open_failed

I don't see how you can run with the fix I committed.

With the fix there should be two such messages:

vdev_geom_open_by_path:466[1]: Found provider by name /dev/da1p3.

One when checking by name+guid and one when checking by name only.
In you logs there is only one such message, so you are clearly running
without my latest fix.

Could you paste the output of:

% grep -n vdev_geom_open_by_path /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c

Kurt Touet

unread,
Dec 8, 2009, 5:17:53 PM12/8/09
to
On Tue, Dec 8, 2009 at 3:23 PM, Pawel Jakub Dawidek <p...@freebsd.org> wrote:
> On Tue, Dec 08, 2009 at 01:37:29PM -0600, Kurt Touet wrote:
>> kernel: vdev_geom_read_guid:301[1]: Reading guid from iso9660/FreeBSD_Install...
>> kernel: vdev_geom_open_by_guid:449[1]: Search by guid [16452466135488744636] failed.
>> kernel: vdev_geom_open_by_path:466[1]: Found provider by name /dev/da1p3.
>> kernel: vdev_geom_attach:112[1]: Attaching to da1p3.
>> kernel: vdev_geom_open:521[1]: Provider /dev/da1p3 not found.
>> root: ZFS: vdev failure, zpool=data type=vdev.open_failed
>
> I don't see how you can run with the fix I committed.
>
> With the fix there should be two such messages:
>
> vdev_geom_open_by_path:466[1]: Found provider by name /dev/da1p3.
>
> One when checking by name+guid and one when checking by name only.
> In you logs there is only one such message, so you are clearly running
> without my latest fix.
>
> Could you paste the output of:
>
>        % grep -n vdev_geom_open_by_path /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
>
> --
> Pawel Jakub Dawidek                       http://www.wheel.pl
> p...@FreeBSD.org                           http://www.FreeBSD.org
> FreeBSD committer                         Am I Evil? Yes, I Am!
>

# uname -a
FreeBSD freebase 9.0-CURRENT FreeBSD 9.0-CURRENT #1 r200237: Mon Dec
7 22:17:59 CST 2009 k@freebase:/usr/obj/usr/src/sys/GENERIC amd64

# grep -n vdev_geom_open_by_path
/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
456:vdev_geom_open_by_path(vdev_t *vd, int check_guid)
509: cp = vdev_geom_open_by_path(vd, 1);
519: cp = vdev_geom_open_by_path(vd, 0);

# svn info /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
Path: /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
Name: vdev_geom.c
URL: svn://svn.freebsd.org/base/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
Repository Root: svn://svn.freebsd.org/base
Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revision: 200237
Node Kind: file
Schedule: normal
Last Changed Author: pjd
Last Changed Rev: 200158
Last Changed Date: 2009-12-05 14:16:28 -0600 (Sat, 05 Dec 2009)
Text Last Updated: 2009-12-05 23:53:15 -0600 (Sat, 05 Dec 2009)
Checksum: c1ca9bb1684c2aba028feb187af8de03

Pawel Jakub Dawidek

unread,
Dec 8, 2009, 6:20:46 PM12/8/09
to
On Tue, Dec 08, 2009 at 01:37:29PM -0600, Kurt Touet wrote:
> kernel: vdev_geom_open_by_path:466[1]: Found provider by name /dev/da1p3.
> kernel: vdev_geom_attach:112[1]: Attaching to da1p3.
> kernel: vdev_geom_attach:133[1]: Created geom and consumer for da1p3.
> kernel: vdev_geom_read_guid:301[1]: Reading guid from da1p3...
> kernel: vdev_geom_detach:173[1]: Closing access to da1p3.
> kernel: vdev_geom_detach:177[1]: Destroyed consumer to da1p3.
> kernel: vdev_geom_detach:185[1]: Destroyed geom zfs::vdev.
[...]

> kernel: vdev_geom_open_by_guid:449[1]: Search by guid [16452466135488744636] failed.
> kernel: vdev_geom_open_by_path:466[1]: Found provider by name /dev/da1p3.
> kernel: vdev_geom_attach:112[1]: Attaching to da1p3.
> kernel: vdev_geom_open:521[1]: Provider /dev/da1p3 not found.
> root: ZFS: vdev failure, zpool=data type=vdev.open_failed

Actually I was wrong previously. You do have two those messages, there
is just a log of other debug in-between.

To diagnose this further, you could try this patch:

http://people.freebsd.org/~pjd/patches/vdev_geom.c.patch

And try to recreate with vfs.zfs.debug set to 1?

Kurt Touet

unread,
Dec 8, 2009, 11:24:22 PM12/8/09
to
On Tue, Dec 8, 2009 at 5:20 PM, Pawel Jakub Dawidek <p...@freebsd.org> wrote:
> On Tue, Dec 08, 2009 at 01:37:29PM -0600, Kurt Touet wrote:
>> kernel: vdev_geom_open_by_path:466[1]: Found provider by name /dev/da1p3.
>> kernel: vdev_geom_attach:112[1]: Attaching to da1p3.
>> kernel: vdev_geom_attach:133[1]: Created geom and consumer for da1p3.
>> kernel: vdev_geom_read_guid:301[1]: Reading guid from da1p3...
>> kernel: vdev_geom_detach:173[1]: Closing access to da1p3.
>> kernel: vdev_geom_detach:177[1]: Destroyed consumer to da1p3.
>> kernel: vdev_geom_detach:185[1]: Destroyed geom zfs::vdev.
> [...]
>> kernel: vdev_geom_open_by_guid:449[1]: Search by guid [16452466135488744636] failed.
>> kernel: vdev_geom_open_by_path:466[1]: Found provider by name /dev/da1p3.
>> kernel: vdev_geom_attach:112[1]: Attaching to da1p3.
>> kernel: vdev_geom_open:521[1]: Provider /dev/da1p3 not found.
>> root: ZFS: vdev failure, zpool=data type=vdev.open_failed
>
> Actually I was wrong previously. You do have two those messages, there
> is just a log of other debug in-between.
>
> To diagnose this further, you could try this patch:
>
>        http://people.freebsd.org/~pjd/patches/vdev_geom.c.patch
>
> And try to recreate with vfs.zfs.debug set to 1?
>
> --
> Pawel Jakub Dawidek                       http://www.wheel.pl
> p...@FreeBSD.org                           http://www.FreeBSD.org
> FreeBSD committer                         Am I Evil? Yes, I Am!
>

Sure thing:

kernel: vdev_geom_open_by_path:472[1]: Found provider by name /dev/da1p3.


kernel: vdev_geom_attach:112[1]: Attaching to da1p3.

kernel: vdev_geom_attach:135[1]: Created geom and consumer for da1p3.
kernel: vdev_geom_read_guid:307[1]: Reading guid from da1p3...
kernel: vdev_geom_detach:179[1]: Closing access to da1p3.
kernel: vdev_geom_detach:183[1]: Destroyed consumer to da1p3.
kernel: vdev_geom_detach:191[1]: Destroyed geom zfs::vdev.
kernel: vdev_geom_open_by_path:483[1]: guid mismatch for provider
/dev/da1p3: 8873377865615214901 != 0.
kernel: vdev_geom_open_by_guid:441[1]: Searching by guid [8873377865615214901].
kernel: vdev_geom_read_guid:307[1]: Reading guid from acd0t01...
kernel: vdev_geom_read_guid:307[1]: Reading guid from acd0...
kernel: vdev_geom_read_guid:307[1]: Reading guid from da1p3...
kernel: vdev_geom_read_guid:307[1]: Reading guid from da1p2...
kernel: vdev_geom_read_guid:307[1]: Reading guid from da1p1...
kernel: vdev_geom_read_guid:307[1]: Reading guid from da0s1f...
kernel: vdev_geom_read_guid:307[1]: Reading guid from da0s1e...
kernel: vdev_geom_read_guid:307[1]: Reading guid from da0s1d...
kernel: vdev_geom_read_guid:307[1]: Reading guid from da0s1b...
kernel: vdev_geom_read_guid:307[1]: Reading guid from da0s1a...
kernel: vdev_geom_read_guid:307[1]: Reading guid from da0s1...
kernel: vdev_geom_read_guid:307[1]: Reading guid from da1...
kernel: vdev_geom_read_guid:307[1]: Reading guid from da0...
kernel: vdev_geom_read_guid:307[1]: Reading guid from
gptid/78398fed-e369-11de-a6aa-000c298c3c39...
kernel: vdev_geom_read_guid:307[1]: Reading guid from ufsid/4b1c06d3f7579615...
kernel: vdev_geom_read_guid:307[1]: Reading guid from
gptid/663a8d5a-e293-11de-a6aa-000c298c3c39...
kernel: vdev_geom_read_guid:307[1]: Reading guid from
gptid/5ec68721-e293-11de-a6aa-000c298c3c39...
kernel: vdev_geom_read_guid:307[1]: Reading guid from iso9660/FreeBSD_Install...
kernel: vdev_geom_open_by_guid:455[1]: Search by guid
[8873377865615214901] failed.
kernel: vdev_geom_open_by_path:472[1]: Found provider by name /dev/da1p3.


kernel: vdev_geom_attach:112[1]: Attaching to da1p3.

kernel: vdev_geom_attach:132[1]: g_access() failed
kernel: vdev_geom_open:527[1]: Provider /dev/da1p3 not found.


root: ZFS: vdev failure, zpool=data type=vdev.open_failed

Does 132[1]: g_access() failed help you out?

-kurt

Pawel Jakub Dawidek

unread,
Dec 9, 2009, 3:36:31 AM12/9/09
to
On Tue, Dec 08, 2009 at 10:24:22PM -0600, Kurt Touet wrote:
> kernel: vdev_geom_open_by_path:472[1]: Found provider by name /dev/da1p3.
> kernel: vdev_geom_attach:112[1]: Attaching to da1p3.
> kernel: vdev_geom_attach:132[1]: g_access() failed
> kernel: vdev_geom_open:527[1]: Provider /dev/da1p3 not found.
> root: ZFS: vdev failure, zpool=data type=vdev.open_failed
>
> Does 132[1]: g_access() failed help you out?

We are getting closer:)

I'd need the output of those command:

# gpart list da1 | grep -A3 'Name: da1p3' | tail -1
# sysctl -b kern.geom.confxml

If the first command gives you 'r0w0e0' then we would need this updated
patch:

http://people.freebsd.org/~pjd/patches/vdev_geom.c.patch

It looks like when your pool is trying to open provider it is already
open by someone else. This is strange, because you said you can newfs
and mount it without problems, so maybe something opens it temporairly.

Kurt Touet

unread,
Dec 9, 2009, 2:17:48 PM12/9/09
to
On Wed, Dec 9, 2009 at 2:36 AM, Pawel Jakub Dawidek <p...@freebsd.org> wrote:

> On Tue, Dec 08, 2009 at 10:24:22PM -0600, Kurt Touet wrote:
>> kernel: vdev_geom_open_by_path:472[1]: Found provider by name /dev/da1p3.
>> kernel: vdev_geom_attach:112[1]: Attaching to da1p3.
>> kernel: vdev_geom_attach:132[1]: g_access() failed
>> kernel: vdev_geom_open:527[1]: Provider /dev/da1p3 not found.
>> root: ZFS: vdev failure, zpool=data type=vdev.open_failed
>>
>> Does 132[1]: g_access() failed   help you out?
>
> We are getting closer:)
>
> I'd need the output of those command:
>
>        # gpart list da1 | grep -A3 'Name: da1p3' | tail -1
>        # sysctl -b kern.geom.confxml
>
> If the first command gives you 'r0w0e0' then we would need this updated
> patch:
>
>        http://people.freebsd.org/~pjd/patches/vdev_geom.c.patch
>
> It looks like when your pool is trying to open provider it is already
> open by someone else. This is strange, because you said you can newfs
> and mount it without problems, so maybe something opens it temporairly.
>
> --
> Pawel Jakub Dawidek                       http://www.wheel.pl
> p...@FreeBSD.org                           http://www.FreeBSD.org
> FreeBSD committer                         Am I Evil? Yes, I Am!
>

# gpart list da1 | grep -A3 'Name: da1p3' | tail -1
Mode: r0w0e0

The output from sysctl -b kern.geom.confxml is attached.

I will grab the patch and send back results from that later today.
-kurt

Kurt Touet

unread,
Dec 9, 2009, 4:20:31 PM12/9/09
to
On Wed, Dec 9, 2009 at 1:17 PM, Kurt Touet <kto...@gmail.com> wrote:
> On Wed, Dec 9, 2009 at 2:36 AM, Pawel Jakub Dawidek <p...@freebsd.org> wrote:

>> On Tue, Dec 08, 2009 at 10:24:22PM -0600, Kurt Touet wrote:
>>> kernel: vdev_geom_open_by_path:472[1]: Found provider by name /dev/da1p3.
>>> kernel: vdev_geom_attach:112[1]: Attaching to da1p3.
>>> kernel: vdev_geom_attach:132[1]: g_access() failed
>>> kernel: vdev_geom_open:527[1]: Provider /dev/da1p3 not found.
>>> root: ZFS: vdev failure, zpool=data type=vdev.open_failed
>>>
>>> Does 132[1]: g_access() failed   help you out?
>>
>> We are getting closer:)
>>
>> I'd need the output of those command:
>>
>>        # gpart list da1 | grep -A3 'Name: da1p3' | tail -1
>>        # sysctl -b kern.geom.confxml
>>
>> If the first command gives you 'r0w0e0' then we would need this updated
>> patch:
>>
>>        http://people.freebsd.org/~pjd/patches/vdev_geom.c.patch
>>
>> It looks like when your pool is trying to open provider it is already
>> open by someone else. This is strange, because you said you can newfs
>> and mount it without problems, so maybe something opens it temporairly.
>>
>> --
>> Pawel Jakub Dawidek                       http://www.wheel.pl
>> p...@FreeBSD.org                           http://www.FreeBSD.org
>> FreeBSD committer                         Am I Evil? Yes, I Am!
>>
>
> # gpart list da1 | grep -A3 'Name: da1p3' | tail -1
>   Mode: r0w0e0
>
> The output from sysctl -b kern.geom.confxml is attached.
>
> I will grab the patch and send back results from that later today.
> -kurt
>

With the patch:

# sysctl vfs.zfs.debug=1
vfs.zfs.debug: 0 -> 1

# zpool create data /dev/da1p3
cannot create 'data': permission denied

kernel: vdev_geom_open_by_path:487[1]: Found provider by name /dev/da1p3.


kernel: vdev_geom_attach:112[1]: Attaching to da1p3.

kernel: vdev_geom_attach:140[1]: Created geom and consumer for da1p3.
kernel: vdev_geom_read_guid:322[1]: Reading guid from da1p3...
kernel: vdev_geom_detach:194[1]: Closing access to da1p3.
kernel: vdev_geom_detach:198[1]: Destroyed consumer to da1p3.
kernel: vdev_geom_detach:206[1]: Destroyed geom zfs::vdev.
kernel: vdev_geom_open_by_path:498[1]: guid mismatch for provider
/dev/da1p3: 9777046094809499960 != 0.
kernel: vdev_geom_open_by_guid:456[1]: Searching by guid [9777046094809499960].
kernel: vdev_geom_read_guid:322[1]: Reading guid from acd0t01...
kernel: vdev_geom_read_guid:322[1]: Reading guid from acd0...
kernel: vdev_geom_read_guid:322[1]: Reading guid from da1p3...
kernel: vdev_geom_read_guid:322[1]: Reading guid from da1p2...
kernel: vdev_geom_read_guid:322[1]: Reading guid from da1p1...
kernel: vdev_geom_read_guid:322[1]: Reading guid from da0s1f...
kernel: vdev_geom_read_guid:322[1]: Reading guid from da0s1e...
kernel: vdev_geom_read_guid:322[1]: Reading guid from da0s1d...
kernel: vdev_geom_read_guid:322[1]: Reading guid from da0s1b...
kernel: vdev_geom_read_guid:322[1]: Reading guid from da0s1a...
kernel: vdev_geom_read_guid:322[1]: Reading guid from da0s1...
kernel: vdev_geom_read_guid:322[1]: Reading guid from da1...
kernel: vdev_geom_read_guid:322[1]: Reading guid from da0...
kernel: vdev_geom_read_guid:322[1]: Reading guid from
gptid/78398fed-e369-11de-a6aa-000c298c3c39...
kernel: vdev_geom_read_guid:322[1]: Reading guid from ufsid/4b1c06d3f7579615...
kernel: vdev_geom_read_guid:322[1]: Reading guid from
gptid/663a8d5a-e293-11de-a6aa-000c298c3c39...
kernel: vdev_geom_read_guid:322[1]: Reading guid from
gptid/5ec68721-e293-11de-a6aa-000c298c3c39...
kernel: vdev_geom_read_guid:322[1]: Reading guid from iso9660/FreeBSD_Install...
kernel: vdev_geom_open_by_guid:470[1]: Search by guid
[9777046094809499960] failed.
kernel: vdev_geom_open_by_path:487[1]: Found provider by name /dev/da1p3.


kernel: vdev_geom_attach:112[1]: Attaching to da1p3.
kernel: vdev_geom_attach:132[1]: g_access() failed

kernel: vdev_geom_attach:136[1]: cp=0xffffff0002b70480 r0w0e0
geom=zfs::vdev class=ZFS::VDEV
kernel: vdev_geom_attach:136[1]: cp=0xffffff000263bd00 r1w0e1
geom=da1p3 class=LABEL
kernel: vdev_geom_attach:136[1]: cp=0xffffff000263bd80 r0w0e0
geom=da1p3 class=LABEL
kernel: vdev_geom_attach:136[1]: cp=0xffffff000272d180 r0w0e0
geom=da1p3 class=PART
kernel: vdev_geom_attach:136[1]: cp=0xffffff0002639580 r0w0e0
geom=da1p3 class=DEV
kernel: vdev_geom_open:542[1]: Provider /dev/da1p3 not found.


root: ZFS: vdev failure, zpool=data type=vdev.open_failed

Pawel Jakub Dawidek

unread,
Dec 9, 2009, 6:27:44 PM12/9/09
to
On Wed, Dec 09, 2009 at 03:20:31PM -0600, Kurt Touet wrote:
> With the patch:
>
> # sysctl vfs.zfs.debug=1
> vfs.zfs.debug: 0 -> 1
>
> # zpool create data /dev/da1p3
> cannot create 'data': permission denied
>
[...]
> kernel: vdev_geom_open_by_path:487[1]: Found provider by name /dev/da1p3.

> kernel: vdev_geom_attach:112[1]: Attaching to da1p3.
> kernel: vdev_geom_attach:132[1]: g_access() failed
> kernel: vdev_geom_attach:136[1]: cp=0xffffff0002b70480 r0w0e0 geom=zfs::vdev class=ZFS::VDEV
> kernel: vdev_geom_attach:136[1]: cp=0xffffff000263bd00 r1w0e1 geom=da1p3 class=LABEL

So some label keeps it open exclusively. Could you also send the output of:

# glabel list

0 new messages