Moutning remote filesystems locally, not as seemless as it could be...

Gabriel Dragffy gabe at dragffy.com
Sat May 12 13:26:12 UTC 2007


On Sun, 2007-05-13 at 20:02 +1000, James Gray wrote:
> On 12/05/2007, at 7:36 PM, Gabriel Dragffy wrote:
> 
> > A while back I was mounting an NFS share locally, by having an entry
> > in /etc/fstab. More recently I have switched to samba, and using  
> > smbfs I
> > can now do the same thing. It is extremely convenient having remote
> > filesystems so tightly integrated, meaning any application can make  
> > use
> > of them.
> >
> > However, one huge problem that has bugged me, and has been exaggerated
> > by the move towards networking-manage-gnome in a default desktop
> > install, is that remote filesystems in /etc/fstab will fail to mount.
> > This is because a network connection is only established once the
> > computer has loaded up and a user logged in.
> >
> > It is growing increasingly irritating for me to always open up the
> > terminal, run the command "sudo mount -a" and then wait a while as it
> > mounts the filesystems that I would have liked already mounted.
> >
> > If any one has workarounds or suggestions I'd be glad to hear them!
> 
> Investigate "autofs" (as in the system service, not the fstab option  
> that has a similar name :P).  It can be used to mount pretty much  
> anything but grew out of an NFS heritage.  I've used it to automount  
> NFS, SMB and and local file systems (like memory cards and CDROMs).
> 
> The general idea is you set up a mount point (locally) that only  
> mounts a file system when something (or someone) tries to access the  
> mount point's content.  Thus it doesn't matter if the network isn't  
> available during the boot-up mount sequence, only when something  
> tries to actually USE the auto-mounted file system.  If you have  
> subsequent boot processes that rely on the remote file system, simply  
> move the network start before autofs in the boot sequence ("man  
> update-rc.d" for the proper way to do that).
> 
> HTH,
> 
> James


Hi James

I've been trying to get a bead on autofs. Installed it and read the man
of autofs, along with mount, fstab, and automount. Getting kind of lost
here.

If one simply wishes to have a samba share automounted then what is the
simplest course of action, and what config files actually need chaning?

Many thanks
-- 
Gabriel Dragffy FdA BA(hons)


Websites by Gabe:
http://dragffy.com
http://andrew-norman.com





More information about the ubuntu-users mailing list