[olug] Network drives on a laptop?
Christopher Cashell
topher-olug at zyp.org
Mon Jan 7 21:03:11 UTC 2008
On Jan 7, 2008 2:02 PM, Luke -Jr <luke at dashjr.org> wrote:
> On Monday 07 January 2008, Christopher Cashell wrote:
> > AutoFS
>
> AutoFS addresses a completely different problem, IMO.
> I use it so I can access /mnt/net/ssh/HOSTNAME without bothering to setup
> every single HOSTNAME individually.
I wouldn't say it's a completely different problem. It's not a
perfect solution, I agree, but I'm not sure there's anything out there
that comes closer. I probably wouldn't recommend it for mounting
/home on a laptop, but for random general shares where you won't be
accessing them constantly, AutoFS fits well enough.
> It does not address the problem of an interrupted connection. Think tail -F.
> This will keep the fs mounted despite autofs.
Yes, that's correct. It acts by trying to prevent interrupted
connections by taking down connections that aren't actively in use.
If you leave a program running that is accessing a file on the remote
share, then AutoFS won't unmount the connection. Unfortunately, short
of killing the process and then unmounting remote shares when the
laptop sleeps, you're not going to find much that will take care of
this problem (especially if you're concerned with data loss, which
will occur in the above situation). This is primarily a limitation on
the inability to unmount a disk that's in use.
And, if you can't unmount it, then you're back where you started, with
stale connections that may or may not work after your laptop wakes up.
You're pretty much dependent on the robustness of NFS/CIFS and their
implementations, and hoping that they handle reconnecting or timing
out gracefully (for NFS, using TCP can help with this a little bit).
If that's not good enough, then you're getting into either AFS, or
some other distributed/disconnected sharing system. These tend to be
complicated and difficult to make work right, although if anyone
has/does, I'd love to hear more about it. Alternately, you can do an
indirect sync approach. Operate on a local cached copy that
periodically syncs with the remote copy. There' s a number of tools
out there that can do this, or it can be scripted. Depending on your
shares, though, it may be wildly impractical. For example, I've seen
it work well for /home on a laptop, but I'd definitely not want to use
it for my remote /media share which contains many gigs of mp3's.
--
Christopher
More information about the OLUG
mailing list