Please try the following:

Set the mountpoint property of your dataset zone/data to be within the 
restricted zone's root. For example:

   # zfs set mountpoint=/zone/needtoknow/root/zone/data zone/data

That will cause the dataset to appear automatically as a read-write 
mount point in the restricted zone with the correct label. You don't 
need to specify it via zonecfg. Then you should be able to share it via 
NFS. A few subtle points:

1. Setting the zfs mountpoint property has the side-effect of settting 
its label if the mountpoint is in a labeled zone.

2. The restricted zone's dataset must exist (but doesn't need to be 
running) before you can mount the new data set.

3. I think zfs mount code figures out dependencies automatically so if 
you reboot the restricted zone's dataset will be mounted before mounting 
the zone/data dataset.


Danny Hayes wrote:
> Is it possible to share a zfs dataset that has been added to a labeled zone?  
> We are running Solaris 10 U4 w/ TX on x86. Currently, we have a zfs file 
> system named zone/restricted. We have a labeled zone named “restricted” 
> loaded to this zfs.  The global path is /zone/restricted. We have another zfs 
> file system named zone/data that we want to add as a dataset to the 
> “restricted” zone. The original global path of this zfs file system is 
> /zone/data. The zone path for the zfs dataset after it has been added to the 
> “restricted” zone is /zone/restricted/root/zone/data. We would like to share 
> the data in the zone/data zfs with “restricted” labeled zones on other 
> systems in my network. We have successfully shared a directory created in the 
> “restricted” zone using /zone/restricted/etc/dfs/dfstab, but have been unable 
> to share the zfs dataset /zone/data. We chose to use a zfs dataset instead of 
> just creating a directory in the zone, because it is a large amount of data 
> with new versions released regularly. With each release the zfs can be 
> destroyed and restored from a snapshot containing the new data very quickly. 
> There is an error during boot up of the zone stating the dataset is busy and 
> cannot be mounted. This causes several services to fail and prevents opening 
> a terminal or console window. Is it possible to share a dataset that has been 
> added to a labeled zone? This is a major piece of our configuration and any 
> help with this issue would be greatly appreciated. I know this might sound 
> confusing, so I listed some paths and dfstab file below to help clarify. 
> Thanks
> [u]zpool[/u]
> zone
> [u]zfs file systems[/u]
> zone/restricted
> zone/data
> [u]zone path after dataset added to zone[/u]
> /zone/restricted/root/zone/data
> [u]contents of /zone/restricted/etc/dfs/dfstab[/u]
> share -F nfs -o rw /zone/data
> This message posted from
> _______________________________________________
> zones-discuss mailing list

zones-discuss mailing list

Reply via email to