Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 4891  / 2 Years ago, tue, march 1, 2022, 5:39:27

I recently purchased a Netgear ReadyNas and have a question about mounting an NFS volume. Firstly I know how to mount the share in fstab. There is a lot of information around that describes how to do that. I really don't want to do that.



What I want to do is have a shortcut or launcher that I can execute which will mount the nfs share for me (for example mounting it to ~/music). When I plug in a usb drive xubuntu automatically puts a drive icon shortcut on my desktop and allows me to 'eject'. Is this possible? Does it make sense?



I am using xubuntu 11.10.



I have been doing research to solve this problem and I have come up with two possibilities:



1) Create a shell script or



2) AutoFS.



I am not sure which is better. I am more comfortable with shell scripting than AutoFS. The problem with the shell scripting is that I'll need sudo permissions. What I have read about AutoFS it might be the best solution. Is there a way to setup AutoFS so that I can keep the configuration files within the users home folder?


More From » xubuntu

 Answers
0

I'm using Autofs for my NFS network, see this answer.



Note that :

autofs is a program for automatically mounting directories on an as-needed basis. Auto-mounts are mounted only as they are accessed, and are unmounted after a period of inactivity. Because of this, automounting NFS/Samba shares conserves bandwidth and offers better overall performance compared to static mounts via fstab.



I've used an admin account to configure it, and I use it every day with a normal account.



1st you need to setup your Netgear ReadyNas to act like a server. ( I can not describe this part).



Then I suppose you can setup Autofs like this:




  • install Autofs



    $ sudo apt-get install autofs

  • create the folder used to mount the connection with your Netgear ReadyNas



    $ sudo mkdir /media/shareFolder

  • set autofs to automatically mount this folder,

    in /etc/auto.master add this line:



    /media/shareFolder /etc/auto.nfs --ghost, --timeout=60


    in /etc/auto.nfs add this line



    Netgear -fstype=nfs,rw,intr,uid=1001,guid=1001   192.168.1.?:/home/something


    with:

    192.168.1.? is the address of your Netgear ReadyNas

    /home/something is the folder shared on your Netgear ReadyNas

    1001 is the normal user (without admin privilege) and group ID. To find it $ id {your normal logon}






Result should be that your /home/something from your Netgear ReadyNas is mounted in /media/shareFolder/Netgear


[#38940] Tuesday, March 1, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
leadprogres

Total Points: 298
Total Questions: 114
Total Answers: 139

Location: Samoa
Member since Mon, Nov 8, 2021
3 Years ago
;