New NAS - Cant mount/see HDD drives [SOLVED]

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

Postby paulm » Sun Jun 09, 2013 8:13 pm

GeordieJedi wrote:Hi again.

Command =
Code: Select all
ssh root@hostname


Umm, I think Nelz meant you to substitute your NAS hostname, not use hostname literally.


Result =
Code: Select all
/volume1/video   Yavin(rw,async,no_wdelay,no_root_squash,insecure_locks,anonuid=0,anongid=0)
/volume1/photo   Yavin(rw,async,no_wdelay,no_root_squash,insecure_locks,anonuid=0,anongid=0)
/volume1/music   Yavin(rw,async,no_wdelay,no_root_squash,insecure_locks,anonuid=0,anongid=0)
Hoth> exportfs


Which makes this result look very odd - that looks a lot like the output you would get either from exportfs or from doing something like:

Code: Select all
cat /etc/exports


Though I don't know what "Yavin) is. As an example of what you might expect, this is the result of running exportfs on a server I look after:

Code: Select all
root@thunderbird:~# exportfs
/var/files       10.1.0.0/255.255.255.0


Were you already connected to the NAS when you used the first command?

The other command you can use (when already ssh'd into the NAS) is "showmount -e".

Not sure about your NAS, but for several in my experience, you have an admin user which is what you would use logging into the web interface, but also a root user, which is what you should use when using SSH to get access to the device. Most of the time, the admin password and the root password are the same.

Paul.
paulm
LXF regular
 
Posts: 242
Joined: Mon Apr 03, 2006 4:53 am
Location: Oxfordshire, UK

Postby GeordieJedi » Sun Jun 09, 2013 8:40 pm

Hi again Paulm

Umm, I think Nelz meant you to substitute your NAS hostname, not use hostname literally.


Ha ha ha. Yeah, sorry for the confusion but I did SSH into my NAS box
(however I SSH'd into it's IP address rather than the hostname).

I actually ran the following code =
Code: Select all
 ssh root@192.168.x.x


and got the following response =
Code: Select all
/volume1/video   Yavin(rw,async,no_wdelay,no_root_squash,insecure_locks,anonuid=0,anongid=0)
/volume1/photo   Yavin(rw,async,no_wdelay,no_root_squash,insecure_locks,anonuid=0,anongid=0)
/volume1/music   Yavin(rw,async,no_wdelay,no_root_squash,insecure_locks,anonuid=0,anongid=0)
Hoth> exportfs   



I was SSH'd into the NAS when I ran those commands.
I took a chance and used the admin PW for root and it worked !


Command 06 =
Code: Select all
showmount -e


Result =
Code: Select all
Export list for Hoth:

(It runs the command, there is no output in the shell, but it again seems to
complete properly and then the cursor moves to the next line.
Ready for another new command).


Useful Info =

Hoth = NAS box
Yavin = Client PC
User avatar
GeordieJedi
LXF regular
 
Posts: 335
Joined: Thu Jun 14, 2007 10:36 pm
Location: North East England

Postby paulm » Sun Jun 09, 2013 10:04 pm

GeordieJedi wrote:Hi again Paulm


:D Hi....

Ha ha ha. Yeah, sorry for the confusion but I did SSH into my NAS box
(however I SSH'd into it's IP address rather than the hostname).

I actually ran the following code =
Code: Select all
 ssh root@192.168.x.x


and got the following response =
Code: Select all
/volume1/video   Yavin(rw,async,no_wdelay,no_root_squash,insecure_locks,anonuid=0,anongid=0)
/volume1/photo   Yavin(rw,async,no_wdelay,no_root_squash,insecure_locks,anonuid=0,anongid=0)
/volume1/music   Yavin(rw,async,no_wdelay,no_root_squash,insecure_locks,anonuid=0,anongid=0)
Hoth> exportfs   


So you got this response when you tried to log into the NAS? Very odd.... That looks a great deal like the format that I'd expect from /etc/exports.

As an example, this is exports from one of the servers I run (its used as a backup box, mainly):

Code: Select all
root@thunderbird:~# cat /etc/exports
# See exports(5) for a description.
# This file contains a list of all directories exported to other computers.
# It is used by rpc.nfsd and rpc.mountd.
/var/files 10.1.0.0/255.255.255.0(rw,sync,no_wdelay,nohide,no_root_squash)


In this instance, the IP range specified after the directory to be exported allows any machine on the 10.1.0.x subnet to mount the resource. In your case, only one machine is specified, but that seems to be the only difference.

I was SSH'd into the NAS when I ran those commands.
I took a chance and used the admin PW for root and it worked !


It seems to be a common way of doing things for that type of hardware - my Icy Box NAS was the same with its original firmware, as is the Linksys NLSU2 that I have connected to my Toppfield PVR.

Command 06 =
Code: Select all
showmount -e


Result =
Code: Select all
Export list for Hoth:

(It runs the command, there is no output in the shell, but it again seems to
complete properly and then the cursor moves to the next line.
Ready for another new command).


Hmm. Can you see the contents of /etc/exports? When you're ssh'd into the NAS as root, try this:

Code: Select all
cat /etc/exports


Unless they've done something very non-standard, I would expect the directories set for NFS use to be listed there, as in the example I gave above.

Useful Info =

Hoth = NAS box
Yavin = Client PC


:D I'll bear that in mind....

Paul.
paulm
LXF regular
 
Posts: 242
Joined: Mon Apr 03, 2006 4:53 am
Location: Oxfordshire, UK

Postby nelz » Sun Jun 09, 2013 10:56 pm

paulm wrote:So you got this response when you tried to log into the NAS? Very odd.... That looks a great deal like the format that I'd expect from /etc/exports.


Maybe there's something in the profile that outputs this. It is a NAS box after all.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8493
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby GeordieJedi » Tue Jun 11, 2013 11:06 pm

Right, In my hosts file I've added the NAS's IP to point to it's hostname.

I'm going back over some of the help and commands with the following results.

(I apologise if there is too much code here, I was trying condense what we have done so far).


Command 01 - (On the NAS)
Code: Select all
mount | grep nfs


Result 01 =
Code: Select all
none on /proc/fs/nfsd type nfsd (0)



Command 02 - (on the NAS) =
Code: Select all
sudo mount /mnt/video_share/video


Result 02 =
Code: Select all
-ash: sudo: not found


===================
Command 02-A (on the NAS) =
Code: Select all
mount /mnt/video_share/video


Result 02-A
Code: Select all
mount: can't find /mnt/video_share/video in /etc/fstab

======================

Command 02 - (on the client)
Code: Select all
sudo mount /mnt/video_share/video


Result 02 - (on the client) =
Code: Select all
mount: can't find /mnt/video_share/video in /etc/fstab or /etc/mtab



Command 03 - =
Code: Select all
ping Hoth


Result =
Code: Select all
4 bytes from Hoth (192.168.x.x): icmp_req=12 ttl=64 time=0.153 ms
64 bytes from Hoth  (192.168.x.x): icmp_req=13 ttl=64 time=0.154 ms
64 bytes from Hoth (192.168.x.x): icmp_req=14 ttl=64 time=0.330 ms
64 bytes from Hoth (192.168.x.x): icmp_req=15 ttl=64 time=0.154 ms
64 bytes from Hoth (192.168.x.x): icmp_req=16 ttl=64 time=0.156 ms
64 bytes from Hoth (192.168.x.x): icmp_req=17 ttl=64 time=0.151 ms



Command 04 - (on the client) =
Code: Select all
ls -l /mnt


Result 04 - (on the client) =
Code: Select all
drwxr-xr-x 3 me me 4096 May 16 00:35 music_share
drwxr-xr-x 3 me me 4096 May 16 00:35 photo_share
drwxr-xr-x 3 me me 4096 May 16 00:35 video_share



Command 05 =
Code: Select all
showmount -e


Result 05 (on the NAS) =
(Nothing, the command executes and the cursor returns to the next line).


Result 05 = (on the client) =
Code: Select all
clnt_create: RPC: Program not registered
User avatar
GeordieJedi
LXF regular
 
Posts: 335
Joined: Thu Jun 14, 2007 10:36 pm
Location: North East England

Postby Ram » Wed Jun 12, 2013 12:08 am

command 5, run from client with hostname or IP

Code: Select all
showmount -e Hoth


command 2, going by the last fstab you posted, you're using /media not /mnt and it looks like you may have equal folders in both. Just run
Code: Select all
mount

on the client to see what's mounted, which should be what is in your fstab.

lubuntu LXDE 13.10 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
User avatar
Ram
LXF regular
 
Posts: 1676
Joined: Thu Apr 07, 2005 9:44 pm
Location: Guisborough

Postby GeordieJedi » Wed Jun 12, 2013 9:18 pm

Command 05 =
Code: Select all
showmount -e Hoth


Result 05 =
Code: Select all
Export list for Hoth:

Nothing really. It just shows the line above and then the cursor returns to the
next line, waiting for the next command.


Command 02 =
Code: Select all
/dev/sde2 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)

