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
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?
mounts from a non-global to a global zone.
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.
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
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.
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