Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

New NAS - Cant mount/see HDD drives [SOLVED]
Goto page Previous  1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help!
View previous topic :: View next topic  
Author Message
paulm
LXF regular


Joined: Mon Apr 03, 2006 5:53 am
Posts: 242
Location: Oxfordshire, UK

PostPosted: Sun Jun 09, 2013 9:13 pm    Post subject: Reply with quote

GeordieJedi wrote:
Hi again.

Command =
Code:
ssh root@hostname


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


Quote:
Result =
Code:
/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:
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:
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.
Back to top
View user's profile Send private message
GeordieJedi
LXF regular


Joined: Thu Jun 14, 2007 11:36 pm
Posts: 335
Location: North East England

PostPosted: Sun Jun 09, 2013 9:40 pm    Post subject: Reply with quote

Hi again Paulm

Quote:
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:
 ssh root@192.168.x.x


and got the following response =
Code:
/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:
showmount -e


Result =
Code:
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
Back to top
View user's profile Send private message
paulm
LXF regular


Joined: Mon Apr 03, 2006 5:53 am
Posts: 242
Location: Oxfordshire, UK

PostPosted: Sun Jun 09, 2013 11:04 pm    Post subject: Reply with quote

GeordieJedi wrote:
Hi again Paulm


Very Happy Hi....

Quote:
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:
 ssh root@192.168.x.x


and got the following response =
Code:
/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:
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.

Quote:
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.

Quote:
Command 06 =
Code:
showmount -e


Result =
Code:
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:
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.

Quote:
Useful Info =

Hoth = NAS box
Yavin = Client PC


Very Happy I'll bear that in mind....

Paul.
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8457
Location: Warrington, UK

PostPosted: Sun Jun 09, 2013 11:56 pm    Post subject: Reply with quote

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)
Back to top
View user's profile Send private message
GeordieJedi
LXF regular


Joined: Thu Jun 14, 2007 11:36 pm
Posts: 335
Location: North East England

PostPosted: Wed Jun 12, 2013 12:06 am    Post subject: Reply with quote

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:
mount | grep nfs


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



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


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


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


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

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

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


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



Command 03 - =
Code:
ping Hoth


Result =
Code:
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:
ls -l /mnt


Result 04 - (on the client) =
Code:
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:
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:
clnt_create: RPC: Program not registered
Back to top
View user's profile Send private message
Ram
LXF regular


Joined: Thu Apr 07, 2005 10:44 pm
Posts: 1669
Location: Guisborough

PostPosted: Wed Jun 12, 2013 1:08 am    Post subject: Reply with quote

command 5, run from client with hostname or IP

Code:
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:
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.....
Back to top
View user's profile Send private message MSN Messenger
GeordieJedi
LXF regular


Joined: Thu Jun 14, 2007 11:36 pm
Posts: 335
Location: North East England

PostPosted: Wed Jun 12, 2013 10:18 pm    Post subject: Reply with quote

Command 05 =
Code:
showmount -e Hoth


Result 05 =
Code:
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:
/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.
Back to top
View user's profile Send private message
Ram
LXF regular


Joined: Thu Apr 07, 2005 10:44 pm
Posts: 1669
Location: Guisborough

PostPosted: Thu Jun 13, 2013 1:15 am    Post subject: Reply with quote

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.....
Back to top
View user's profile Send private message MSN Messenger
GeordieJedi
LXF regular


Joined: Thu Jun 14, 2007 11:36 pm
Posts: 335
Location: North East England

PostPosted: Thu Jun 27, 2013 12:39 am    Post subject: Reply with quote

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).
Back to top
View user's profile Send private message
paulm
LXF regular


Joined: Mon Apr 03, 2006 5:53 am
Posts: 242
Location: Oxfordshire, UK

PostPosted: Fri Jun 28, 2013 2:58 pm    Post subject: Reply with quote

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:
fang@sirius:~$ showmount -e openwrt
Export list for openwrt:
/mnt/sda2/stor 192.168.1.0/255.255.255.0



Quote:
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.


Quote:
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:
ps | grep nfsd


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

Code:
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.
Back to top
View user's profile Send private message
GeordieJedi
LXF regular


Joined: Thu Jun 14, 2007 11:36 pm
Posts: 335
Location: North East England

PostPosted: Fri Jun 28, 2013 11:58 pm    Post subject: Reply with quote

Command =
Code:
ps | grep nfsd


Result =
Code:
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:
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 ?
Back to top
View user's profile Send private message
paulm
LXF regular


Joined: Mon Apr 03, 2006 5:53 am
Posts: 242
Location: Oxfordshire, UK

PostPosted: Sat Jun 29, 2013 7:29 pm    Post subject: Reply with quote

GeordieJedi wrote:
Command =
Code:
ps | grep nfsd


Result =
Code:
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.

Quote:
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.

Quote:
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:
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.

Quote:
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.
Back to top
View user's profile Send private message
GeordieJedi
LXF regular


Joined: Thu Jun 14, 2007 11:36 pm
Posts: 335
Location: North East England

PostPosted: Sun Jun 30, 2013 1:24 am    Post subject: Reply with quote

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:
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:
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 ?
Back to top
View user's profile Send private message
paulm
LXF regular


Joined: Mon Apr 03, 2006 5:53 am
Posts: 242
Location: Oxfordshire, UK

PostPosted: Sun Jun 30, 2013 3:26 pm    Post subject: Reply with quote

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:
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:
cat /etc/exports_map



Quote:
I also tried to view the contents of the exports file by running the following command =
Code:
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:
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.
Back to top
View user's profile Send private message
GeordieJedi
LXF regular


Joined: Thu Jun 14, 2007 11:36 pm
Posts: 335
Location: North East England

PostPosted: Tue Aug 13, 2013 9:16 pm    Post subject: Reply with quote

Hi there, is this a possibly useful error message ?

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



Error message =
Code:
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
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help! All times are GMT
Goto page Previous  1, 2, 3, 4, 5  Next
Page 4 of 5

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast