Re: [zones-discuss] Parallel mount question

2009-07-02 Thread Yanakiev, Vladimir
After removing NFS, we got yet another corruption - I just heard they
use Samba on this file system. So, let me ask the question - Samba is
supported in zone, running on LOFS - is this correct?

Thanks!

Vladi 


This e-mail and its attachments are confidential and solely for the
intended addressee(s). Do not share or use them without Fannie Mae's
approval. If received in error, contact the sender and delete them.


-Original Message-
From: william.ro...@sun.com [mailto:william.ro...@sun.com] 
Sent: Monday, June 29, 2009 2:00 PM
To: Yanakiev, Vladimir
Cc: zones-discuss@opensolaris.org
Subject: Re: [zones-discuss] Parallel mount question

Hello Vladi,

Yes you can use LOFS to all your zones to share the file system 
providing r/w access. I would even say that this is your BEST option.

NFS mount in your local zones of a file system shared by the global zone

is absolutely not supported (including autofs access of course).

HTH,
William.


On 06/29/09 18:25, Yanakiev, Vladimir wrote:
 Need a help with a problem. We have VxFS file system, created in a
 global zone, and mounted under non-global zone as LOFS. Later, two new
 zones were created on the same server, that needed access to the very
 same file system. Someone decided to NFS-shareout this file system
from
 the global zone, and NFS mount it on these two new zones. This (to my
 understanding) after few weeks corrupted bravely the file system, and
 today we experienced the same for second time.
 
 My question is - can I keep the file system in the global zone, loop
 back it (with LOFS) to all three zones, providing r/w access to all of
 them, without risk to corrupt it again?
 
 Thanks in advance for the help!
 
 Vladi
 ___
 zones-discuss mailing list
 zones-discuss@opensolaris.org
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] Parallel mount question

2009-07-02 Thread Nicolas Dorfsman


Le 2 juil. 09 à 15:46, Yanakiev, Vladimir a écrit :


After removing NFS, we got yet another corruption - I just heard they
use Samba on this file system. So, let me ask the question - Samba is
supported in zone, running on LOFS - is this correct?


Samba is user-land.
AFAIK any userland tasks is supported...


Nico
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] Parallel mount question

2009-07-02 Thread Yanakiev, Vladimir
What about /dev/smb? Will it be created in the zone during install, or we have 
to use mknod for it? To my memories, /dev/ is read only in the zone. Also, what 
will happen, if /dev/smb is simply not there? 


This e-mail and its attachments are confidential and solely for the intended 
addressee(s). Do not share or use them without Fannie Mae's approval. If 
received in error, contact the sender and delete them.


-Original Message-
From: zones-discuss-boun...@opensolaris.org 
[mailto:zones-discuss-boun...@opensolaris.org] On Behalf Of Nicolas Dorfsman
Sent: Thursday, July 02, 2009 9:50 AM
To: Zones discuss
Subject: Re: [zones-discuss] Parallel mount question


Le 2 juil. 09 à 15:46, Yanakiev, Vladimir a écrit :

 After removing NFS, we got yet another corruption - I just heard they
 use Samba on this file system. So, let me ask the question - Samba is
 supported in zone, running on LOFS - is this correct?

Samba is user-land.
AFAIK any userland tasks is supported...


Nico
___
zones-discuss mailing list
zones-discuss@opensolaris.org
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] Parallel mount question

2009-07-02 Thread Nicolas Dorfsman


Le 2 juil. 09 à 16:47, Yanakiev, Vladimir a écrit :

What about /dev/smb? Will it be created in the zone during install,  
or we have to use mknod for it? To my memories, /dev/ is read only  
in the zone. Also, what will happen, if /dev/smb is simply not there?


Hu ?  What's that ?

Did you see this on a Linux Kernel or on a Solaris  ?


Nico

___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] Parallel mount question

