Thanks, this looks feasible, although awkward.  I also considered simply
moving the filesystem to the global zone's vfstab, and set it to mount
under /zones/my_zone/root (ie mount it into the local zone).  This is
probably a bad idea, but I'm not entirely sure why.

- greg 

-----Original Message-----
From: Steve Lawrence [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 18, 2007 4:16 PM
To: Glenn Faden
Cc: Tillman, Gregory;
Subject: Re: [zones-discuss] NFS exports from global zone holding local
zone mount points open

I'm guessing your zonecfg for myzone looks something like:

        dir: /logdir
        special: /dev/dsk/c0t1d0s0
        raw: /dev/rdsk/c0t1d0s0
        type: ufs
        options: []

If you want to share the filesystem from the global zone, mount the
device in the global zone, and in the non-global zone, just use a lofs
mount to the global zone:

In global /etc/vfstab:
/dev/dsk/c0t1d0s0 /dev/rdsk/c0t1d0s0 /zones/zone_logs/myzone_logdir ufs
- yes -

In global /etc/dfs/dfstab
share -F nfs -o /zones/zone_logs/myzone_logdir

In zonecfg for myzone:
        dir: /logdir
        special: /zones/zone_logs/myzone_logdir
        type: lofs
        options: []

I tested this using the solaris express developer release, and it works.
This most likely works on the latest s10 update, but please check.

-Steve L.

On Thu, Jan 18, 2007 at 11:07:19AM -0800, Glenn Faden wrote:
> This feature is not supported with standard Solaris. It is only 
> supported in Trusted Extensions. There are at least two problems in 
> standard Solaris. As you pointed out, the NFS sharing should not take 
> place until the zone is booted, and it should be unshared when the 
> zone is halted. TX does the share and unshare operations automatically

> at the right time (within zoneadmd). TX maintains separate dftstab 
> files for each zone.
> Secondly, the pathname, e.g. /zones/myzone, is not searchable  except 
> by root.. So anything that was exported would not be available anyway.

> This is also fixed in TX by special casing the zonepath permissions
for NFS.
> --Glenn
> Tillman, Gregory wrote:
> >I understand that NFS-exports need to be done in the global zone, so 
> >I dutifully added:
> >
> >share -F nfs -o /zones/myzone/root/logdir
> >
> >to /etc/dfs/dfstab of my global zone.
> >
> >But when the master system rebooted, the NFS export happened before 
> >the local zone could boot.  So the zone could not mount this 
> >filesystem, because the mount point was busy, and the zone boot 
> >failed.  The problem may also occur with a simple reboot of the local

> >zone, I haven't tried that yet.
> >
> >This must be a common problem, so I wondered if there is a 
> >recommended solution.
> >
> >Thanks
> >
> >- greg
> >_______________________________________________
> >zones-discuss mailing list
> >
> > 
> >
> _______________________________________________
> zones-discuss mailing list
zones-discuss mailing list

Reply via email to