none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)

devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)

none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)

/dev/sde5 on /home type ext4 (rw)
/dev/sde7 on /media/Films_02 type ext4 (rw)
/dev/sde8 on /media/Data_02 type ext4 (rw)
/dev/sdf5 on /media/Sharedata_01 type ext3 (rw)
/dev/sdf6 on /media/Music_01 type ext4 (rw)
/dev/sdf7 on /media/Pictures_01 type ext3 (rw)
/dev/sdf8 on /media/Films_01 type ext3 (rw)
/dev/sdf9 on /media/TV_01 type ext3 (rw)

rpc_pipefs on /run/rpc_pipefs type rpc_pipefs (rw)
gvfs-fuse-daemon on /home/me/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=me)


All of the items mentioend here are from my internal HDD drive partitions
spread across two internal HDD's.

None of my NAS box HDD's appear in that list at all.
User avatar
GeordieJedi
LXF regular
 
Posts: 335
Joined: Thu Jun 14, 2007 10:36 pm
Location: North East England

Postby Ram » Thu Jun 13, 2013 12:15 am

Right, it appears NFS isn't running on the NAS. You have entries in /etc/exportfs but they haven't been published.

Not sure on how to start NFS Server on your Busybox... can you check it is running from your NAS' Web admin page.

lubuntu LXDE 13.10 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
User avatar
Ram
LXF regular
 
