On Mon, Jun 29, 2009 at 04:38:50PM -0700, Glenn Faden wrote:
> Nicolas Williams 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.
> 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.

Perhaps there's the answer:

> >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.

Do the NFS->lofs conversion on mount (and, if need be, umount), but
pretend in mnttab that the mount was an NFS mount.  This way the
user-land automounter code would need no changes at all.

> 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.


zones-discuss mailing list

Reply via email to