NFS Shares - unable to complete connection...

NFS Shares - unable to complete connection...

Postby omelette » Sep 1st, '11, 19:01

I tried setting up wireless NFS sharing between 2 Mageia pc's and was elated to find that it worked first time - I could both share & browse shares from both pc's! I then got a little more bold and installed NFS server s/w on my Ubuntu pc, added one line to exports, started the NFS-server and lo and behold, this also was visible and browseable from both Mageia boxes! And just when I thought I was on a roll, almost everything stopped working and I'm clueless as to why. I can still find & mount the Ubuntu pc from Mageia but although both Mageia pc's find each other when Searched for, the mounting always fails. Note that firewalls on both Mageia pc's are disabled.

As the log-window doesn't show errors, I have copied & run the mounting command in root-mode - specifically;
Code: Select all
su -c 'mount -t nfs linux:/home/omelette/AMD_NFS_Public /media/AMD_NFS_Public -o rsize=8192,wsize=8192,nosuid,soft'


- with no success either, but the error message it produces is;

Code: Select all
mount.nfs: Failed to resolve server linux: Name or service not known


I've also tried removing 'secure' from the 'exports' file and even using an IP address rather than the default '*' - again without success. btw, I tried changing the server name, "linux" to something more imaginative, but 'Hosts definitions' just shows the computer name as 'localhost' on both Mageia computers even though one computer shows up as "omelette-laptop", while the other is named simply "linux", when NFS shares are searched for.

I'd really like to get this working as when is was running it seemed far faster than Samba, and as I don't have any M$ pc's to begin with, I'd dump Samba in a heartbeat.
omelette
 
Posts: 40
Joined: Aug 21st, '11, 02:50

Re: NFS Shares - unable to complete connection...

Postby Germ » Sep 3rd, '11, 12:49

Sorry omelette, i've never used NFS but I'm sure someone will come along with some help.
Starting in 1999: Mandrake > Mandriva > Mageia
Linux User #274693
User avatar
Germ
 
Posts: 718
Joined: Mar 30th, '11, 13:16
Location: Chelsea, Oklahoma USA

Re: NFS Shares - unable to complete connection...

Postby tom_ » Sep 3rd, '11, 14:23

Code: Select all
mount.nfs: Failed to resolve server linux: Name or service not known


it seems your machine is unable to convert the name linux into an IP

try to put the IP in this command, or add the IP to /etc/hosts file

Code: Select all
su -c 'mount -t nfs [put the IP here]:/home/omelette/AMD_NFS_Public /media/AMD_NFS_Public -o rsize=8192,wsize=8192,nosuid,soft'
tom_
 
Posts: 423
Joined: Sep 3rd, '11, 12:26
Location: Porto Ercole, Italy

Re: NFS Shares - unable to complete connection...

Postby pmithrandir » Sep 5th, '11, 10:30

Did you tried to do a ping linux ??

That would be my guess for that kind of errors.
Also, are you sure your server name on the network is really linux ? Maybe click in Dolphion(KDE explorer) on the network link and try to explore it... Maybe the name is something else...
Creator of : http://www.jaiuneidee.net a "direct democracy" website for France.
User avatar
pmithrandir
 
Posts: 442
Joined: May 4th, '11, 19:30

Re: NFS Shares - unable to complete connection...

Postby djennings » Sep 6th, '11, 16:54

If you are going to use a host name (linux) when mounting NFS then your computer has to have some way of matching the host name to an IP address.
The simplest and most reliable way is to put an entry in /etc/hosts which will 'hardwire' a static IP address to the host name 'linux'. However this is not going to work if the host name is liable to change. If the host linux is getting its IP address from DHCP then you must configure your DHCP server to always serve the same IP address to that MAC address.

The second way of discovering an IP address is by asking your DNS server. If you are using a public DNS server such as Open DNS there is no way it can possibly know the IP addresses in your local network. So you must use a local DNS server either on one of your hosts or your router. The local DNS server can only know the IP address if it is either hard wired, and it has been told the IP address by a configuration file, or else the DNS server is also your DHCP server and it knows the host names of all devices that have asked for an IP address.

Sound complicated? Yes it is. The simplest way of networking in your local network is with static IP addresses. It saves a lot of stress.
User avatar
djennings
 
Posts: 613
Joined: Jun 2nd, '11, 23:51
Location: Wokingham, UK

Re: NFS Shares - unable to complete connection...

Postby omelette » Sep 6th, '11, 20:02

Thanks for the posts guys. Excuse they delay in replying, life gets in the way at times!

As I've been trying to connect old<->new(ish) pc's and as I have had nothing but problems ever since I then bought 2 D-Link G520 wireless cards, I thought I'd see if there was something that could be done with them. I did my darnest to get these to work properly with Win2k way back, and since I had similar problems with Linux I just presumed they were junk. So imagine my surprise to discover that when I tried them with WinXP they worked perfectly! Even better, when I downloaded a 'updated' driver, the performance increased dramatically!!! I had done everything possible with Win2k - including trying the 'updated' driver - and failed, so I got quite a buzz out of that.

