zpool create fails on gpart device

Kurt Touet ktouet at gmail.com
Sun Dec 6 19:34:15 UTC 2009


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


More information about the freebsd-fs mailing list