You Are here: Home News Ubuntu / Linux / Unix Howto mount Synology NAS (DS211j) to Ubuntu

20 -May -2012
Register

REGISTER

*
*
*
*
*
Fields marked with an asterisk (*) are required.
Howto mount Synology NAS (DS211j) to Ubuntu PDF Print E-mail
News - Ubuntu / Linux / Unix
Written by Mark Veenstra   
Thursday, 08 September 2011 13:45

So you are done configuring your Synology NAS and want to be able to access your Synology NAS through your Ubuntu PC or laptop? With Linux you can mount your NAS to your Ubuntu distro. Always wondered how? This tutorial helps you find your way to do.

First of all you need to login into DSM of your Synology. Once you are logged into DSM go to 'Configuration' and then open 'Win/Mac/NFS'. In this window click on tab 'NFS-service'. Make sure you enabled the NFS-service and save it. Then go back to the main configuration screen and open the option 'Shared folder'. You will see all of your shared folders in here. Select a folder you want to access from your Ubuntu and click on the button 'NFS-rights'. This will open up a screen and click on the button 'Create'. Enter the next values:

Hostname or IP: 192.168.1.0/24 (This should be your internal IP range)
Rights: Read/Write
Root squash: No
Enable Asynchroon

Repeat this for every folder you want to share to your Ubuntu distro. For example I have done this for the shared folders 'photo', 'music' and 'video'. After you finished this for all folders, we are done with DSM. You can close this now.

No we have to mount these shares to Ubuntu. So please log into your Ubuntu and open a terminal window. In this terminal type the following to be sure that this package is installed:

[you@ubuntu ~]$ sudo apt-get install nfs-common

Once the package is installed or you verified that the package is already installed, we need to edit the file /etc/fstab. Open this file as follows:

[you@ubuntu ~]$ sudo vi /etc/fstab

At the end of this file add the following:

IPADDRESS-OF-YOUR-NAS:/volume1/photo /mnt/CHOOSE-NAME/photo nfs nouser,atime,auto,rw,dev,exec,suid 0 0
IPADDRESS-OF-YOUR-NAS:/volume1/music /mnt/CHOOSE-NAME/music nfs nouser,atime,auto,rw,dev,exec,suid 0 0
IPADDRESS-OF-YOUR-NAS:/volume1/video /mnt/CHOOSE-NAME/video nfs nouser,atime,auto,rw,dev,exec,suid 0 0

Ofcourse you need to replace IPADDRESS-OF-YOUR-NAS with the actual IP address. And please choose a name for the folder to mount to at CHOOSE-NAME. This choosen name you should write down or remember. This because we need to create the folders you are mounting to. You can creating them by executing next command:

sudo mkdir /mnt/CHOOSE-NAME /mnt/CHOOSE-NAME/photo /mnt/CHOOSE-NAME/video /mnt/CHOOSE-NAME/music

Everything has now been setup to work. For just this once you need to activate the mount manually as follows:

sudo mount -a

If you would restart your Ubuntu now, the next time it starts it will automatically add the created mounts again. So no need to do all of the above again! From this point you are finished creating the mount. Some user however find it easy to have a shortcut on there desktop to the NAS. You can create a shortcut to your mounted NAS as follows:

sudo ln -s /mnt/CHOOSE-NAME /home/user/Desktop/CHOOSE-NAME

 



Share this....
Last Updated on Thursday, 08 September 2011 14:09
 

Comments 

 
#13 Jos 2012-05-01 19:14
Quoting Jos:
Quoting Jos:
The how-to works, up to the point of reboot. I have to mount NFS manually in the command prompt.

Why is the NFS not mounted at boot?

Changing nouser to user did the trick.

Not fully though, it mounts, but only when I go into the actual folder. I have applications that depend on it, and they cannot access the mount until I manually go into the mount folder...?
Quote
 
 
#12 Jos 2012-05-01 14:20
Quoting Jos:
The how-to works, up to the point of reboot. I have to mount NFS manually in the command prompt.

Why is the NFS not mounted at boot?

Changing nouser to user did the trick.
Quote
 
 
#11 Jos 2012-05-01 14:10
The how-to works, up to the point of reboot. I have to mount NFS manually in the command prompt.

Why is the NFS not mounted at boot?
Quote
 
 
#10 Marc 2012-03-03 23:25
Quoting Marc:
Hi Mark, thanks for this tutorial, I've been looking forever for a tutorial like this to have my Synology's folders viewable in Ubuntu.

But I'm running into a problem, I have a userid/password on those folders, is there a way to enter the userid/password in fstab to be able to access them? Every time I try to mount the fstab, I get an error message, "access denied by server while mounting".

Thanks again.

By the way, I now bookmarked your site and readin through your other tutorials.


Sorry Mark, I found my problem, was using the wrong folder names from my Synology NAS. Thanks again.
Quote
 
 
#9 Marc 2012-03-03 23:16
Hi Mark, thanks for this tutorial, I've been looking forever for a tutorial like this to have my Synology's folders viewable in Ubuntu.

But I'm running into a problem, I have a userid/password on those folders, is there a way to enter the userid/password in fstab to be able to access them? Every time I try to mount the fstab, I get an error message, "access denied by server while mounting".

Thanks again.

By the way, I now bookmarked your site and readin through your other tutorials.
Quote
 
 
#8 MadsAP 2012-02-18 12:20
Thanks- though I had to make it slightly different
This worked for me:

In NFS rights on Synology, Select a folder you want to access from your Ubuntu and click on the button 'NFS-rights'
I had to do this to make it work.
Hostname or IP: * (Just put a star *)
Rights: Read/Write
Root squash: No
Enable Asynchroon

Thats it
Quote
 
 
#7 Wim 2012-02-05 11:36
So that's all working. Now I want to move my photos from shotwell to my NAS. If I just export the photos to the /volume1/photo directory they don't show up in the photo station, nor in a UPnP client. Any ideas on how to do this?
Quote
 
 
#6 Bobo 2012-01-20 21:38
Nice tutorial, however, I too get the same error as Jonny:

fstab ENTRY:
192.168.1.200:/volume1/documents /mnt/NAS-Documents nfs nouser,atime,au to,rw,dev,exec, suid 0 0

sudo mount -a RESULT IN THIS ERROR:
mount.nfs: access denied by server while mounting 192.168.1.200:/volume1/documents
Quote
 
 
#5 Roy 2011-12-29 12:10
Hi, this tutorial was my saviour untill I upgraded to Ubuntu 11.10... today I followed all instructions again to be sure, but i keep getting this notice: mount.nfs: access denied by server while mounting 192.168.1.XX:/volume1/SHARENAME

I've been surching the internet, but I can not find the solution untill now.
Quote
 
 
#4 Mark Veenstra 2011-11-08 10:47
Quoting Emmanuel:
Hi Mark,

Thanks for the help.
I have done everything until the edition if the /etc/fstab and there i get blocked.
I just cant add anything, I tried to go directly to the file but cannot edit it.

Thanks for the input


When you execute the command 'sudo vi /etc/fstab' on the terminal, the file will be opened in VI.

Standard VI starts in COMMAND mode as they call it. You first have to press 'i' to get into INSERT mode. From that point you can edit the file.

Once you are done editing, hit ESCAPE and then type ':wq' and hit enter (without the ').

See next website for more info about VI:
www.tuxtopia.nl/2010/12/22/vim-for-dummies/
Quote