Re: [Hampshire] automating sshfs

Top Page

Reply to this message
Author: Chris Dennis
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] automating sshfs
On 28/10/10 12:34, Paul Tansom wrote:
> ** Paul Tansom<paul@???> [2010-10-28 12:27]:
>> I'd better clarify that subject a bit. I'm quite happy with configuring fstab
>> to automatically mount a filesystem, using keys to ease the authentication and
>> a keepalive in ~/.ssh/config to keep the connection active. What I'm looking
>> for is an automated means of reconnecting if the connection is lost for some
>> reason.
>>
>> Basically the intention is to have directories mounted between machines to
>> enable occasional file transfer between sites (without the need for separate
>> file transfer software), but some of the machines are shutdown over night, so
>> the connection needs to be re-established if that happens (so a file isn't put
>> in the local version of the mount directory by mistake), or if the ADSL
>> connection is lost.
>>
>> At the moment I'm expecting to work with something along the lines of a short
>> script that is run from the mounted directory. If the mount is active then the
>> script at the remote end does nothing, if not then the version in the local
>> directory will re-establish the mount. Obviously I need to be careful with
>> security here, so will probably call the script from within another that does a
>> checksum before running it (just to be safe).
>>
>> This all relies on a regular and frequent cron job, so I've been looking for
>> something a bit more elegant. Either I've not found the right search terms for
>> this (I usually come up with solutions relating to the keepalive functionality
>> of SSH), or this isn't something that's been a major consideration for Fuse or
>> sshfs.
>>
>> Has anyone got any alternative suggestion?
> ** end quote [Paul Tansom]
>
> Yes, I do, what about automount?
>
> Why does that happen so often? The penny drops just after you've explained
> everything in an email asking for suggestions! I guess it's the process of
> explaining clarifying things.
>
> Still open to suggestion, but I've got something promising to play with again
> now :)


Doesn't NFS handle that sort of thing?

cheers

Chris (not an NFS expert)
-- 
Chris Dennis                                  cgdennis@???
Fordingbridge, Hampshire, UK