I took another look at this configuration, and have yet another suggestion.

Instead of specifying the zfs dataset using zonecfg's datatset keyword, where 
it is mounted by the zone, you can just specify that it should be mounted by 
zoneadm, instead.

I previously suggested doing this:

     zonecfg:zone-name> add dataset
     zonecfg:zone-name:dataset> set name=zone/data
     zonecfg:zone-name:dataset> end

But that delays the dataset from being mounted until after the dfstab file is 
interpreted. To get it mounted earlier (by zoneadm) you should do this instead:

    zfs set mountpoint=legacy zone/data
    zfs set zoned=off zone/data

    zonecfg:zone-name> add fs
    zonecfg:zone-name:fs> set dir=/data
    zonecfg:zone-name:fs> set special=zone/data
    zonecfg:zone-name:fs> set type=zfs
    zonecfg:zone-name:fs> end

This causes the dataset to be mounted in the zone (at /data) before the dfstab 
file gets interpreted. The /zone/zone-name/etc/dfs/dfstab file should use the 
pathname (/data), too.

   share -F nfs /data

There are subtle differences between the two approaches. Giving the dataset to 
the zone allows the zone's administrator to remount it and set other 
properties. But mounting the dataset as a filesystem, the zone's administrator 
no longer has that control.

--Glenn
 
 
This message posted from opensolaris.org
_______________________________________________
zones-discuss mailing list
zones-discuss@opensolaris.org

Reply via email to