LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 07-10-2013, 12:48 PM   #1
syvy
Member
 
Registered: Sep 2005
Location: Germany
Distribution: slackware64
Posts: 110

Rep: Reputation: 16
nfs doesn't work with replacement NIC


My onboard NIC (eth0) broke and I put in a PCI device. It shows up as eth3 and network is up and running. But during the boot process I noticed that the IP's of my nfs clients couldn't get resolved anymore, even after configuring the network with pkgtools again. Looking in /etc/inet1.conf I found IP and gateway as eth0. So I entered both to eth3 there and rebooted. No more error message about non resolving nfs clients but the clients still can't connect anymore.

Since the onboard NIC is disabled in BIOS why does the PCI NIC show up as eth3? Originally it shows up as eth0 but gets renamed during boot:
Quote:
[ 7.936433] 8139too 0000:05:06.0: eth0: RealTek RTL8139 at 0xa000, ...
[ 8.671118] udevd[1190]: renamed network interface eth0 to eth3
How can I prevent the NIC from getting renamed? Is there another way to make nfs working again? Any help appreciated.
 
Old 07-10-2013, 12:58 PM   #2
dbfontes
LQ Newbie
 
Registered: Oct 2012
Location: SP, Brazil
Distribution: Slackware
Posts: 15

Rep: Reputation: Disabled
Thumbs up

See the file
/etc/udev/rules.d/70-persistent-net.rules

Further details: ftp://ftp.slackware.com/pub/slackwar..._AND_HINTS.TXT

Quote:
As with 14.0, the system udev rules now reside in /lib/udev/rules.d/ instead
of /etc/udev/rules.d/ in older versions. There should never be a reason
to edit anything in /lib/udev/rules.d/, so if you think you have a case
where this is required, either you're wrong or it needs to be addressed in
the upstream source. However, you can override default rules by placing
one with an identical name inside /etc/udev/rules.d/ The rules files in
/etc/udev/rules.d/ are still intended to (maybe) be edited as needed by
local system administrators, and as such, the rules for optical and network
devices will still be placed there.

Speaking of udev, pay particular attention to 70-persistent-net.rules and
70-persistent-cd.rules in /etc/udev/rules.d/ -- these two are automatically
generated by the system. If you remove, add, and/or replace some hardware
(specifically network cards and/or optical drives) in a machine, you will
probably need to edit one or both of the rules files mentioned above (or
just remove them and reboot to create new ones).
 
Old 07-10-2013, 01:35 PM   #3
syvy
Member
 
Registered: Sep 2005
Location: Germany
Distribution: slackware64
Posts: 110

Original Poster
Rep: Reputation: 16
Many thanks dbfontes.

After deleting /etc/udev/rules.d/70-persistent-net.rules the NIC is named eth0.

Unfortunately the nfs clients still can't connect. I have no idea why. Any suggestions?
 
Old 07-11-2013, 12:04 PM   #4
syvy
Member
 
Registered: Sep 2005
Location: Germany
Distribution: slackware64
Posts: 110

Original Poster
Rep: Reputation: 16
After further investigation it looks like nfs is running but not exporting the shares.

This is /etc/exports
Quote:
# 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.
/mnt/volume1 borg(rw,no_subtree_check) chaotica(rw,no_subtree_check)
/mnt/volume2 borg(rw,no_subtree_check) chaotica(rw,no_subtree_check)
/mnt/volume3 chaotica(rw,no_subtree_check)
/mnt/volume4 borg(rw,no_subtree_check) chaotica(rw,no_subtree_check)
/mnt/sda2/home2 chaotica(rw,no_subtree_check)
Starting nfsd
Quote:
Starting NFS server daemons:
/usr/sbin/exportfs -r
/usr/sbin/rpc.rquotad
/usr/sbin/rpc.nfsd 8
/usr/sbin/rpc.mountd
It's up and running
Quote:
root 2452 1 0 18:51 ? 00:00:00 /usr/sbin/rpc.rquotad
root 2454 2 0 18:51 ? 00:00:00 [lockd]
root 2455 2 0 18:51 ? 00:00:00 [nfsd4]
root 2456 2 0 18:51 ? 00:00:00 [nfsd4_callbacks]
root 2457 2 0 18:51 ? 00:00:00 [nfsd]
root 2458 2 0 18:51 ? 00:00:00 [nfsd]
root 2459 2 0 18:51 ? 00:00:00 [nfsd]
root 2460 2 0 18:51 ? 00:00:00 [nfsd]
root 2461 2 0 18:51 ? 00:00:00 [nfsd]
root 2462 2 0 18:51 ? 00:00:00 [nfsd]
root 2463 2 0 18:51 ? 00:00:00 [nfsd]
root 2464 2 0 18:51 ? 00:00:00 [nfsd]
root 2466 1 0 18:51 ? 00:00:00 /usr/sbin/rpc.mountd
But no exports
Quote:
root@7of9:rc.d >>> cat /proc/fs/nfs/exports
# Version 1.1
# Path Client(Flags) # IPs
root@7of9:rc.d >>> cat /proc/fs/nfsd/exports
# Version 1.1
# Path Client(Flags) # IPs
From /var/log/syslog
Quote:
[ 7064.198964] nfsd: last server has exited, flushing export cache
[ 7065.319045] svc: failed to register lockdv1 RPC service (errno 97).
[ 7065.319157] NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
[ 7065.319190] NFSD: unable to find recovery directory /var/lib/nfs/v4recovery
[ 7065.319197] NFSD: starting 90-second grace period
There is no /var/lib/nfs/v4recovery. Maybe that's the issue?

Everything worked fine with the onboard NIC before. I don't understand what's wrong here.
 
Old 07-11-2013, 12:30 PM   #5
ml4711
Member
 
Registered: Aug 2012
Location: Ryomgård, Danmark
Distribution: Slackware
Posts: 74

Rep: Reputation: 34
This command only shows those exports, that have been mounted by a client.
Code:
cat /proc/fs/nfs/exports
use command:
Code:
exportfs
 
Old 07-11-2013, 09:20 PM   #6
perbh
Member
 
Registered: May 2008
Location: Republic of Texas
Posts: 226

Rep: Reputation: 37
- sorry - pushed the wrong button ...
 
Old 07-11-2013, 09:26 PM   #7
perbh
Member
 
Registered: May 2008
Location: Republic of Texas
Posts: 226

Rep: Reputation: 37
Whenever I install Slackware on a machine - the first thing I do is to comment out the first few lines of /etc/rc.d/rc.nfsd - thus:
Code:
#  if [ ! -r /etc/exports ]; then # no config file, exit:
#    exit
#  elif ! grep -v '^#' /etc/exports | grep '/' 1> /dev/null 2> /dev/null ; then
#    exit # no uncommented shares in /etc/exports
#  fi
Then I make it executable (chmod a+x /etc/rc.d/rc.nfsd)
And finally: /etc/rc.d/rc.nfsd start

The reason I comment it out is that if I have a usb-disk connected to the machine at start-up, I nfs-export it in /etc/rc.d/rc.local (after checking with 'blkid -U' that it is actually present ...
The whole carbunkle goes something like this:
Code:
df -a | grep -wq '/usb$' || {   # proceed if not mounted, /usb is my mountpoint
   usbid="xxxxxxxxxxxxxxxxxxxxxxxxx"   # whatever is the blkid of the usb-disk
   usbdev="$(blkid -U $usbid)" || usbdev=""
   test "x$usbdev" = x || {    # so it's present :-)
      if mount -o rw,noatime $usbdev /usb; then echo ":: $usbdev mounted on /usb ..."
      else echo "-- failure mounting $usbdev ..."; fi
   }
   unset usbid usbdev   # the environmentalists are gonna luv me!
}

df -a | grep -wq '/usb$' && {   # ok, it _is_ mounted
   ok=no
   exportfs | ( while read a b; do
      test "x$a" = x/usb && { ok=yes; break; }
   done )
   test $ok = no && {   # not exported, so do it
      exportfs -iv -o rw,insecure,no_root_squash 192.168.1.0/24:/usb
   }
   unset ok
}
I shouldn't really have to comment-out the top lines as indicated, I've just always done it that way - and it always works ...

Last edited by perbh; 07-11-2013 at 09:31 PM. Reason: typos
 
Old 07-11-2013, 10:59 PM   #8
syvy
Member
 
Registered: Sep 2005
Location: Germany
Distribution: slackware64
Posts: 110

Original Poster
Rep: Reputation: 16
Thank you guys, I got it.

ml4711 pointed me into the right direction. How could I miss using the exportsf command for checking? Exporting works.

So I checked on the client side what happens when mounting the shares: No route to host! What I found then is so embarrassing: wrong IP address. After configuring the new NIC I didn't check the settings again. It turned out that the host got a DHCP address from the router although I configured a static IP. To my surprise NetworkManager was running which I never use, maybe I started it by accident, no idea. Disabling did the trick.

I think I learned my lesson checking the basic things first.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Script on NIC Up - Doesn't Work Quantumstate Linux - Networking 2 01-19-2012 10:23 AM
NFS doesn't work when internet down flamma Linux - Networking 2 05-29-2007 02:18 AM
My NIC doesn't seem to work... kenneth_phough Linux - Laptop and Netbook 1 06-18-2006 08:32 PM
NFS doesn't work work well with mounted NTFS volumes? StevenO Linux - Networking 6 02-13-2006 10:54 AM
PCMCIA NIC doesn't work any more X11 Linux - Hardware 1 07-21-2002 05:20 AM


All times are GMT -5. The time now is 12:46 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration