Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

What would be a good way to automatically mount an NFS when it gets/is available?

I have the following:

  • Media server at home, running Ubuntu, 10.10 with GUI *)
  • Laptop often at home, often on the road or at clients. Ubuntu 10.10 with GUI.

What I'd like is my laptop connecting to the nfs (or any other mountable networked filesystem) so that Banshee sees all the music, new podcast-entries (and video) from that media-server.

I already have firefly (mt-daapd) running, which works, but is flakey on both server-side and client-side. But its biggest downside, is that I cannot easily fix metadata on files on the media-server this way. DAAP is read-only by design.

I can mount nfs manually, through a sudo mount /media/nfsmultimedia/. I am not looking for a manual, or howto on setting up a NFS client and server. Merely a way to have this more transparently working.

Obviously I'd like the NFS to be unmounted if the network is no longer available (i.e. when I open my laptop-lid on my clients buro).

It may be, that an NFS is not suited for this, in that case, I'd love to hear other options. :)

*) Actually: I also have a fileserver, backupserver and webserver to which I'd like to connect in a somewhat similar way. Right now I connect to these over SSH, using gvfs.

share|improve this question
add comment

1 Answer 1

You could try playing around with AutoFS. It will let you set the NFS shares and it'll handle mounting them on demand. It's a pretty good system once it's up and running but that's not to say you won't have issues.

One thing that is apparent to me is Banshee might struggle with a library that keeps expanding and contracting as AutoFS connects and disconnects. It might have the net effect of removing half your library and then needing to re-add it. If this happens, you might lose library-specific data (eg playcounts, ratings, etc). It might not have this problem though. I haven't tested it.

share|improve this answer
    
My experience with banshee looking at music on an automount is that whenever banshee looks at the drive, it is there, so it never misses the directory. (That's the point of automount.) The only exception is when the server crashes or the network goes down, but that would happen to any remote mount and has been very rare. –  jwernerny Feb 25 '11 at 15:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.