PDA

View Full Version : Linux - NFS issues



personthingy
18-11-2007, 01:42 PM
While trouble shooting my network issues, i resorted to reebooting meinserver, which as well as proving unnessessary now means that all the NFS shares i have, or rather had on the server have ceased to be available.
From POS all i see using KDE is a wee icon saying "not mounted"
Both machines are Debian-Etch

What service do i need to (re)start on meinserver to make it's wonderful harddrive space again available to the rest of my fine network?

For reference, the networking issues i had were my network switch packed a sad, and came right after powering it back up. :rolleyes:

Jen
18-11-2007, 01:54 PM
For the server, you need nfs and portmapper running.

You can verify NFS is running by using the command: rcpinfo -p

personthingy
18-11-2007, 02:13 PM
You can verify NFS is running by using the command: rcpinfo -p Ahhh we have different species of mammal it seems....


meinServer:~# rcpinfo -p
-bash: rcpinfo: command not found
:(

Jen
18-11-2007, 02:21 PM
Not necessarily, I'm referring to notes I took on setting up my NFS system I had going a couple of years ago, so it maybe out of date and no longer used. I don't use NFS anymore.

Did you check what services were running?

personthingy
18-11-2007, 05:28 PM
For the server, you need nfs and portmapper running.



Did you check what services were running?i have
daemon 5559 0.0 0.1 1684 360 ? Ss 14:46 0:00 /sbin/portmap and
root 2544 0.0 0.0 0 0 ? S< 10:08 0:00 [nfsd4]
root 2545 0.0 0.0 0 0 ? S 10:08 0:00 [nfsd]
root 2546 0.0 0.0 0 0 ? S 10:08 0:00 [nfsd]
root 2547 0.0 0.0 0 0 ? S 10:08 0:00 [nfsd]
root 2548 0.0 0.0 0 0 ? S 10:08 0:00 [nfsd]
root 2549 0.0 0.0 0 0 ? S 10:08 0:00 [nfsd]
root 2550 0.0 0.0 0 0 ? S 10:08 0:00 [nfsd]
root 2551 0.0 0.0 0 0 ? S 10:08 0:00 [nfsd]
root 2552 0.0 0.0 0 0 ? S 10:08 0:00 [nfsd]
close enough?

vinref
18-11-2007, 06:09 PM
So they used to work on meinserver, but after rebooting, they are not working now?

personthingy
18-11-2007, 07:22 PM
So they used to work on meinserver, but after rebooting, they are not working now?Yes.
I have a lot of storage on meinserver, and i cannot access it since rebooting meinserver, atleast not with NFS, which is my preference.... fish and smb are still working fine, they just aren't to my taste :)

vinref
18-11-2007, 09:08 PM
If you haven't changed any of the configurations in meinserver and the client, and you have the appropriate entries in /etc/fstab, then restart the networking services on the client thus:


/etc/init.d/networking restart

Might also be /etc/init.d/network. Have a look.

If this doesn't work, check /etc/fstab. Post it here if you are unsure of what it should look like.

beama
19-11-2007, 05:59 AM
silly question, you running that command Jen gave you as root user ?

personthingy
19-11-2007, 07:36 AM
I'm pretty sure the basic network connectivity is sweet, after all, meinserver is the secret to me being able to post here, but what they hey, i restarted networking on meinserver, and this machine anyway. However there is an odd error in the 2 lines at the end.
POS:~# /etc/init.d/networking restart
Reconfiguring network interfaces...SIOCSIFADDR: No such device
eth0: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device
eth0: ERROR while getting interface flags: No such device
Failed to bring up eth0.
if-up.d/mountnfs[eth1]: lock /var/run/network/mountnfs exist, not mounting
done.


If you haven't changed any of the configurations in meinserver and the client, and you have the appropriate entries in /etc/fstab, then restart the networking services on the client thus:


/etc/init.d/networking restart

Might also be /etc/init.d/network. Have a look.

If this doesn't work, check /etc/fstab. Post it here if you are unsure of what it should look like. well heres fstab on POS (the client)
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda1 / reiserfs notail 0 1
#/dev/hdc1 /home reiserfs defaults 0 2
/dev/hda2 none swap sw 0 0
/dev/hdb /media/cdrom0 udf,iso9660 user,noauto 0 0
#/dev/hdc1 /music reiserfs defaults 0 2
/dev/sda1 /personthingy reiserfs defaults 0 2
#//192.168.0.1/Read_only /music smbfs user,username=% 0 0
192.168.0.1:/home/chris/Shared/Read_Only /nfs/read nfs defaults,rw,user 0 0
#//192.168.0.1/Open /open smbfs user,username=% 0 0
192.168.0.1:/home/chris/Shared/Open /nfs/open nfs defaults,rw,user 0 0
192.168.0.1:/home/chris/stash /nfs/stash nfs defaults,rw,user 0 0
/dev/scsi/host0/bus0/target0/lun0/part1 /media/usb0 auto rw,user,noauto 0 0

personthingy
19-11-2007, 07:41 AM
silly question, you running that command Jen gave you as root user ? Yes. 100% sure.

Jen
19-11-2007, 04:46 PM
Did you do any fiddling with the server firewall for NFS originally?

Under /etc/hosts.allow on the server, does it show the clients IP?

Not sure what is with the error message for eth0. Do you have two ethernet devices?

What happens if you try to mount the shared directory on the server from the client via command line?

personthingy
19-11-2007, 05:00 PM
Did you do any fiddling with the server firewall for NFS originally?

Under /etc/hosts.allow on the server, does it show the clients IP?

Not sure what is with the error message for eth0. Do you have two ethernet devices?The eth0 error is probably one of those quirks which is the result of me picking up the harddrive on my original POS, and placing it in what would have been a worse machine, if it wasn't for the fact POS1 died completely. I think the OS still looks for a card(eth0), and then uses eth1, that being the onboard ethernet. I don't think it's the problem, after all i'm typing this using POS (2) via meinserver, but the reference to a lock file has me curious.


What happens if you try to mount the shared directory on the server from the client via command line?
I don't know how to "mount the shared directory on the server from the client via command line"

I ordered a new machine which i hopefully get this week. That will be getting a fresh install, and hopefully that makes the problem go away, unless it's the server, which i'm inclined to think it is.....

I'll try Ziggys machine, and see if that likes the NFS shares.

personthingy
19-11-2007, 05:24 PM
We just tried Ziggys machine, (suse 10.3) and it attempted to mount the shares only to provide a message saying "permission denied"

/me thinks rebooting meinserver has stopped it sharing

OK i'm wrong
i mounted the 192.168.0.1:/home/chris/Shared/Read_Only directory manually, and it now is visable. The issue it seems is with POS, not server.

Myth
19-11-2007, 05:26 PM
To mount the share (from the client):
mount ip.for.mein.server:/dir/thats/shared /dir/to/mount/to

As for your eth0/eth1, if there are any errors/issues, these can be generally found by:
dmesg | grep eth

Jen
19-11-2007, 05:30 PM
Did you check the contents of /etc/hosts.alllow on the server?

How about turning off the firewall for a few minutes, and see what difference that makes?

The contents of /etc/hosts.allow shouldn't change on a reboot, but the firewall can certainly decide to reapply some rules that perhaps weren't set.

personthingy
19-11-2007, 05:44 PM
Manually mounting the file systems seems to have fixed the issues...

I'm about to reboot, and see if they will mount on boot as they are supposed to

personthingy
19-11-2007, 06:12 PM
Nope........
Not there on boot.

I can mount manually, and everything works, but not on automaticly on boot up.

The lines on fstab refering to NFS are being ignored, untill i manually mount the shares, whereupon they mount as specified in fstab
:confused:

Erayd
19-11-2007, 06:24 PM
If you'd like I can have a play with it later on this evening and see if I can fix it for ya :D.

personthingy
19-11-2007, 06:30 PM
If you'd like I can have a play with it later on this evening and see if I can fix it for ya :D.I'm planning on a fresh install on a new machine when it's ready for me to pick up later this week, so it's not a huge one now, as i can manually work around it for a day or 2 more, but i'd just like to know what the hey is going on, and hope that it will not be an issue that the new machine mimics.

If the new toy does mimic the issue, then definately please fix it!

vinref
19-11-2007, 06:58 PM
Look at your init scripts, specifically /etc/rc2.d. It probably specifies eth0 there. Modify accordingly.

Myth
19-11-2007, 07:08 PM
About now I'd be inclined to reinstall (# apt-get install nfs-kernel-server nfs-common portmap) and double check configs

personthingy
20-11-2007, 08:54 PM
The workaround is simple.

As root, i type the command
mount -a and suddenly all the NFS mounts specified in fstab are mounted, even though they failed to mount as the machine boots up.

I'm not alone in this problem. we found the same problem with the other client machine on my network, as Ziggys NFS mounts failed to be untill the same command was typed. He runs Suse 10.3, so it seems it's not limited to Debian-Etch by any means!

O well, awaiting the new machine, so i can see how a Debian-Lenny client machine copes with NFS.

Myth
20-11-2007, 09:10 PM
I had something similar to this recently while trialling Ubuntu (NFS client). It wouldn't mount exported shares on bootup (which were in fstab), but I was manually able to mount them after bootup.
My workaround was to create a script that mounted them soon after bootup. The assumption was that the wireless device was initiating AFTER the NFS shares were attempting to mount. It worked. Maybe this is whats happening with you, your eth* device is initiating after fstab has been read

Jen
20-11-2007, 09:26 PM
I'm not alone in this problem. we found the same problem with the other client machine on my network, as Ziggys NFS mounts failed to be untill the same command was typed. He runs Suse 10.3, so it seems it's not limited to Debian-Etch by any means!I'm guessing the same as Myth, it has something to do with the order of the services starting and the partition mounting. I noticed that your shared directories were on a different partition to /. As an experiment, you could make a shared folder on / and see if it gets mounted automatically during bootup.