Mounting an NFS share (DNS-320) in Ubuntu

I wanted to stream videos from my NAS (a D-Link DNS-320) on my media centre (running Mythbuntu). Here’s how to use NFS.

First, set up an NFS share on the DNS-320, using the GUI. The only ‘gotcha’ is ensuring to specify which hosts can access the share using the ‘Host’ field in settings page 2-1-2. You can just use the ‘*’ wild card if you’re feeling lazy. Leaving this blank will block all hosts!

On the client, install nfs-common:

$ sudo apt-get install nfs-common

And create a folder to mount to:

$ sudo mkdir /media/nas

Now add the following line to /etc/fstab:

192.168.1.101:/mnt/HD/HD_a2/Data /media/nas nfs rw,hard,intr 0 0

192.168.1.101 is the (static) IP of the NAS.  You will either need to set up your NAS to have a static IP, or use the host name of the NAS here instead.

‘/mnt/HD/HD_a2/Data’ is the full path of the ‘Data’ folder, on ‘Volume 2′ (HDD 2) of the NAS.  This isn’t specified in the manual or help, which is really the reason of this post!  This will be different if you have enabled RAID.

The rest is reasonably self explanatory.

Finally, test it:

$ sudo mount -a
$ ls /media/nas

You should see your files!

5 thoughts on “Mounting an NFS share (DNS-320) in Ubuntu

  1. On my D-link DNS-320L I have two disc configured in JBOD array labeled as one voulme with name “Volume_1″ and its mapping name is “/mnt/HD/HD_a2″

    192.168.1.132:/mnt/HD/HD_a2 /media/nas nfs rw,hard,intr 0 0

    maps “Volume_1″ from NAS on my ubuntu machine in read/write mode

  2. Tried to follow your directions all is well until I get to

    alan@Phaeton:~$ sudo mount -a
    mount.nfs: access denied by server while mounting 192.168.1.5:/mnt/HD/HD_a2/
    mount.nfs: access denied by server while mounting 192.168.1.5:/mnt/HD/HD_b2/

    I have 2x drives in there as separate drives

    Alan…

  3. Alan,

    Go into “Management” -> “Account Management” -> “Users / Groups” and create a user account if you have not already done so. Within “Account Management”, click on “Network Shares”, and click the “New” button. This will launch the wizard for setting up a share.
    Select the appropriate users, groups, settings, and on the “Step 2-1: Assign Privileges – Access Methods”, ensure that the “NFS” checkbox is checked!

    Move along by clicking “Next” until you reach “Step 2-1-2: NFS Settings”.
    You will need to specify the Host IP address of the client that will be connecting to this share (your computers IP adress). If you want to connect with more then one machine try adding “/24″ after your computers IP adress so your whole network has access.

    Check full explanation:
    http://mrfrosti.com/2013/02/trials-and-tribulations-of-the-d-link-dns-320/

  4. Pingback: DLINK DNS 320L Installation, Config and Administration | Hayden Grant

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>