Re: [zones-discuss] Shareing files between zones
On Sun, Sep 13, 2009 at 12:30 AM, Illya Kysil wrote: > Hi Sam, > > The easier way is to mount the storage (either NFS or CIFS or other) > in the global zone and configure the lofs filesystems in non-global > zones. A file system that is NFS mounted in the global zone is inaccessible via lofs in non-global zones. If you have seen such behavior work, my guess is that if you snooped the traffic, you would see that the NFS traffic is really between the NFS server and the non-global zone. If the directory is already exported via NFS (from a different machine) simply mount it in each non-global zone. I do not know if CIFS has the same restriction. If the storage is local storage, it can be lofs mounted in a variety of ways. Consider a system with z1 and z2 with zonepaths of /zones/z1 and /zones/z2. Suppose the data to be stored is needed at /data in each zone. Option 1: Create /data in global, lofs mount to local zones. global# zonecfg -z z1 add fs set dir=/data set special=/data set type=lofs end exit global# zonecfg -z z2 add fs set dir=/data set special=/data set type=lofs end exit Reboot each zone or issue the appropriate mount command from the global zone. Option 2: Create /data in z1, lofs mount to z2 z1# mkdir /data global# zonecfg -z z2 add fs set dir=/data set special=/data set type=lofs end exit Reboot z2 or issue the appropriate mount command from the global zone. -- Mike Gerdts http://mgerdts.blogspot.com/ ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] Shareing files between zones
Thanks, option 2 seems a bit more like what I'm looking for, I would rather go direct zone to zone then bounce it through the global. However in your example above it looks like your mounting /data from global and not z1/data. How would I specify to use the Data directory form z1? I was thinking the Zones could interact with each other just like to separate systems on a network, is this not the case? -- This message posted from opensolaris.org ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] Shareing files between zones
Ok I just tried using sharemgr to to do a standard nfs share, but it looks like the nfs server will not run in a zone. When it come to the idea of a directory in global that is lofs mounted to both zones, would both zones have RW access? -- This message posted from opensolaris.org ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] Shareing files between zones
On Sun, Sep 13, 2009 at 11:50 AM, Sam Ashcraft wrote: > Thanks, option 2 seems a bit more like what I'm looking for, I would rather > go direct zone to zone then bounce it through the global. Doh! I messed up on the configuration for z2. That should be: global# zonecfg -z z2 add fs set dir=/data set special=/zones/z1/root/data set type=lofs end exit > > However in your example above it looks like your mounting /data from global > and not z1/data. How would I specify to use the Data directory form z1? > > I was thinking the Zones could interact with each other just like to separate > systems on a network, is this not the case? A non-global zone cannot be an NFS server (without a third-party userland NFS server implementation). Also, NFS mounting a file system in a non-global zone that is exported from that zone's global zone is not supported. It may seem to work, but there is a known deadlock that can happen. -- Mike Gerdts http://mgerdts.blogspot.com/ ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] Shareing files between zones
Mike Gerdts wrote: A non-global zone cannot be an NFS server (without a third-party userland NFS server implementation). Also, NFS mounting a file system in a non-global zone that is exported from that zone's global zone is not supported. It may seem to work, but there is a known deadlock that can happen. This known deadlock is documented as a UFS/NFS/VM issue. It's never been clearly stated that it applies when using ZFS and NFS. I've been exporting ZFS home directories from the global zone into my non-global zones for years. I've never experienced the deadlock, but my systems are single-user laptops, so that may not create enough contention. --Glenn ___ zones-discuss mailing list zones-discuss@opensolaris.org