NFS mount issue

mcr at simtone.net mcr at simtone.net
Mon Jun 15 20:13:48 UTC 2009


>>>>> "Darryl" == Darryl Moore <darryl at moores.ca> writes:
    Darryl> I'm trying to put together a setup for laptops such that
    Darryl> when the laptop is connected to the network the network
    Darryl> mounted NFS /home directory will appear, but when the laptop
    Darryl> is away from the network, the local /home directory will
    Darryl> appear.

    >> Okay, but it's gonna be a major pain.  Instead, I strongly
    >> suggest that you create new mount /net/nethome/foo or something,
    >> and put some symlinks in /home that point there.

    Darryl> The problem with this approach is that they will not be able
    Darryl> to log on from different machines and keep the same
    Darryl> configuration settings.  Desktop directory, panel layout,
    Darryl> etc. The laptop will have one look and feel, and all the
    Darryl> other workstations will have something different.

  I understand your goals.  But, they won't have that with your
solution, because the system isn't going to look into two directories.  
  You could try something with union mounts, but it will still have
problems. 

  Consider what happens if I:
    a) turn on my laptop, but have network connectivity issues.
       (let's say that the drop at my desk doesn't work. Mice have
       chewed through it, or some git unplugged that cable, since there
       were no lights on, as there wasn't anything plugged in)

       Since I have no network, I get the "local" configuration.
       My laptop resumes, and I load some pictures from my camera.
       (official, work pictures from the tradeshow!)
       I also change my background image to one of them.

    b) I then go to the next cubicle and I sit down at the computer
       there, login, and file a trouble ticket about my laptop.
       I then continue working, and realizing I need my images, load
       them from the camera, and then I change the background image,
       but to a different photo.

   IT guys fix things.
   Which background image do I get now?

    Darryl> I figured presenting them with the same common interface as
    Darryl> on all other network workstations, but giving them a link to
    Darryl> local storage for when they need to take files with them,
    Darryl> would be the best approach.

  Yes, that would work.
  But, when they are on the road, they need ALL of their settings, or
the desktop environment won't work.

    Darryl> This way the default will be for files to remain on the NFS
    Darryl> server where they will be backed up regularly. However if
    Darryl> they follow a nautilus bookmark to local storage they can
    Darryl> copy files to take with them, and when they reboot the
    Darryl> machine at home those files will be in the new home
    Darryl> directory.

  Good idea.
  And it will work for documents, but it won't work for /home itself.

    Darryl> Another approach might be to have a /home/user directory
    Darryl> which is mostly read only with a link to local storage
    Darryl> area. This way, when on the network, the NFS /home could be
    Darryl> mounted on top of the local /home without making local data
    Darryl> files inaccessible. It also means I could easily use autofs
    Darryl> to kill the NFS mount in the more than likely event that the
    Darryl> laptop is put into sleep mode at the office and resumed when
    Darryl> away from the network.

  So, basically, their laptop has a local /home/user which is read-only
to the user.  That /home/user gets it's .* files copied from the network
/home/user/.* on a regular basis, with perhaps a final rsync during
shutdown/suspend.   When on the road, the user can not change their
settings, but they can edit any documents in "local documents"

  To make the /home/user read-only to the user, I suggest that you have
/real/home as writable, and then use a bind mount with -ro to mount
it. I think you can do this with the latest kernels.

    >> It will confuse users and piss them off because they won't be
    >> able to find things.

    Darryl> That is an interesting comment, because part of the goal was
    Darryl> to make things easier to find.

  Disconnected nomadic computing is hard, because users want things to work, and
get pissed off if you prevent them from getting their work done.
  There are some really neat things in NFSv4 that help: but I don't know
if they are implemented in linux yet.

-- 
Michael Richardson <mcr at simtone.net>
Director -- Consumer Desktop Development, Simtone Corporation, Ottawa, Canada
Personal: http://www.sandelman.ca/mcr/ 

SIMtone Corporation fundamentally transforms computing into simple,
secure, and very low-cost network-provisioned services pervasively
accessible by everyone.  Learn more at www.simtone.net and www.SIMtoneVDU.com 






More information about the ubuntu-ca mailing list