2009-07-02 Thread Yanakiev, Vladimir
$ uname -a
SunOS acust01 5.10 Generic_13-02 sun4u sparc SUNW,Netra-T12
$ ls -ld /dev/smb
drwxr-xr-x   2 root other   6656 Sep 25  2007 /dev/smb
$ ps -ef |grep smb
root  2863 1   0   Jun 28 ?   0:00 ./smbd -D -d 1 -l 
/export/apps/samba/var -s /export/apps/samba/lib/smb.conf
root  2865 1   0   Jun 28 ?   0:08 ./nmbd -D -d 1 -l 
/export/apps/samba/var -s /export/apps/samba/lib/smb.conf
root  2867  2863   0   Jun 28 ?   0:00 ./smbd -D -d 1 -l 
/export/apps/samba/var -s /export/apps/samba/lib/smb.conf
  s5uvry 20280 20249   0 11:11:36 pts/7   0:00 grep smb 


This e-mail and its attachments are confidential and solely for the intended 
addressee(s). Do not share or use them without Fannie Mae's approval. If 
received in error, contact the sender and delete them.


-Original Message-
From: zones-discuss-boun...@opensolaris.org 
[mailto:zones-discuss-boun...@opensolaris.org] On Behalf Of Nicolas Dorfsman
Sent: Thursday, July 02, 2009 10:58 AM
To: Zones discuss
Subject: Re: [zones-discuss] Parallel mount question


Le 2 juil. 09 à 16:47, Yanakiev, Vladimir a écrit :

 What about /dev/smb? Will it be created in the zone during install,  
 or we have to use mknod for it? To my memories, /dev/ is read only  
 in the zone. Also, what will happen, if /dev/smb is simply not there?

Hu ?  What's that ?

Did you see this on a Linux Kernel or on a Solaris  ?


Nico

___
zones-discuss mailing list
zones-discuss@opensolaris.org
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] Parallel mount question

2009-06-30 Thread Moore, Joe
William Roche wrote:
 Now about the automounter, I share Nico's point of view, but as far as
 I
 know nothing like that already exist, and No, the automounter or a
 mount
 request isn't 'clever' enough (or customized enough) yet to handle NFS
 data shared by the global zone and translate the mount request into an
 LOFS mount. So be careful with NFS share from the global zone when you
 have local zones on the same machine.

The global zone could be the one running automount.  Since it knows what host 
is local, it'll convert the nfs mounts to lofs automagically.

For each zone, add the zone's automount entries to global:/etc/auto_master as
/zonepath/root/home +auto_home vers=3,nosuid (for example)

Haven't tried it.  It would muck up NFSv4 identities, and blur the lines 
between the global zone administrator and a local zone admin.

--Joe
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] Parallel mount question

2009-06-30 Thread Robert Thurlow

Glenn Faden wrote:


Well, it doesn't have to be possible.  Instead it should be possible to
have the mount(2) syscall detect the loopback NFS and convert it into a
lofs mount if, say, a flag is set in the arguments, or even by default.
  


I've thought about doing this in the past, but wasn't sure that it would 
work. The automounter is has some special processing for NFS, and I 
don't know what would happen if a requested NFS mount got turned into sa 
LOFS mount. For example, the automounter attempts to unmount anything it 
mounted that is no longer busy. So, it might also be necessary to modify 
the umount syscall to translate NFS umounts to LOFS umounts.


The automounter periodically attempts to unmount anything mounted
atop an autofs trigger node; I don't think anything needs to think
about what type of filesystem it is.  If autofs were to choke on
this, I would expect it to be simple enough to fix it to address
the subtlety.

Rob T
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] Parallel mount question

2009-06-30 Thread Glenn Faden

Moore, Joe wrote:

William Roche wrote:
  

Now about the automounter, I share Nico's point of view, but as far as
I
know nothing like that already exist, and No, the automounter or a
mount
request isn't 'clever' enough (or customized enough) yet to handle NFS
data shared by the global zone and translate the mount request into an
LOFS mount. So be careful with NFS share from the global zone when you
have local zones on the same machine.



The global zone could be the one running automount.  Since it knows what host is 
local, it'll convert the nfs mounts to lofs automagically.
  


Yes, that part works.