Posts: 1676
Joined: Thu Apr 07, 2005 9:44 pm
Location: Guisborough

Postby GeordieJedi » Wed Jun 26, 2013 11:39 pm

I've double checked and Im pretty sure that NFS is running.
It states that it is on the web interface.

Although so is Windows and Mac file sharing too.
(Does that matter if they are all running or not ?)

I've been following this tutorial from the synology website.

On the "Before you start" section.
I've done everything it's asked (except) the last step =

- Configuring your DiskStation to be accessible over the Internet
see this tutorial.

The reason being is, I didn't think it was vital.
As I only want the files available on my local network for now.

(I eventually want to be able to access my files from across the internet.
But I was just trying to get to my files from the local network to begin with).


I also discovered that my UID's are different on the NAS and clients =

My username (on the NAS) = 1026
My username (on the client PC) = 1000

(I believe they need to match, and after some digging I think I have to change them
on the client as I don't think that it's possible on the NAS).
User avatar
GeordieJedi
LXF regular
 
Posts: 335
Joined: Thu Jun 14, 2007 10:36 pm
Location: North East England

Postby paulm » Fri Jun 28, 2013 1:58 pm

GeordieJedi wrote:I've double checked and Im pretty sure that NFS is running.
It states that it is on the web interface.


If "shomount -e Hoth" shows nothing, either NFS isn't running or there is nothing set in exports.

As an example, this is the result of executing the same command from my laptop, querying my Icy Box NAS:

Code: Select all
fang@sirius:~$ showmount -e openwrt
Export list for openwrt:
/mnt/sda2/stor 192.168.1.0/255.255.255.0



Although so is Windows and Mac file sharing too.
(Does that matter if they are all running or not ?)


Shouldn't make any difference, though unless you have a Mac, you might was well disable the Mac file sharing. Most of the small commercial NAS units are fairly low on resources, so saving anything you can is a good idea.


My username (on the NAS) = 1026
My username (on the client PC) = 1000

(I believe they need to match, and after some digging I think I have to change them
on the client as I don't think that it's possible on the NAS).


It shouldn't matter. The only UID that would normally make a difference is the root UID (0). That can be overcome by using "no_root_squash" in the exports line.

On my Icy Box, the easiest way to check whether the NFS daemon is running is to ssh to the NAS and enter this command:

Code: Select all
ps | grep nfsd


On the Icy Box, this is the response I get to the command:

Code: Select all
root@OpenWrt:~# ps | grep nfsd
 2098 root         0 SW<  [nfsd4]
 2099 root         0 SW<  [nfsd4_callbacks]
 2105 root         0 SW   [nfsd]
 2106 root         0 SW   [nfsd]
 2107 root         0 SW   [nfsd]
 2108 root         0 SW   [nfsd]
 2109 root         0 SW   [nfsd]
 2110 root         0 SW   [nfsd]
 2111 root         0 SW   [nfsd]
 2112 root         0 SW   [nfsd]
23006 root      4972 S    grep nfsd


I would suggest you run that check, since the lack of any response to the "showmount -e Hoth" command certainly suggests the NFS daemon isn't running.

Paul.
paulm
LXF regular
 
Posts: 242
Joined: Mon Apr 03, 2006 4:53 am
Location: Oxfordshire, UK

Postby GeordieJedi » Fri Jun 28, 2013 10:58 pm

Command =
Code: Select all
ps | grep nfsd


Result =
Code: Select all
4814 root         0 SW   [nfsd4]
4815 root         0 SW   [nfsd]
4816 root         0 SW   [nfsd]
4817 root         0 SW   [nfsd]
4818 root         0 SW   [nfsd]
16092 root      2988 S    grep nfsd


I've also turned off Mac file sharing.

Also, I'm not sure I've got an exports file.
I checked within the etc DIR and couldn't find it at all.
I used the "show hidden files" function.

However when I ran the command =
Code: Select all
sudo gedit /etc/exports


I got a root version of the Gedit text editor with a blank text file !


Ive just checked and I don't have the package "nfs-kernel-server" installed on my client PC.
Is this necessary ?
User avatar
GeordieJedi
LXF regular
 
Posts: 335
Joined: Thu Jun 14, 2007 10:36 pm
Location: North East England

Postby paulm » Sat Jun 29, 2013 6:29 pm

GeordieJedi wrote:Command =
Code: Select all
ps | grep nfsd


Result =
Code: Select all
4814 root         0 SW   [nfsd4]
4815 root         0 SW   [nfsd]
4816 root         0 SW   [nfsd]
4817 root         0 SW   [nfsd]
4818 root         0 SW   [nfsd]
16092 root      2988 S    grep nfsd


Ok, that means that the NFS daemon is running.

I've also turned off Mac file sharing.


Not much point in wasting the resources if you don't need to share with a Mac.

Also, I'm not sure I've got an exports file.
I checked within the etc DIR and couldn't find it at all.
I used the "show hidden files" function.

However when I ran the command =
Code: Select all
sudo gedit /etc/exports


I got a root version of the Gedit text editor with a blank text file !


Sorry. Should have been clearer. The file should be in /etc on the NAS - it is normally the file which defines the mount points that the NAS will export.

Ive just checked and I don't have the package "nfs-kernel-server" installed on my client PC.
Is this necessary ?


No. For a NFS client, all you should need would be nfs-common (Debian) or nfs-utils (Arch and some others). The nfs-kernel-server package should only be necessary if you want to use your pc as an NFS server.

I've had a look at the user manual for the NAS, but its not terribly helpful. From the response you've been getting when logged into it with SSH, it looks as though the Synology firmware is Linux-based, but there is no way to tell how much they've customised. So knowing whether there is an /etc/exports on the NAS is difficult. Don't know why they would change it, but I would expect that when you set up the NFS shares through the web interface it would have created /etc/exports on the NAS. Have you checked for it?

Paul.
paulm
LXF regular
 
Posts: 242
Joined: Mon Apr 03, 2006 4:53 am
Location: Oxfordshire, UK

Postby GeordieJedi » Sun Jun 30, 2013 12:24 am

I SSH'd into the NAS again and took a look at the etc DIR.

Here is a list of some of the DIRs in the etc directory
Code: Select all
rc.subr                         synopackageslimit.conf
dhcpc                           lvm                             rc.volume                       synosyslog.conf
exports                         mke2fs.conf                     resolv.conf                     synouser.conf
exports_map                     mt-daapd.playlist               rsyncd.conf                     sysconfig
firewall                        mtab


You're right, exports and exports_map are definitely in there.

I also tried to view the contents of the exports file by running the following command =
Code: Select all
vi /etc/exports


And it launced vi and took me to the file. It seemed to be empty. It was showing
line 1 of 1 within the text file.

Should there be any entries in the exports file ?
User avatar
GeordieJedi
LXF regular
 
Posts: 335
Joined: Thu Jun 14, 2007 10:36 pm
Location: North East England

Postby paulm » Sun Jun 30, 2013 2:26 pm

GeordieJedi wrote:I SSH'd into the NAS again and took a look at the etc DIR.

Here is a list of some of the DIRs in the etc directory
Code: Select all
rc.subr                         synopackageslimit.conf
dhcpc                           lvm                             rc.volume                       synosyslog.conf
exports                         mke2fs.conf                     resolv.conf                     synouser.conf
exports_map                     mt-daapd.playlist               rsyncd.conf                     sysconfig
firewall                        mtab


You're right, exports and exports_map are definitely in there.


I don't know what exports_map is - not a file I'm familiar with. What is its contents? Easiest way to view would be to enter this:

Code: Select all
cat /etc/exports_map



I also tried to view the contents of the exports file by running the following command =
Code: Select all
vi /etc/exports


And it launced vi and took me to the file. It seemed to be empty. It was showing
line 1 of 1 within the text file.

Should there be any entries in the exports file ?


Under a normal system, yes. It defines what is available for NFS exports and lists restrictions on those exports.

As an example, this is /etc/exports from my small server:

Code: Select all
root@sms:~# cat /etc/exports
# See exports(5) for a description.
# This file contains a list of all directories exported to other computers.
# It is used by rpc.nfsd and rpc.mountd.

/home/files/data-1/stor   192.168.1.0/255.255.255.0(no_root_squash,rw)


That sets the directories under /home/files/data-1/stor as mountable to machines in the 192.168.1.x subnet, sets the share as read write and tells the NFS daemon not to remap root uid (0) requests to another UID number (which is the normal NFS default).

Unless Synology has done something odd, I would expect /etc/exports on your NAS to have similar format. Trouble is, there doesn't seem to be much information on the inner workings of the Synology firmware, so they may be doing something different. Since you've already set up NFS shares through the web UI, I don't know where the NAS is storing the share definitions.

Paul.
paulm
LXF regular
 
Posts: 242
Joined: Mon Apr 03, 2006 4:53 am
Location: Oxfordshire, UK

Postby GeordieJedi » Tue Aug 13, 2013 8:16 pm

Hi there, is this a possibly useful error message ?

Command =
Code: Select all
tail -n 0 -f /var/log/messages



Error message =
Code: Select all
Aug 13 21:21:26 exportfs[28507]: Yavin has non-inet addr



(Yavin is the name of a client PC, attempting to access the NAS)

Thanks
User avatar
GeordieJedi
LXF regular
 
Posts: 335
Joined: Thu Jun 14, 2007 10:36 pm
Location: North East England

PreviousNext

Return to Help!

Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests