Sylvain <sylvainterside...@gmail.com> wrote:
> I have an NFS share mounted on my Debian testing computer with default
> mount options. It works fine but as soon as my computer loses network
> access or the NASĀ is disconnected or shut down, the system becomes
> unstable:

I would recommend a number of things to review.

1. If the contents of the NFS share are fundamental to your system
working, you need to consider whether you can either improve the network
access or change the sharing mechanism to something that's less reliant
on the network. (rsync local copies, etc.) Basically, there's no point
trying to rely on something that's unreliable.

2. If you have something in your PATH, such as /usr/local/bin, on the
NFS share, consider whether you can have the PATH referencing only local
directories, but within one of those local directories use a collection
of symlinks to point to the corresponding programs on the NFS share.

i.e., if /mnt/share/bin is (part of) the NFS share, and you have that
directory in your PATH, change it so that your PATH no longer references
the directory but instead references, say, /usr/local/bin. And then
within /usr/local/bin run this command (once, or each time you mount
the NFS share, or hourly, etc.):

    cd /usr/local/bin && ln -fs /mnt/share/bin/* .

IME this will help prevent your shell locking up if the NFS mount hangs.

3. Consider whether you can use the automounter (autofs) instead of a
fixed mount in /etc/fstab. (The automounter will unmount the filesystem
when it's not in use, and remount it automatically on demand.) This will
reduce - but not remove - the likelihood of the filesystem being mounted
when the network disappears.

4. Change the mount options to include "hard" (not soft) and "intr".

5. Next time, try using umount -l (lazy umount) to umount the filesystem
when it's already gone. Not perfect, but usually works for me.

Chris


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/5215v8x2k2....@news.roaima.co.uk

Reply via email to