Re: [zones-discuss] why are zone datasets mounted when no zone is running ?

2010-01-22 Thread Jerry Jelinek

On 01/22/10 04:57, Frank Batschulat (Home) wrote:

Hiya, I observed that zone datasets are mounted even though no zones are 
running.

this strikes me like a bug ? aren't they supposed to be mounted only when the 
zone boots ?


No, it was a bug that they weren't mounted except when the zone was
running.  See:

3979 zone fs only available from Global zone, when zone is booted

Jerry
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] why are zone datasets mounted when no zone is running ?

2010-01-22 Thread Frank Batschulat (Home)
On Fri, 22 Jan 2010 12:57:09 +0100, Frank Batschulat (Home) 
 wrote:

> Hiya, I observed that zone datasets are mounted even though no zones are 
> running.
>
> this strikes me like a bug ? aren't they supposed to be mounted only when the 
> zone boots ?
>
> example from build 130:
>
> osoldev.root./export/home/batschul.=> zoneadm list -cp
> 0:global:running:/::ipkg:shared
> -:zone2:installed:/tank/zones/zone2:8b538910-6026-4342-b342-e7c69c2c14e8:ipkg:shared
>
> looks whats actually mounted right now:
>
> osoldev.batschul./export/home/batschul.=> mount -v|grep zone
> tank/zones on /tank/zones type zfs 
> read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=21000e on Fri Jan 22 
> 09:02:17 2010
> tank/zones/zone2 on /tank/zones/zone2 type zfs 
> read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=21000f on Fri Jan 22 
> 09:02:17 2010
> tank/zones/zone2/ROOT/zbe on /tank/zones/zone2/root type zfs 
> read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=210010 on Fri Jan 22 
> 09:02:22 2010
>
> df confirms:
>
> osoldev.root./export/home/batschul.=> df -lkah
> Filesystem size   used  avail capacity  Mounted on
>
> tank/zones/zone2   228G24K   203G 1%/tank/zones/zone2
> tank/zones/zone2/ROOT/zbe
>228G   511M   203G 1%/tank/zones/zone2/root
>
> osoldev.root./export/home/batschul.=> zfs list -t all
> NAME USED  AVAIL  REFER  
> MOUNTPOINT
>
> tank/zones/zone2 511M   203G24K  
> /tank/zones/zone2
> tank/zones/zone2/ROOT511M   203G21K  legacy
> tank/zones/zone2/ROOT/zbe511M   203G   511M  legacy
>
> inspecting the 'canmount' zfs property gives a hint:
>
> osoldev.root./export/home/batschul.=> zfs get canmount tank/zones/zone2
> NAME  PROPERTY  VALUE SOURCE
> tank/zones/zone2  canmount  ondefault
> osoldev.root./export/home/batschul.=> zfs get canmount tank/zones/zone2/ROOT
> NAME   PROPERTY  VALUE SOURCE
> tank/zones/zone2/ROOT  canmount  ondefault
> osoldev.root./export/home/batschul.=> zfs get canmount 
> tank/zones/zone2/ROOT/zbe
> NAME   PROPERTY  VALUE SOURCE
> tank/zones/zone2/ROOT/zbe  canmount  noautolocal
>
> so the 'zonepath' dataset has 'canmount=on' and is thus mounted
> by zfs mount -a, shouldn't that be 'canmount=noauto' ?
>
> the 'zonepath/ROOT' dataset has the same.
>
> even more interesting is that the 'zonepath/ROOT/zbe' apparently
> has the proper 'canmount=noauto' - yet it is mounted as well after boot.
>
> am I missing something obvious ?

for the 'zonepath/ROOT' dataset it's also interesting that 'canmount' is set to 
'on'
as the real systems /ROOT does have it turned off:

osoldev.batschul./export/home/batschul.=> pfexec zfs get canmount
NAMEPROPERTY  VALUE SOURCE
rpool   canmount  ondefault
rpool/ROOT  canmount  off   local
rpool/ROOT/opensolaris-129  canmount  noautolocal
rpool/ROOT/opensolaris-130  canmount  noautolocal
rpool/ROOT/opensolaris-...@install  canmount  - -
rpool/ROOT/opensolaris-...@2009-12-25-08:57:20  canmount  - -

fwiw, there exists a releated bug to LiveUpdgrade that it should not set 
'canmount' to 'on' in the new BE for the /ROOT dataset:

6747122 lucreate should not set canmount to on for zfs root dataset

---
frankB

___
zones-discuss mailing list
zones-discuss@opensolaris.org