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
nelz
Site admin


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

PostPosted: Tue May 21, 2013 12:36 am    Post subject: Reply with quote

You certainly don't need smbfs tomount nfs shares, what do you get it you run

Code:
sudo mount /mnt/video_share/video

_________________
"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
Ram
LXF regular


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

PostPosted: Tue May 21, 2013 8:57 pm    Post subject: Reply with quote

GeordieJedi wrote:
Hi there nelz.

I've changed the hostname of my NAS now (as it's a lot easier to type).

I've tried a few quick experiments with the FSTAB and I did manage to get some mount points created by adding
this line to the FSTAB file =

Code:
Hoth:/volume1/photo /mnt/photo_share/photo nfs nouser,atime,auto,rw,dev,exec,suid 0 0


So the mount points showed up on the mnt dir, but they were owned by root
I then tried a chown to my username but then bash said that the dirs did not exist !


Can you actual ping the NAS by hostname

Code:
 ping Hoth

_________________

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: Tue May 21, 2013 10:14 pm    Post subject: Reply with quote

Nelz -

Command =
Code:
sudo mount /mnt/video_share/video



This is the result =
Code:
mount: wrong fs type, bad option, bad superblock on Hoth:/volume1/video,
       missing codepage or helper program, or other error
       (for several filesystems (e.g. nfs, cifs) you might
       need a /sbin/mount.<type> helper program)
       In some cases useful info is found in syslog - try
       dmesg | tail  or so



Ram -

Command =
Code:
ping Hoth


Result =
Code:
ping: unknown host Hoth
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: Tue May 21, 2013 11:22 pm    Post subject: Reply with quote

You need to either edit your fstab and replace Hoth with its IP or put a line in your /etc/hosts file mapping the IP to the hostname.

192.168.xxx.xxx Hoth

Looking at the spec of the NAS I don't see NFS as option, unless you have set it up on the NAS.

In your browser try

smb://192.168.xxx.xxx or smb://Hoth
_________________

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: Sun May 26, 2013 10:19 pm    Post subject: Reply with quote

