Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Dec 2009 14:03:09 -0600
From:      Kurt Touet <ktouet@gmail.com>
To:        Pawel Jakub Dawidek <pjd@freebsd.org>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: zpool create fails on gpart device
Message-ID:  <2a5e326f0912071203y35d45205n4566c1bb3260166d@mail.gmail.com>
In-Reply-To: <20091207191048.GB1795@garage.freebsd.pl>
References:  <2a5e326f0912061134s79c05e75td77e6874d409c675@mail.gmail.com> <20091207191048.GB1795@garage.freebsd.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Dec 7, 2009 at 1:10 PM, Pawel Jakub Dawidek <pjd@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. =A0Here'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). =A0I 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
>> =3D> =A0 =A0 =A034 =A062914493 =A0da1 =A0GPT =A0(30G)
>> =A0 =A0 =A0 =A0 34 =A0 =A0 =A0 128 =A0 =A01 =A0freebsd-boot =A0(64K)
>> =A0 =A0 =A0 =A0162 =A0 5242880 =A0 =A02 =A0freebsd-swap =A0(2.5G)
>> =A0 =A05243042 =A057671485 =A0 =A03 =A0freebsd-zfs =A0(27G)
>>
>> # zpool create data /dev/da1p3
>> cannot create 'data': permission denied
>
> Can you ktrace this?
>
> --
> Pawel Jakub Dawidek =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 http://ww=
w.wheel.pl
> pjd@FreeBSD.org =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 http:=
//www.FreeBSD.org
> FreeBSD committer =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Am I Ev=
il? 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,0xfffff=
fff,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=3D100728576, ino=3D101,
mode=3Dcrw-r----- , nlink=3D1, uid=3D0, gid=3D5, rdev=3D101, atime=3D126021=
5299,
stime=3D1260215299, ctime=3D1260215299, birthtime=3D-1, size=3D0,
blksize=3D4096, blocks=3D0, flags=3D0x0 }
  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



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