LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Unable to get my NAS mounted and seen by client PC's (https://www.linuxquestions.org/questions/linux-newbie-8/unable-to-get-my-nas-mounted-and-seen-by-client-pcs-4175485041/)

GeordieJedi 11-18-2013 01:25 PM

Unable to get my NAS mounted and seen by client PC's
 
Hi all.

OK, I've finally taken the plunge and gotten a fantastic nice new shiny NAS
(A Synology DS413J)

However I'm struggling to get my NAS HDDs mounted and visible on my PC/network.


I've ran through the set-up (using Synology Disk Station Manager = DSM).
I can connect to the NAS via a web browser fine.
I can also ping and SSH in to the NAS without any issue.

I have added mount point entries in the fstab.
(Which I beleive are correct and "should" work).

I have created a static IP for my NAS and other client equipment.
(This is just within my internal network).


My main questions are -

1. How do I now get my NAS and it's HDD's to appear/mount/be usable on my network
so that either PC can connect to it and share/swap data and files ?

I have followed the tutorial on the website, but it's still not working properly
yet.

NB - I have ran through every step except the last one (which is - "How to make your
synology NAS accessible via the internet"). As I'm only interested in accessing my files
via my own internal network at the moment. Eventually I'd like to be able to access
my files over the internet, but I'm not to worried about this at the moment.


I've created some mount points in my fstab, here's an example -

Code:

Hoth:/volume1/video /mnt/video_share/video nfs nouser,atime,auto,rw,dev,exec,suid 0 0
#
Hoth:/volume1/photo /mnt/photo_share/photo nfs nouser,atime,auto,rw,dev,exec,suid 0 0
#
Hoth:/volume1/music /mnt/music_share/music nfs nouser,atime,auto,rw,dev,exec,suid 0 0
#



When I go to Dolphin (the file manager) there are icons for the 3 networked drives,
however if I click on them I get the following error message =

Code:

    "An error occurred while accessing 'volume1/music on Hoth', the system responded: mount:only root can mount Hoth:/volume1/music on mnt/music_share/music"

The main problem I seem to be getting is a permissions denied error coming from the NAS.
E.G. -

Command =
Code:

sudo mount 192.168.x.x:/volume1/video -t nfs /media/video_share
Error message =
Code:

mount.nfs: access denied by server while mounting 192.168.x.x:/volume1/video

Useful info

Hoth = NAS
Yavin = Client PC

OS = Linux / Ubuntu 12.04
Desktop Environment = KDE
File manager = Dolphin


Virgin media cable modem/router (downstairs)
Cat cable run upstairs to switch (upstairs in office)
PCs and NAS connected to switch (upstairs in office)


Synology DS413J NAS =
2x 3TB HDD's in Synolgys hybrid RAID array (Kinda RAID 1) making a total of
2.68 TB usable space


Any help or advice would be gratefuly appreciated !
Thanks.

lpwevers 11-18-2013 03:20 PM

Hi,

Well it's obviously your NAS exports are not setup properly. Or there's some firewall blocking access. Since you're using NFS, can you run the command below on your linux box (as root) and post the output?
Code:

showmount -e Hoth
It should output something like this:
Code:

Export list for Hoth:
/volume1/video 192.168.x.x/255.255.255.0
/volume1/photo 192.168.x.x/255.255.255.0
/volume1/music 192.168.x.x/255.255.255.0

If not, you your exports on the NAS aren't setup properly or it's being blocked by a firewall.

schneidz 11-18-2013 03:23 PM

Quote:

Originally Posted by GeordieJedi (Post 5066752)
...
I can also ping and SSH in to the NAS without any issue.
...

have you considered sharing files via sshfs ?

ericson007 11-18-2013 04:02 PM

Double check that you are not using cifs for the storage pool. Using cifs you will require smbclient instead.

GeordieJedi 11-23-2013 10:52 AM

Hi all. Thanks for all the help so far.

OK, I tried the following command on the client PC.

Command =
Code:

showmount -e Hoth
Result =
Code:

/volume1/video advancedsearch.virginmedia.com
/volume1/photo advancedsearch.virginmedia.com
/volume1/music advancedsearch.virginmedia.com

Which seems a bit strange

lpwevers 11-23-2013 03:45 PM

Looks to me that you're exports on the NFS server are not setup properly. They seem to be exported to the domain advancedsearch.virginmedia.com.

Now I can only assume that virginmedia.com is your internet provider and that the NAS is getting it's FQN from there and using it as a domain to export to.

The other thing that just occurred to me is that you may be using NFS4 on the NAS and try to use NFS3 on the client. Can you please confirm that on both sites you're using the same NFS version? If you're using NFS4 then nfs4 should be the filesystem to use in your fstab. (And I believe the mount options change as well, but sorry, if that's the case, I'm not an expert in that area).


Quote:

Originally Posted by GeordieJedi (Post 5069439)
Hi all. Thanks for all the help so far.

OK, I tried the following command on the client PC.

Command =
Code:

showmount -e Hoth
Result =
Code:

/volume1/video advancedsearch.virginmedia.com
/volume1/photo advancedsearch.virginmedia.com
/volume1/music advancedsearch.virginmedia.com

Which seems a bit strange


GeordieJedi 12-06-2013 04:15 PM

OK, here is some more information.

N.B. I tried these commands on my 2nd PC (laptop) but with the same entries in the FSTAB


Command 01 (on the client PC)
Code:

mount | grep nfs
Result 01 (on the client)
Code:

nfsd on /proc/fs/nfsd type nfsd (rw)


Command 02 (on the client PC)
Code:

sudo mount /mnt/video_share/video
Result
Code:

mount.nfs: access denied by server while mounting Hoth:/volume1/video


Command 03 (on the client PC)
Code:

ls -l /mnt
Result
Code:

drwxr-xr-x 3 root root 4096 Dec  6 21:47 music_share
drwxr-xr-x 3 root root 4096 Dec  6 21:47 photo_share
drwxr-xr-x 3 root root 4096 Dec  6 21:47 video_share


lpwevers 12-07-2013 03:13 AM

Quote:

Originally Posted by GeordieJedi (Post 5076651)
OK, here is some more information.

Command 02 (on the client PC)
Code:

sudo mount /mnt/video_share/video
Result
Code:

mount.nfs: access denied by server while mounting Hoth:/volume1/video

Well, that means you're client is OK but your NAS is denying the connection. From your earlier outputs I can see that the directories are exported. So, what options did you use for the export? And more important, are they exported to "the world" or just to (a wrong) single host?

GeordieJedi 12-07-2013 12:30 PM

Hi there lpwevers.

I'm not entirely sure what you mean by that.

Here is the exports file from my laptop -

Code:

# /etc/exports: the access control list for filesystems which may be exported
#                to NFS clients.  See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes      hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
#


I am trying to use the defualt shared directorys (music, photo, video) that are created when you set up the
1st volume (when I set up the NAS in the begining).

Hope this helps

lpwevers 12-07-2013 02:19 PM

Hi,

Sorry, that's not what I meant. It seems that your NAS (Hoth) is denying the mount request. So that should:
1. Export the shares (which it does, as can be seen from the output of the showmount command)
2. Allow your client to actually mount the share.

So check on your Hoth server if your client is allowed to perform the mount (Sorry, I don't have a Synology NAS, so I can't provide you with information on how to set that on your NAS.

Quote:

Originally Posted by GeordieJedi (Post 5077023)
Hi there lpwevers.

I'm not entirely sure what you mean by that.

Here is the exports file from my laptop -

Code:

# /etc/exports: the access control list for filesystems which may be exported
#                to NFS clients.  See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes      hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
#


I am trying to use the defualt shared directorys (music, photo, video) that are created when you set up the
1st volume (when I set up the NAS in the begining).

Hope this helps


GeordieJedi 01-01-2014 03:44 PM

OK, I have attempted a couple of new things.

Whilst logged into the NAS box I have updated the hosts & hosts.allowed files.
I have added both the IP addresses and host names into these files.

E.G.

Hosts file -
Code:

127.0.x.x      localhost
192.168.x.x    Hoth
192.168.x.x    Yavin
192.168.x.x    stardestroyer

Hosts.allow file -
Code:

#
# hosts.allow  This file describes the names of the hosts which are
#              allowed to use the local INET services, as decided
#              by the '/usr/sbin/tcpd' server.
#
#
192.168.x.x    Yavin
192.168.x.x    stardestroyer


Here is the output from my exports file on the NAS box =

Code:

/volume1/video  stardestroyer(rw,async,no_wdelay,no_root_squash,insecure_locks,anonuid=0,anongid=0) Yavin(rw,async,no_wdelay,no_root_squash,insecure_locks,anonuid=0,anongid=0)

/volume1/photo  stardestroyer(rw,async,no_wdelay,no_root_squash,insecure_locks,anonuid=0,anongid=0)  Yavin(rw,async,no_wdelay,no_root_squash,insecure_locks,anonuid=0,anongid=0

/volume1/music  stardestroyer(rw,async,no_wdelay,no_root_squash,insecure_locks,anonuid=0,anongid=0) Yavin(rw,async,no_wdelay,no_root_squash,insecure_locks,anonuid=0,anongid=0)

/volume1/homes  stardestroyer(rw,async,no_wdelay,no_root_squash,insecure_locks,anonuid=0,anongid=0)


I still get the error message when I run the following code =

Code =
Code:

sudo mount /mnt/video_share/video
error message =
Code:

mount.nfs: access denied by server while mounting Hoth:/volume1/video

N.B.
Yavin and stardestroyer are the hostnames of my client PC's

GeordieJedi 01-17-2014 01:55 PM

IT'S WORKING !!!!
(Apologies for the caps but I'm absolutely over the moon !)

I'm not 100% sure but, I believe that updating the hosts and
hosts.allowed files has done the trick.

I now have access to my NAS via the web browser and more importantly the GUI.

I have been able to back up my data and media from my PC's to the NAS
It's working well.

(All I need to do now, is figure out how to get it talking to my Raspberry Pi
and then I'm going to be cooking with gas !)

A BIG THANK YOU everyone who helped me with this
issue.

You are all legends !

Thanks again, it's MUCH appreciated.

Take it easy


All times are GMT -5. The time now is 01:13 PM.