Hi again
(I've edited my 1st post to include my distro and DE).

I have also installed the package "nfs-common".
Do I also need to install "nfs-kernel-server" ?

I'm happy to try and add the IP address to the etc/hosts address.
However It's already changed once.
(I don't have a static IP address. My ISP is Virgin).
But am I right in thinking that I can (kind of) assign myself a static IP
address (within my own network, for my NAS box ?)


@ Ram -
I double checked, the NAS does support SMB and NFS.
I have enabled NFS on the NAS box.


@ Nelz

Is it worth me adding this line -
Code:
rsize=8192,wsize=8192,soft  0 0

to by FSTAB insted of what I have there already ?


I was following this guide here for my FSTAB options.
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: Sun May 26, 2013 11:27 pm    Post subject: Reply with quote

Your IP supplies your External address your NAS is on the Internal (NAT) address, usually the 192.168.*.* address. The 192.168.*.* comes from your router.

You can't ping by hostname on your internal network, hence
Code:
ping: unknown host Hoth


So you'll either have to edit your /etc/hosts file or put the IP address of the NAS in the fstab file though if you switch off your router you might get a new IP assigned to the NAS when the router is powered back up.

You should be able to in your router setup, set a static IP for the NAS - I'm a VM customer but I don't have their router so not sure on how to do that.

Yes, you will need to install nfs-common on your client (kde desktop)
_________________

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: Sun May 26, 2013 11:47 pm    Post subject: Reply with quote

Hi Ram.
Yeah, I'm using a router (and a switch too, which connects my PC's and NAS box together. Which is situated upstairs in my office).



So when I ping =
Code:
192.168.x.x:xxxx (where xxxx = port number)


Response =
Code:
unknown host 192.168.x.x:xxxx


However when I ping
Code:
192.168.x.x


I get the response =
Code:
64 bytes from 192.168.x.x: icmp_req=1 ttl=64 time=0.168 ms
64 bytes from 192.168.x.x: icmp_req=2 ttl=64 time=0.150 ms
64 bytes from 192.168.x.x: icmp_req=3 ttl=64 time=0.165 ms
64 bytes from 192.168.x.x: icmp_req=4 ttl=64 time=0.159 ms
64 bytes from 192.168.x.x: icmp_req=5 ttl=64 time=0.158 ms
64 bytes from 192.168.x.x: icmp_req=6 ttl=64 time=0.157 ms

Which keeps on going, and going and going......
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: Mon May 27, 2013 12:04 am    Post subject: Reply with quote

You can't ping ip:port only the ip. You shouldn't need a port number.
The port number is probably for the NAS's web interface.

Your fstab should look something like this

Quote:
192.168.*.*:/srv/logs /mnt/logs nfs nouser,defaults,atime,auto,rw,dev,exec,suid 0 0


rsize=8192,wsize=8192 can be added later once working.
_________________

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 May 29, 2013 10:29 pm    Post subject: Reply with quote

Ok I've tried a little experiment.

I've made 2 amendments to my FSTAB.

1. I've changed the mount points to the /media dir rather than the std /mnt dir.
(I realise /mnt is convention however Im using Ubuntu 12.04 and I've always had
better luck putting my normal HDD mounted partitions in this dir).

2. Added the IP address as you suggested on one of the lines

FSTAB =
Code:
192.168.x.x:/volume1/video /media/video_share/video nfs nouser,atime,auto,rw,dev,exec,suid 0 0
#
Hoth:/volume1/photo /media/photo_share/photo nfs nouser,atime,auto,rw,dev,exec,suid 0 0
#
Hoth:/volume1/music /media/music_share/music nfs nouser,atime,auto,rw,dev,exec,suid 0 0


Error messages =
Code:
mount.nfs: access denied by server while mounting 192.168.x.x:/volume1/video
mount.nfs: Failed to resolve server Hoth: Name or service not known
mount.nfs: Failed to resolve server Hoth: Name or service not known


The first line in the error message seems interesting.....

So, why can't I ping Hoth ?
I can access the NAS via a web browser.

I can see that it has an IP address if I log into my routers advanced settings page
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: Wed May 29, 2013 11:07 pm    Post subject: Reply with quote

GeordieJedi wrote:
Ok I've tried a little experiment.

I've made 2 amendments to my FSTAB.

1. I've changed the mount points to the /media dir rather than the std /mnt dir.
(I realise /mnt is convention however Im using Ubuntu 12.04 and I've always had
better luck putting my normal HDD mounted partitions in this dir).


Can't see that changing the mount directory would make the slightest difference - you can set a mount directory to whatever you like - the NAS won't care, nor will you machine, so long as the mount point is a valid and writeable resource.

Quote:
2. Added the IP address as you suggested on one of the lines

FSTAB =
Code:
192.168.x.x:/volume1/video /media/video_share/video nfs nouser,atime,auto,rw,dev,exec,suid 0 0
#
Hoth:/volume1/photo /media/photo_share/photo nfs nouser,atime,auto,rw,dev,exec,suid 0 0
#
Hoth:/volume1/music /media/music_share/music nfs nouser,atime,auto,rw,dev,exec,suid 0 0


Error messages =
Code:
mount.nfs: access denied by server while mounting 192.168.x.x:/volume1/video
mount.nfs: Failed to resolve server Hoth: Name or service not known
mount.nfs: Failed to resolve server Hoth: Name or service not known


The first line in the error message seems interesting.....


Have you got rpcbind (or portmapper) running? By default, NFS uses file locking, which requires one of the other of those two services to be running on the client. Otherwise, you need to specify no lock - on a manual mount, that would be

Code:
 -o nolock


but I'm not sure what you'd use in fstab - I always mount my NFS shares using a script, so I'm not that familiar with what's needed in fstab.

Quote:
So, why can't I ping Hoth ?
I can access the NAS via a web browser.

I can see that it has an IP address if I log into my routers advanced settings page


Some routers provide local DNS services, but many do not. Without local DNS support in the router, you need to add entries to the /etc/host files on all machines which might access the NAS linking its name to its IP (assuming you either have it set to use a static IP or you have your router set to assign it a constant IP, using the NAS's MAC).

Any network resource of that sort should be on a constant IP so other things on the network know where to find it. I have a small server (which also doubles as a NAS) which does this - it provides both DHCP and DNS support for my local network using Dnsmasq. I prefer to record the MAC numbers of anything that I want on a constant IP and use the server to make sure they that always get that same IP, but if your router doesn't have that sort of capablity, you may need to set the NAS with a static IP instead.

Paul.
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 May 29, 2013 11:43 pm    Post subject: Reply with quote

Just to make sure you have the correct permissions on the mount point run

Code:
 ls -l /mnt


When using the your browser are using Hoth or the IP ?
_________________

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 May 30, 2013 12:08 am    Post subject: Reply with quote

Ok.

I've created a static/reserved IP address in the VM routers advanced settings page.

I've looked in the etc dir and I don't seem to have a etc/hosts file.
I can see "hosts.conf" file. Is this the same thing ?
Otherwise do I just create a text file called hosts ?


The permissions are correct in the original mnt dir,
but not in the media dir (as I haven't changed them yet).
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: Thu May 30, 2013 12:45 am    Post subject: Reply with quote

GeordieJedi wrote:

I've created a static/reserved IP address in the VM routers advanced settings page.


Good. That means that the IP will remain constant, which will at least mean that you can be confident of addressing the NAS by IP if nothing else.

Quote:
I've looked in the etc dir and I don't seem to have a etc/hosts file.
I can see "hosts.conf" file. Is this the same thing ?
Otherwise do I just create a text file called hosts ?


Strange. Even Windows usually has a hosts file. This is the one generated by my (rather buggy) Xubuntu 13.04 installation:

Code:
127.0.0.1       localhost
127.0.1.1       t400

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters


Smile I really don't understand IPv6 addresses, but the bit that makes a difference to you is in the first couple of lines. You can add something like:

Code:
192.168.x.x <NAS-name>


to it so that your machine will know where to look when you address the NAS by name.


Quote:
The permissions are correct in the original mnt dir,
but not in the media dir (as I haven't changed them yet).


As I said, it should make absolutely no difference where to put the mount point. You will need to check whether rpcbind (or portmapper) is running - the permission denied error could well be due to lack of file locking. I'm not in Xubuntu at the moment, so I can't recall what the package name was - will have a look later if someone else can't tell you.

You can check whether it is running using something like this:

Code:
ps ax | grep rpcbind


If its not running, you will need to either modify your fstab commands, or get it and install it. While it shouldn't make a lot of difference if only one machine is going to be accessing the NAS, its still a good precaution to have file locking enabled.

Its possible you may have portmapper instead of rpcbind, but so far as I know, any recent distro will be using rpcbind, not portmapper.

Edit: Sorry, just noticed from one of your earlier posts that you've installed nfs-common, which most likely does include rpcbind or portmapper. Use ps to check that it is running - if it is, the permission error may be down to the permissions on the NFS share you've created on the NAS.

Looking at my Icy Box NAS, I've got the permissions on the NFS share set like this:

Code:
drwxrwxrwx    4 root     root            30 Nov  3  2012 stor


showmount -e gives me this:

Code:
root@OpenWrt:/mnt/sda2# showmount -e
Export list for OpenWrt:
/mnt/sda2/stor 192.168.1.0/255.255.255.0


Permissions on my server NFS share are set the same, and showmount -e gives me this:

Code:
root@sms:/home/files/data-1# showmount -e
Export list for sms:
/home/files/data-1/stor 192.168.1.0/255.255.255.0


/etc/exports for the sms box is as follows:

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


Paul.
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 May 30, 2013 1:01 am    Post subject: Reply with quote

Sorry my mistake it was meant to be in the media directory.

Code:
ls -l /media


Yes you can create a hosts file. I use vi

Code:
 sudo vi /etc/hosts

xxx.xxx.xxx.xxx Hoth



Replace the xxx with the IP.
_________________

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
nelz
Site admin


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

PostPosted: Thu May 30, 2013 9:55 am    Post subject: Reply with quote

Permissions are not the issue, the error message is "access denied" which comes from the server. There is too much going on here and you are getting bogged down in network configuration, mount points, permissions, fstab options and far too much more. Keep it simple, especially as you now have a fixed IP address for the NAS.

Code:
sudo mount 192.168.x.x:/path/to/export -t nfs /mnt/mountpoint


Note down any errors and try to investigate them one at a time instead of jumping around like a fart in a wicker chair.

If you get an access denied error, SSH into the NAS and check its logs, you won't get anything useful from the client. If you don't have SSH to the NAS working yet, sort that out first, you'll be flailing in the dark without it.
_________________
"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
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 2 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