zpool create fails on gpart device
Kurt Touet
ktouet at gmail.com
Mon Dec 7 20:03:11 UTC 2009
On Mon, Dec 7, 2009 at 1:10 PM, Pawel Jakub Dawidek <pjd at freebsd.org> wrote:
> On Sun, Dec 06, 2009 at 01:34:13PM -0600, Kurt Touet wrote:
>> 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
>
> Can you ktrace this?
>
> --
> Pawel Jakub Dawidek http://www.wheel.pl
> pjd at 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
More information about the freebsd-fs
mailing list