Hi all, I''m having trouble using ZFS in a zone the way I want to. I have a data pool, imaginatively called "pool" which I created in the global zone. I have a couple of non-global zones, one of which is called db. In the global zone I created one data set for each zone: root at andromeda216# zpool list NAME SIZE USED AVAIL CAP HEALTH ALTROOT pool 68G 352K 68.0G 0% ONLINE - root at andromeda217# zfs list NAME USED AVAIL REFER MOUNTPOINT pool 316K 67.5G 99K /pool pool/db 98.5K 67.5G 98.5K /pool/db In the db zone, I''d like to create a couple of datasets, home and data (the former is for home directories and will be mounted on /export/home, and the latter is a database, and will be mounted on /var/pgsql). Here''s the info for the db zone: root at andromeda219# zonecfg -z db info zonename: db zonepath: /export/zones/db autoboot: true pool: inherit-pkg-dir: dir: /lib inherit-pkg-dir: dir: /platform inherit-pkg-dir: dir: /sbin inherit-pkg-dir: dir: /usr net: address: 192.168.0.16 physical: e1000g0 dataset: name: pool/db The dataset attribute suggests to me that I should be able to create filesystems as a like in the db zone, but when I try it fails: root at andromeda220# zlogin db [Connected to zone ''db'' pts/3] Last login: Thu Feb 16 15:10:46 on pts/3 Sun Microsystems Inc. SunOS 5.11 snv_33 October 2007 root at db44# zfs create pool/db/data cannot create ''pool/db/data'': permission denied Can someone please tell me what I''m doing wrong? TIA, -- Rich Teer, SCNA, SCSA, OpenSolaris CAB member President, Rite Online Inc. Voice: +1 (250) 979-1638 URL: http://www.rite-group.com/rich
This is: 6381427 Cannot create filesystem in LZ, permission denied Introduced in build 33 and fixed in 34. - Eric On Thu, Feb 16, 2006 at 03:27:27PM -0800, Rich Teer wrote:> Hi all, > > I''m having trouble using ZFS in a zone the way I want to. I > have a data pool, imaginatively called "pool" which I created > in the global zone. I have a couple of non-global zones, one > of which is called db. In the global zone I created one data > set for each zone: > > root at andromeda216# zpool list > NAME SIZE USED AVAIL CAP HEALTH ALTROOT > pool 68G 352K 68.0G 0% ONLINE - > root at andromeda217# zfs list > NAME USED AVAIL REFER MOUNTPOINT > pool 316K 67.5G 99K /pool > pool/db 98.5K 67.5G 98.5K /pool/db > > In the db zone, I''d like to create a couple of datasets, home > and data (the former is for home directories and will be mounted > on /export/home, and the latter is a database, and will be > mounted on /var/pgsql). > > Here''s the info for the db zone: > > root at andromeda219# zonecfg -z db info > zonename: db > zonepath: /export/zones/db > autoboot: true > pool: > inherit-pkg-dir: > dir: /lib > inherit-pkg-dir: > dir: /platform > inherit-pkg-dir: > dir: /sbin > inherit-pkg-dir: > dir: /usr > net: > address: 192.168.0.16 > physical: e1000g0 > dataset: > name: pool/db > > The dataset attribute suggests to me that I should be able to create > filesystems as a like in the db zone, but when I try it fails: > > root at andromeda220# zlogin db > [Connected to zone ''db'' pts/3] > Last login: Thu Feb 16 15:10:46 on pts/3 > Sun Microsystems Inc. SunOS 5.11 snv_33 October 2007 > root at db44# zfs create pool/db/data > cannot create ''pool/db/data'': permission denied > > > Can someone please tell me what I''m doing wrong? > > TIA, > > -- > Rich Teer, SCNA, SCSA, OpenSolaris CAB member > > President, > Rite Online Inc. > > Voice: +1 (250) 979-1638 > URL: http://www.rite-group.com/rich > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss-- Eric Schrock, Solaris Kernel Development http://blogs.sun.com/eschrock
On 2/16/06, Rich Teer <rich.teer at rite-group.com> wrote:> Hi all, > > I''m having trouble using ZFS in a zone the way I want to. I > have a data pool, imaginatively called "pool" which I created > in the global zone. I have a couple of non-global zones, one > of which is called db. In the global zone I created one data > set for each zone: > > root at andromeda216# zpool list > NAME SIZE USED AVAIL CAP HEALTH ALTROOT > pool 68G 352K 68.0G 0% ONLINE - > root at andromeda217# zfs list > NAME USED AVAIL REFER MOUNTPOINT > pool 316K 67.5G 99K /pool > pool/db 98.5K 67.5G 98.5K /pool/db > > In the db zone, I''d like to create a couple of datasets, home > and data (the former is for home directories and will be mounted > on /export/home, and the latter is a database, and will be > mounted on /var/pgsql). > > Here''s the info for the db zone: > > root at andromeda219# zonecfg -z db info > zonename: db > zonepath: /export/zones/db > autoboot: true > pool: > inherit-pkg-dir: > dir: /lib > inherit-pkg-dir: > dir: /platform > inherit-pkg-dir: > dir: /sbin > inherit-pkg-dir: > dir: /usr > net: > address: 192.168.0.16 > physical: e1000g0 > dataset: > name: pool/db > > The dataset attribute suggests to me that I should be able to create > filesystems as a like in the db zone, but when I try it fails: > > root at andromeda220# zlogin db > [Connected to zone ''db'' pts/3] > Last login: Thu Feb 16 15:10:46 on pts/3 > Sun Microsystems Inc. SunOS 5.11 snv_33 October 2007 > root at db44# zfs create pool/db/data > cannot create ''pool/db/data'': permission denied >I''m not an expert but i guess the only way to make it work would be to give controll to the devices to the zone, and then create the pool inside that zone then it should e possible to do what you want. Better solution would be to make your filesystems in the global zone. James Dickens uadmin.blogspot.com> > Can someone please tell me what I''m doing wrong? > > TIA, > > -- > Rich Teer, SCNA, SCSA, OpenSolaris CAB member > > President, > Rite Online Inc. > > Voice: +1 (250) 979-1638 > URL: http://www.rite-group.com/rich > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >
On Thu, 16 Feb 2006, Eric Schrock wrote:> This is: > > 6381427 Cannot create filesystem in LZ, permission denied > > Introduced in build 33 and fixed in 34.Ah, good to know. I suppose for now the workaround would be to create the required file systems in the global zone and mount them inside the LZ? Bugs notwithstanding, is what I was trying to do doable, and is it the recommended way? (My intent is to allow the db zone admin to carve up the pool/db dataset as they want.) Cheers, -- Rich Teer, SCNA, SCSA, OpenSolaris CAB member President, Rite Online Inc. Voice: +1 (250) 979-1638 URL: http://www.rite-group.com/rich
On Thu, Feb 16, 2006 at 03:54:57PM -0800, Rich Teer wrote:> > Ah, good to know. I suppose for now the workaround would be to > create the required file systems in the global zone and mount > them inside the LZ?Yep.> Bugs notwithstanding, is what I was trying to do doable, and is > it the recommended way? (My intent is to allow the db zone admin > to carve up the pool/db dataset as they want.)Yes. Exporting just the filesystem (via ''add fs'') allows you to access the data, but you can''t actually administer it with the zfs commands. If you want the non-global zone admin to be able to create filesystem and/or manipulate properties, then you want to delegate the dataset to the zone. - Eric -- Eric Schrock, Solaris Kernel Development http://blogs.sun.com/eschrock