For each zone, add the zone's automount entries to global:/etc/auto_master as
/zonepath/root/home +auto_home vers=3,nosuid (for example)

Haven't tried it.  It would muck up NFSv4 identities, and blur the lines 
between the global zone administrator and a local zone admin.
  


I've tried this over the years. It doesn't work for several reasons. In 
particular, there is a check in the kernel autofs code to prevent it. 
But even if that was changed there would need to be some synchronization 
to inform the global zone automounter about the state of the zones so 
that the autofs trigger mounts could be managed properly.


--Glenn
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] Parallel mount question

2009-06-30 Thread Nicolas Williams
On Tue, Jun 30, 2009 at 10:13:34AM -0400, Moore, Joe wrote:
 The global zone could be the one running automount.  Since it knows
 what host is local, it'll convert the nfs mounts to lofs
 automagically.
 
 For each zone, add the zone's automount entries to
 global:/etc/auto_master as /zonepath/root/home +auto_home
 vers=3,nosuid (for example)
 
 Haven't tried it.  It would muck up NFSv4 identities, and blur the
 lines between the global zone administrator and a local zone admin.

The problem with this is that it takes something important (sysadmin
independence) away from zones to fix a relatively minor problem and
greatly complicates the automounter and g-z administration in the
process.  For example, the automounter would now have multiple distinct
-hosts mounts to implement, and we'd have to augment the mount(2)
syscall so that the zone ID into which the mount should be made can be
passed by the automounter in the g-z (so that we don't muck up NFSv4
identities), and so on.

Ideally we should fix the NFS loopback mount VM issues.  Anything else
is a band-aid, though perhaps a welcome one.  If we're gonna put a
band-aid on it should be a simple one.  Not that the other alternative
being discussed is necessarily simple either -- the hardest problem
there would be detecting that an NFS mount is from the same running
kernel, but then, this is also a problem in your proposal.

Nico
-- 
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] Parallel mount question

2009-06-30 Thread Roman V Shaposhnik
On Tue, 2009-06-30 at 10:13 -0400, Moore, Joe wrote:
 William Roche wrote:
  Now about the automounter, I share Nico's point of view, but as far as
  I
  know nothing like that already exist, and No, the automounter or a
  mount
  request isn't 'clever' enough (or customized enough) yet to handle NFS
  data shared by the global zone and translate the mount request into an
  LOFS mount. So be careful with NFS share from the global zone when you
  have local zones on the same machine.
 
 The global zone could be the one running automount.  Since it knows what host 
 is local, it'll convert the nfs mounts to lofs automagically.
 
 For each zone, add the zone's automount entries to global:/etc/auto_master as
 /zonepath/root/home +auto_home vers=3,nosuid (for example)
 
 Haven't tried it.  It would muck up NFSv4 identities, and blur the lines 
 between the global zone administrator and a local zone admin.

Yes it will. But isn't it a *separate mode* worth having? If I, as a
global zone admin, decide to make all of NFS traffic go through the
global zone, shouldn't I be allowed to?

In fact, don't we sort of have it already with nfs_global_client_only
tweak? 

What is the reason for not making it one of the official ways to 
configure how zones interact with NFS?

Once again, this is not to say, that a total separation of NFS
identities is not needed. 

Thanks,
Roman.

___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] Parallel mount question

2009-06-30 Thread Roman V Shaposhnik
On Tue, 2009-06-30 at 10:55 -0500, Nicolas Williams wrote:
 On Tue, Jun 30, 2009 at 10:13:34AM -0400, Moore, Joe wrote:
  The global zone could be the one running automount.  Since it knows
  what host is local, it'll convert the nfs mounts to lofs
  automagically.
  
  For each zone, add the zone's automount entries to
  global:/etc/auto_master as /zonepath/root/home +auto_home
  vers=3,nosuid (for example)
  
  Haven't tried it.  It would muck up NFSv4 identities, and blur the
  lines between the global zone administrator and a local zone admin.
 
 The problem with this is that it takes something important (sysadmin
 independence) away from zones to fix a relatively minor problem and
 greatly complicates the automounter and g-z administration in the
 process.  For example, the automounter would now have multiple distinct
 -hosts mounts to implement, and we'd have to augment the mount(2)
 syscall so that the zone ID into which the mount should be made can be
 passed by the automounter in the g-z (so that we don't muck up NFSv4
 identities), and so on.