Anyway, back to things Linux. It turns out that the 'Ath5k' kernel module is buggy! A quick google had people back in 2007-8 experiencing the same symptoms that I was seeing, but I didn't confirm that the kernel-driver was to blame until I managed to get Ndiswrapper working. I had tried it with the drivers from the their installation-CD but it just crashed the Mageia-desktop for some reason. The 'updated' drivers worked perfectly though and completely eliminate the barely-usable connection I have always had when using them - now I see 750-800KiB/s incoming, and a screaming (for me anyway!) 1.2-1.4MiB/s outgoing. :)

But this actually generated problems of its own. I had been forced to switch to NetworkManager because when using they Ath5k kernel-driver there is some bug in the old pc that had it insisting every time I rebooted that no network had been configured. It didn't suffer from this but I soon discovered that NetworkManager suffers from a serious bug that makes it all but unusable with ad-hoc networks - you can create connections fine but they won't work unless 'system' is checked, but when you do this, the configured 'ad-hoc' setting automatically changes to 'infrastructure', each and every time! The only way to retain the setting is to uncheck the 'system' box, but then you can't get it to connect to a network - maddening!!! In fact the only connection that works is the one defined through the Mageia Control Center, which NetworkManager can 'manage', but if you then try editing it in any way (with root privileges) you immediately see that 'infrastructure' is set, even though you have an up-and-running ad-hoc network. Infuriating... Anyway, with the Ath5k blacklisted and Ndiswrapper working, a new problem presents itself - every time you restart the pc, NetworkManager can no longer connect to a network! The solution was to bin NetworkManager and crawl back to the system-manager setup, which seems to work fine now on rebooting, which is ironic...

Back to the task at hand - NFS-sharing. With a rock-solid wireless connection now, I no longer have to worry about that being an issue. I can also say that I can connect all 3 pc's via NFS, each both having client/server roles, without a problem - but only from the command-line! As far as I'm concerned, there is a definite bug somewhere when you try connecting through the Mageia Control Center GUI. For instance, I have Fedora 14 running on the laptop atm - if I try connecting to it through Mageia's GUI it fails every time. With 'display logs' checked, the exact command it generates is;

Code: Select all
mount -t nfs omelette-laptop:/home/omelette/Public /mnt/Public -o 'vers=3'


- this has some 'default' options unchecked and includes a necessary custom 'vers=3' option (which the GUI allows you to enter) to connect to the 'old' NFS3 F14 has. But when I run the exact same command from the root-console, I connect instantly!

The stuff you guys posted about name resolution is all valid and I definitely have a bit of a blind-spot in that regard, but not really the problem here. What was confusing me was how I should go about changing that 'linux' name to something more informative, and what the 'hosts' file contained didn't help matters. I have since realised that you get the option to select a network-name when you are configuring the wireless network connection, so that issue is solved!

The thing that doesn't seem quite right now is that when I do mount a NFS share, there is no mounted-icon appearing, either on the desktop or in Dolphin's 'Places' - is this normal? Having tried it with SuseLinux, I see that all mounted NFS shares also automatically generate a desktop-icon.
omelette
 
Posts: 40
Joined: Aug 21st, '11, 02:50

Re: NFS Shares - unable to complete connection...

Postby wcattell » Sep 29th, '11, 00:13

i'm having some trouble seeing NFS exports on my Megeia box (named gandalf). Gandalf can do a showmount -e frodo (frodo is in the /etc/hosts file) and sees frodo's exports fine.

I can mount using the following option;

mount -t nfs -o wsize=32768,rsize=32768,rw,soft frodo:/vol3 /vol3

Typing 'mount' at the shell prompt shows the volume is mounted but if I try to cd /vol3 it hangs. doing an 'ls /vol3' hangs as well. I've added proto=tcp,vers=3 to the option but no change.

There are no firewalls running and the exports are easily mounted on Mandriva 2010.1 PWP, 2011, SuSE 11 and Red Hat 6 boxes.

I've been using Mandrake/Mandriva for years but this is my first taste of Mageia. So far I really like what i see, I'd just like to get by this strange issue.

TIA,

Bill
wcattell
 
Posts: 2
Joined: Sep 28th, '11, 23:48

Re: NFS Shares - unable to complete connection...

Postby wcattell » Sep 29th, '11, 04:29

Well, I found the error and it is the NFS export. Gandalf (the Mageia box) was able to mount exports from other servers and other exports from the same server - only the /vol3 export was wacked. I'm now doing some more digging.
wcattell
 
Posts: 2
Joined: Sep 28th, '11, 23:48


Return to Networking

Who is online

Users browsing this forum: No registered users and 1 guest

cron