Marlanne DeLaSource wrote:
This question is both for the ZFS forum and the Zones forum.
I have a global zone with a pool (mapool).
I have 2 zones, z1 and z2,.
I want to pass a dataset (mapool/fs1) from z1 to z2.
Solution 1 :
mapool/fs1 is mounted under /thing on the global zone (legacy) and I configure a lofs on z1 and z2.
add zonecfg:z1> add fs
zonecfg:z1:fs> set dir=/thing
zonecfg:z1:fs> set special=/fs1
zonecfg:z1:fs> set type=lofs
- Advantage : the fs is "seen" on both zones.
- Disadvantage : both zones can use it and I only want the "visibility" of the
fs on one zone at a time.
Solution 2 :
zonecfg:z1> add dataset
zonecfg:z1:dataset> set name=mapool/fs2
Disadvantage : I can't get rid of it when z1 is booted.
Is there a smarter solution ?
If you only want the file system to be mounted in one zone at a time
then there is nothing in the zones framework or in zfs either that will
do that for you. You will have to either manually mount the file system
in the zone you want it to be in or write a small script
to do that work. I would just use lofs and mount the file system into
the zone that you want it to be mounted in. You can do this from the
global zone. There is no need to configure the file system using zonecfg.
zones-discuss mailing list