I'm sorry if I miss the subtleties of the context (or implementation
for that matter), but isn't the problem here the fact that mount tables
are not really per-zone? They are not really virtualized they are
just filtered.

Thanks,
Roman.

___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] Parallel mount question

2009-06-30 Thread Nicolas Dorfsman

Le 30 juin 09 à 16:13, Moore, Joe a écrit :


William Roche wrote:
Now about the automounter, I share Nico's point of view, but as far  
as

I
know nothing like that already exist, and No, the automounter or a
mount
request isn't 'clever' enough (or customized enough) yet to handle  
NFS
data shared by the global zone and translate the mount request into  
an
LOFS mount. So be careful with NFS share from the global zone when  
you

have local zones on the same machine.


The global zone could be the one running automount.  Since it knows  
what host is local, it'll convert the nfs mounts to lofs  
automagically.


For each zone, add the zone's automount entries to global:/etc/ 
auto_master as

/zonepath/root/home +auto_home vers=3,nosuid (for example)


Excellent !

This should be added to the FAQ !
As already said by others, it's not perfect, as it should be set up in  
the global zone, but it's really better, better, better, better than  
the current answer.


My personal question now is : why didn't I find it by myself !  :-)


Nico


___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] Parallel mount question

2009-06-30 Thread Glenn Faden

Nicolas Dorfsman wrote:

Le 30 juin 09 à 16:13, Moore, Joe a écrit :


William Roche wrote:

Now about the automounter, I share Nico's point of view, but as far as
I
know nothing like that already exist, and No, the automounter or a
mount
request isn't 'clever' enough (or customized enough) yet to handle NFS
data shared by the global zone and translate the mount request into an
LOFS mount. So be careful with NFS share from the global zone when you
have local zones on the same machine.


The global zone could be the one running automount.  Since it knows 
what host is local, it'll convert the nfs mounts to lofs 
automagically.


For each zone, add the zone's automount entries to 
global:/etc/auto_master as

/zonepath/root/home +auto_home vers=3,nosuid (for example)


Excellent !

Sorry...


This should be added to the FAQ !
As already said by others, it's not perfect, as it should be set up in 
the global zone, but it's really better, better, better, better than 
the current answer.

Doesn't work.


My personal question now is : why didn't I find it by myself !  :-)


Because it doesn't work. See:

http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/fs/autofs/auto_vnops.c#auto_trigger_mount

  1403 /*
  1404  * Cross-zone mount triggering is disallowed.
  1405  */
  1406 if (fnip-fi_zoneid != getzoneid())
  1407 return (EPERM);/* Not owner of mount */

--Glenn

___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] Parallel mount question

2009-06-30 Thread Roman V Shaposhnik
On Tue, 2009-06-30 at 12:58 -0700, Glenn Faden wrote:
  This should be added to the FAQ !
  As already said by others, it's not perfect, as it should be set up in 
  the global zone, but it's really better, better, better, better than 
  the current answer.
 Doesn't work.

That's what I thought too. The question though is -- why not *let*
it work under explicit permission? Again, I understand the use case
why it shouldn't work. But why there's no acknoledgement of a usability
of a case where it makes sense.

Doesn't a glance at this thread provide enough of a conviction that
asking a global zone to route *all* FS related traffic is a useful
thing to do? 

  My personal question now is : why didn't I find it by myself !  :-)
 
 Because it doesn't work. See:
 
 http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/fs/autofs/auto_vnops.c#auto_trigger_mount
 
1403 /*
1404  * Cross-zone mount triggering is disallowed.
1405  */
1406 if (fnip-fi_zoneid != getzoneid())
1407 return (EPERM);/* Not owner of mount */

This place is easy to fix if you ask me. The real question is what kind
of long lasting impact would allowing such a thing have. And this is 
a conversation I'm very interested in having.

Thanks,
Roman.

___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] Parallel mount question

2009-06-30 Thread Nicolas Dorfsman


Le 30 juin 09 à 21:58, Glenn Faden a écrit :



Excellent !

Sorry...


Makes me angry.



This should be added to the FAQ !
As already said by others, it's not perfect, as it should be set up  
in the global zone, but it's really better, better, better, better  
than the current answer.

Doesn't work.


My personal question now is : why didn't I find it by myself !  :-)


Because it doesn't work.


Thanks.  :-|


See:

http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/fs/autofs/auto_vnops.c#auto_trigger_mount

 1403 /*
 1404  * Cross-zone mount triggering is disallowed.
 1405  */
 1406 if (fnip-fi_zoneid != getzoneid())
 1407 return (EPERM);/* Not owner of mount */



It's a buggy line.
We should have something like :

if (getzoneid != 0  fnip-fi_zoneid != getzoneid())


Nico


___
zones-discuss mailing list
zones-discuss@opensolaris.org


[zones-discuss] Parallel mount question

2009-06-29 Thread Yanakiev, Vladimir
Need a help with a problem. We have VxFS file system, created in a
global zone, and mounted under non-global zone as LOFS. Later, two new
zones were created on the same server, that needed access to the very
same file system. Someone decided to NFS-shareout this file system from
the global zone, and NFS mount it on these two new zones. This (to my
understanding) after few weeks corrupted bravely the file system, and
today we experienced the same for second time.

My question is - can I keep the file system in the global zone, loop
back it (with LOFS) to all three zones, providing r/w access to all of
them, without risk to corrupt it again?

Thanks in advance for the help!

Vladi
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] Parallel mount question

2009-06-29 Thread William Roche

Hello Vladi,

Yes you can use LOFS to all your zones to share the file system 
providing r/w access. I would even say that this is your BEST option.


NFS mount in your local zones of a file system shared by the global zone 
is absolutely not supported (including autofs access of course).


HTH,
William.


On 06/29/09 18:25, Yanakiev, Vladimir wrote:

Need a help with a problem. We have VxFS file system, created in a
global zone, and mounted under non-global zone as LOFS. Later, two new
zones were created on the same server, that needed access to the very
same file system. Someone decided to NFS-shareout this file system from
the global zone, and NFS mount it on these two new zones. This (to my
understanding) after few weeks corrupted bravely the file system, and
today we experienced the same for second time.

My question is - can I keep the file system in the global zone, loop
back it (with LOFS) to all three zones, providing r/w access to all of
them, without risk to corrupt it again?

Thanks in advance for the help!

Vladi
___
zones-discuss mailing list
zones-discuss@opensolaris.org

___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] Parallel mount question

2009-06-29 Thread Steve Lawrence
On Mon, Jun 29, 2009 at 08:00:28PM +0200, William Roche wrote:
 Hello Vladi,

 Yes you can use LOFS to all your zones to share the file system providing 
 r/w access. I would even say that this is your BEST option.

 NFS mount in your local zones of a file system shared by the global zone is 
 absolutely not supported (including autofs access of course).

I think each zone's automounter is smart enough to use lofs instead of nfs for
mounts from a non-global to a global zone.

-Steve L.


 HTH,
 William.


 On 06/29/09 18:25, Yanakiev, Vladimir wrote:
 Need a help with a problem. We have VxFS file system, created in a
 global zone, and mounted under non-global zone as LOFS. Later, two new
 zones were created on the same server, that needed access to the very
 same file system. Someone decided to NFS-shareout this file system from
 the global zone, and NFS mount it on these two new zones. This (to my
 understanding) after few weeks corrupted bravely the file system, and
 today we experienced the same for second time.

 My question is - can I keep the file system in the global zone, loop
 back it (with LOFS) to all three zones, providing r/w access to all of
 them, without risk to corrupt it again?

 Thanks in advance for the help!

 Vladi
 ___
 zones-discuss mailing list
 zones-discuss@opensolaris.org
 ___
 zones-discuss mailing list
 zones-discuss@opensolaris.org
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] Parallel mount question

2009-06-29 Thread Glenn Faden

Steve Lawrence wrote:



I think each zone's automounter is smart enough to use lofs instead of nfs for
mounts from a non-global to a global zone.
  


Please explain how this is possible. How can the automounter convert an 
nfs specification of a global zone pathname into a pathname which can be 
expressed using the non-global zone's lofs semantics?


--Glenn

___
zones-discuss mailing list
zones-discuss@opensolaris.org

Re: [zones-discuss] Parallel mount question

2009-06-29 Thread Nicolas Williams
On Mon, Jun 29, 2009 at 11:31:20AM -0700, Glenn Faden wrote:
 Steve Lawrence wrote:
 
 
 I think each zone's automounter is smart enough to use lofs instead of nfs 
 for
 mounts from a non-global to a global zone.
   
 
 Please explain how this is possible. How can the automounter convert an 
 nfs specification of a global zone pathname into a pathname which can be 
 expressed using the non-global zone's lofs semantics?

Well, it doesn't have to be possible.  Instead it should be possible to
have the mount(2) syscall detect the loopback NFS and convert it into a
lofs mount if, say, a flag is set in the arguments, or even by default.

That would work transparently for the automounter.  Though it the
automounter were not calling mount(2) directly, but instead passing back
mount info to the autofs kernel module caller (which it does for some fs
types), then the autofs module would need to know how to convert the
mount to a lofs mount.

Nico
-- 
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] Parallel mount question

2009-06-29 Thread William Roche

Vladi,

You can mount the filesystem tree that you want to share anywhere in 
your local zone(s).
You can do it in the zone configuration (using zonecfg) but you'll need 
to reboot the zone to take it into account; or using a mount command 
from the global zone to have the data appear in a running zone.


Practically:

For the zonecfg case, as in the zonecfg(1M) man page:
   zonecfg:myzone3 add fs
   zonecfg:myzone3:fs set dir=/appl/fs
   zonecfg:myzone3:fs set special=/export/appl/fs
   zonecfg:myzone3:fs set type=lofs
   zonecfg:myzone3:fs add options [rw,nodevices]
   zonecfg:myzone3:fs end

The result is: when you are logged in the local zone you'll see an 
/appl/fs directory showing the content of the /export/appl/fs directory 
from the global zone. You'll be allowed to write to this directory as 
you want.


And you can share this same directory the same way in any other local 
zone in parallel.


I guess this is what you are asking for.


-=-=-=-

Now about the automounter, I share Nico's point of view, but as far as I 
know nothing like that already exist, and No, the automounter or a mount 
request isn't 'clever' enough (or customized enough) yet to handle NFS 
data shared by the global zone and translate the mount request into an 
LOFS mount. So be careful with NFS share from the global zone when you 
have local zones on the same machine.



HTH,

Cheers,
William.



On 06/29/09 20:51, Yanakiev, Vladimir wrote:

Thanks, William!

Let me ask one more question - inside the non-global zones, their
automounters will still loopback this same file system one more time -
if in the non global zone we see /export/appl/fs, it will be looped back
as /appl/fs. My understanding is, this should be fine - am I right?

Vladi 



This e-mail and its attachments are confidential and solely for the
intended addressee(s). Do not share or use them without Fannie Mae's
approval. If received in error, contact the sender and delete them.


-Original Message-
From: william.ro...@sun.com [mailto:william.ro...@sun.com] 
Sent: Monday, June 29, 2009 2:00 PM

To: Yanakiev, Vladimir
Cc: zones-discuss@opensolaris.org
Subject: Re: [zones-discuss] Parallel mount question

Hello Vladi,

Yes you can use LOFS to all your zones to share the file system 
providing r/w access. I would even say that this is your BEST option.


NFS mount in your local zones of a file system shared by the global zone

is absolutely not supported (including autofs access of course).

HTH,
William.


On 06/29/09 18:25, Yanakiev, Vladimir wrote:

Need a help with a problem. We have VxFS file system, created in a
global zone, and mounted under non-global zone as LOFS. Later, two new
zones were created on the same server, that needed access to the very
same file system. Someone decided to NFS-shareout this file system

from

the global zone, and NFS mount it on these two new zones. This (to my
understanding) after few weeks corrupted bravely the file system, and
today we experienced the same for second time.

My question is - can I keep the file system in the global zone, loop
back it (with LOFS) to all three zones, providing r/w access to all of
them, without risk to corrupt it again?

Thanks in advance for the help!

Vladi
___
zones-discuss mailing list
zones-discuss@opensolaris.org

___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] Parallel mount question

2009-06-29 Thread James Carlson

On Jun 29, 2009, at 2:31 PM, Glenn Faden glenn.fa...@sun.com wrote:


Steve Lawrence wrote:



I think each zone's automounter is smart enough to use lofs instead  
of nfs for

mounts from a non-global to a global zone.



Please explain how this is possible. How can the automounter convert  
an nfs specification of a global zone pathname into a pathname which  
can be expressed using the non-global zone's lofs semantics?


It'd have to be a helper out in the global zone that sets up the  
correct lofs mount.


___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] Parallel mount question

2009-06-29 Thread Glenn Faden

Nicolas Williams wrote:

On Mon, Jun 29, 2009 at 11:31:20AM -0700, Glenn Faden wrote:
  

Steve Lawrence wrote:

I think each zone's automounter is smart enough to use lofs instead of nfs 
for

mounts from a non-global to a global zone.
 
  
Please explain how this is possible. How can the automounter convert an 
nfs specification of a global zone pathname into a pathname which can be 
expressed using the non-global zone's lofs semantics?



Well, it doesn't have to be possible.  Instead it should be possible to
have the mount(2) syscall detect the loopback NFS and convert it into a
lofs mount if, say, a flag is set in the arguments, or even by default.
  


I've thought about doing this in the past, but wasn't sure that it would 
work. The automounter is has some special processing for NFS, and I 
don't know what would happen if a requested NFS mount got turned into sa 
LOFS mount. For example, the automounter attempts to unmount anything it 
mounted that is no longer busy. So, it might also be necessary to modify 
the umount syscall to translate NFS umounts to LOFS umounts.


Then there is the issue of the automounter looking up entries in 
/etc/mnttab. It might get confused when looking for NFS entries that 
were turned into LOFS.

That would work transparently for the automounter.  Though it the
automounter were not calling mount(2) directly, but instead passing back
mount info to the autofs kernel module caller (which it does for some fs
types), then the autofs module would need to know how to convert the
mount to a lofs mount.
  
Note that cross-zone LOFS mounts have a fictitious value for special 
when viewed in the zone's /etc/mnttab. Instead of the actaul global zone 
pathname, the special is represented as a duplicate of the zone-relative 
mountpoint. So it's not obvious how the automounter can do a useful 
conversion.


For this to work, the kernel would have to internally do a LOFS mount 
but somehow make it appear externally that it is an NFS mount.


--Glenn
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] Parallel mount question

2009-06-29 Thread Glenn Faden

James Carlson wrote:

On Jun 29, 2009, at 2:31 PM, Glenn Faden glenn.fa...@sun.com wrote:


Steve Lawrence wrote:



I think each zone's automounter is smart enough to use lofs instead 
of nfs for

mounts from a non-global to a global zone.



Please explain how this is possible. How can the automounter convert 
an nfs specification of a global zone pathname into a pathname which 
can be expressed using the non-global zone's lofs semantics?


It'd have to be a helper out in the global zone that sets up the 
correct lofs mount.


Jim,

You may remember that during the early days of the Trusted Extensions 
project I tried to get the global zone automounter to act as such a 
helper process. This was before the automounter used doors, and I 
couldn't get the TLI code to work across zones reliably. There were 
synchronization issues since the global zone automounter wasn't aware of 
individual zone states.


Maybe a better helper program might be the zoneadmd process that is 
associated with each zone.


--Glenn

___
zones-discuss mailing list
zones-discuss@opensolaris.org