LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-03-2015, 09:14 AM   #1
camelseller
LQ Newbie
 
Registered: Jun 2015
Posts: 3

Rep: Reputation: Disabled
nfsd not starting at boot


Hello,
I can't get nfsd start at boot on openwrt linux.

I followed this guide:
http://wiki.openwrt.org/doc/howto/nfs.server

but when I turn the computer on:

Code:
root@OpenWrt:~# showmount -e localhost
clnt_create: RPC: Program not registered
Code:
root@OpenWrt:~# dmesg | tail
[   22.252000] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   24.228000] eth1: link UP - 100/full - flow control off
[   24.244000] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   30.124000] svc: failed to register nfsdv3 RPC service (errno 5).
[   31.588000] device eth1 entered promiscuous mode
[   31.596000] br-lan: port 1(eth1) entered forwarding state
[   31.600000] br-lan: port 1(eth1) entered forwarding state
[   31.652000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   31.684000] eth1: link UP - 100/full - flow control off
[   33.604000] br-lan: port 1(eth1) entered forwarding state
but if I do
Code:
root@OpenWrt:~# /etc/init.d/nfsd start
root@OpenWrt:~# showmount -e localhost
Export list for localhost:
/mnt/3tb *
so it works well, but I look at dmesg
Code:
root@OpenWrt:~# dmesg | tail
[   24.228000] eth1: link UP - 100/full - flow control off
[   24.244000] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   30.124000] svc: failed to register nfsdv3 RPC service (errno 5).
[   31.588000] device eth1 entered promiscuous mode
[   31.596000] br-lan: port 1(eth1) entered forwarding state
[   31.600000] br-lan: port 1(eth1) entered forwarding state
[   31.652000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   31.684000] eth1: link UP - 100/full - flow control off
[   33.604000] br-lan: port 1(eth1) entered forwarding state
[16642.280000] svc: failed to register lockdv1 RPC service (errno 124).
I tried several times
Code:
root@OpenWrt:~# /etc/init.d/portmap enable
root@OpenWrt:~# /etc/init.d/nfsd  enable
and reboot but, again, I have to start nfsd manually after every reboot.

What am I doing wrong? On Attitude Adjustment I never had any issue.

Please help!

Last edited by camelseller; 06-04-2015 at 02:36 PM.
 
Old 06-03-2015, 10:53 AM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,696

Rep: Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261
Did the symlinks in /etc/rc.d/S??portmap and /etc/rc.d/S??nfsd
get created?

And if not, you might look in the /etc/init.d/portmap and /etc/init.d/nfsd scripts to see what they were doing when/as they were to be created.

Normally, the ?? in S??portmap has to be a smaller value than the one for S??nfsd, and both have to be done after the network is initialized (thus greater than the ?? value for the network).

Last edited by jpollard; 06-03-2015 at 11:00 AM.
 
Old 06-03-2015, 02:06 PM   #3
camelseller
LQ Newbie
 
Registered: Jun 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
Yes, the link were created:
Code:
root@OpenWrt:~# ls -l /etc/rc.d
lrwxrwxrwx    1 root     root            17 May 28 19:02 K19portmap -> ../init.d/portmap
lrwxrwxrwx    1 root     root            18 Oct  1  2014 K50dropbear -> ../init.d/dropbear
lrwxrwxrwx    1 root     root            14 May 28 19:02 K60nfsd -> ../init.d/nfsd
lrwxrwxrwx    1 root     root            16 Oct  1  2014 K85odhcpd -> ../init.d/odhcpd
lrwxrwxrwx    1 root     root            13 Oct  1  2014 K89log -> ../init.d/log
lrwxrwxrwx    1 root     root            17 Oct  1  2014 K90network -> ../init.d/network
lrwxrwxrwx    1 root     root            14 Oct  1  2014 K98boot -> ../init.d/boot
lrwxrwxrwx    1 root     root            16 Oct  1  2014 K99umount -> ../init.d/umount
lrwxrwxrwx    1 root     root            20 Oct  1  2014 S00sysfixtime -> ../init.d/sysfixtime
lrwxrwxrwx    1 root     root            14 Oct  1  2014 S10boot -> ../init.d/boot
lrwxrwxrwx    1 root     root            16 Oct  1  2014 S10system -> ../init.d/system
lrwxrwxrwx    1 root     root            16 Oct  1  2014 S11sysctl -> ../init.d/sysctl
lrwxrwxrwx    1 root     root            13 Oct  1  2014 S12log -> ../init.d/log
lrwxrwxrwx    1 root     root            18 Oct  1  2014 S19firewall -> ../init.d/firewall
lrwxrwxrwx    1 root     root            17 May 28 19:02 S19portmap -> ../init.d/portmap
lrwxrwxrwx    1 root     root            17 Oct  1  2014 S20network -> ../init.d/network
lrwxrwxrwx    1 root     root            16 Oct  1  2014 S35odhcpd -> ../init.d/odhcpd
lrwxrwxrwx    1 root     root            14 Oct  1  2014 S50cron -> ../init.d/cron
lrwxrwxrwx    1 root     root            18 Oct  1  2014 S50dropbear -> ../init.d/dropbear
lrwxrwxrwx    1 root     root            16 Oct  1  2014 S50telnet -> ../init.d/telnet
lrwxrwxrwx    1 root     root            16 Oct  1  2014 S50uhttpd -> ../init.d/uhttpd
lrwxrwxrwx    1 root     root            17 Oct  1  2014 S60dnsmasq -> ../init.d/dnsmasq
lrwxrwxrwx    1 root     root            14 Oct  1  2014 S95done -> ../init.d/done
lrwxrwxrwx    1 root     root            13 Oct  1  2014 S96led -> ../init.d/led
lrwxrwxrwx    1 root     root            17 Oct  1  2014 S98sysntpd -> ../init.d/sysntpd
lrwxrwxrwx    1 root     root            14 May 28 19:02 S99nfsd -> ../init.d/nfsd
Code:
root@OpenWrt:~# ls -l /etc/init.d/
-rwxr-xr-x    1 root     root          1411 Sep 21  2014 boot
-rwxr-xr-x    1 root     root           729 Oct  1  2014 cron
-rwxr-xr-x    1 root     root         14350 Oct  1  2014 dnsmasq
-rwxr-xr-x    1 root     root           252 Sep 21  2014 done
-rwxr-xr-x    1 root     root          4153 Oct  1  2014 dropbear
-rwxr-xr-x    1 root     root           997 Oct  1  2014 firewall
-rwxr-xr-x    1 root     root           341 Sep 21  2014 fstab
-rwxr-xr-x    1 root     root          2025 Sep 21  2014 led
-rwxr-xr-x    1 root     root          2169 Oct  1  2014 log
-rwxr-xr-x    1 root     root          2742 Sep 21  2014 network
-rwxr-xr-x    1 root     root           754 Sep 24  2014 nfsd
-rwxr-xr-x    1 root     root           244 Oct  1  2014 odhcpd
-rwxr-xr-x    1 root     root           319 Sep 24  2014 portmap
-rwxr-xr-x    1 root     root           125 Sep 21  2014 sysctl
-rwxr-xr-x    1 root     root           247 Sep 21  2014 sysfixtime
-rwxr-xr-x    1 root     root           770 Oct  1  2014 sysntpd
-rwxr-xr-x    1 root     root          1025 Sep 21  2014 system
-rwxr-xr-x    1 root     root           926 Oct  1  2014 telnet
-rwxr-xr-x    1 root     root          2977 Sep 24  2014 transmission
-rwxr-xr-x    1 root     root          3444 Oct  1  2014 uhttpd
-rwxr-xr-x    1 root     root           106 Sep 21  2014 umount
It seems portmap is started BEFORE network.

And now? What can I do? Have I to change S??network manually?

Last edited by camelseller; 06-03-2015 at 03:19 PM.
 
Old 06-03-2015, 02:49 PM   #4
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,696

Rep: Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261
There appears to be a bug.

The portmap link indicates S19portmap, which is done BEFORE the network is initialized at S20network.

I think these have to be switched, as the portmap utility can't open a port for listening before the network is up.

There ought to be an error log somewhere that shows portmap aborting.
nfsd (S99nfsd) cannot then register with portmap (it has aborted), and should also be reported in a log.

You can test this by just renaming the the link S19portmap to something like S98portmap or even S21portmap and see if things work after a reboot.

I'm also a bit surprised that the firewall actually works... It should be rather difficult to initialize filter rules (S19firewall) on an interface before that interface is initialized (S20network). I would have expected it to be something like S21firewall (in which case portmap would be S22 or greater, The firewall should be initialized before anything tries to use the network like S35odhcpd).

But that is getting to my limit on how this particular system works.

Now stopping services is less of a problem K19 happens before the network is stopped at K20, though it would be reasonable to stop nfsd before stopping portmap (it allows nfsd to unregister first) but it isn't critical - both are going to be killed anyway, and killing portmap first will stop any remote host from initiating an NFS transaction during the shutdown.

Last edited by jpollard; 06-03-2015 at 02:53 PM.
 
Old 06-04-2015, 02:34 PM   #5
camelseller
LQ Newbie
 
Registered: Jun 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thumbs up

thankyou jpollard,
I changed:
Code:
root@OpenWrt:/etc/rc.d# mv S20network S14network
rebooted

Code:
root@OpenWrt:~# showmount -e localhost
Export list for localhost:
/mnt/3tb/musica     *
/mnt/3tb/vcast      *
/mnt/3tb/PVR        *
/mnt/3tb/cestino    *
/mnt/3tb/fotocamera *
/mnt/3tb/serie.tv   *
/mnt/3tb/film       *
now nfsd works fine at boot, but I get the same error in dmesg as before
Code:
root@OpenWrt:~# dmesg | tail
[   21.736000] EXT4-fs (sda2): mounted filesystem without journal. Opts: data=writeback,errors=remount-ro,barrier=0
[   21.748000] eth1: link UP - 100/full - flow control off
[   25.048000] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   30.356000] device eth1 entered promiscuous mode
[   30.368000] br-lan: port 1(eth1) entered forwarding state
[   30.372000] br-lan: port 1(eth1) entered forwarding state
[   30.432000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   31.324000] eth1: link UP - 100/full - flow control off
[   32.376000] br-lan: port 1(eth1) entered forwarding state
[   32.592000] svc: failed to register lockdv1 RPC service (errno 124).
I can say [SOLVED]

THANKYOU
 
Old 06-04-2015, 03:07 PM   #6
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,696

Rep: Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261
Not sure why the lock service fails though though. That startup ought to be part of the nfsd script.

Glad the rest works though. NFS locking hasn't been all that significant in most places...
 
  


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
What is NFSD? vandien76og Linux - Security 4 07-18-2011 01:46 PM
starting rpc.nfsd results in freezing console tilman1 Linux - Kernel 2 11-27-2010 12:01 PM
[SOLVED] nfsd in current escaflown Slackware 3 03-14-2010 01:56 AM
don't have nfsd mount point in /proc/fs/nfsd...can't start NFS as a result alirezan1 Linux - Newbie 1 11-19-2008 07:57 AM
Won't Boot - Starting Printer Service - Starting CUPS jeansond Linux - Newbie 0 10-11-2004 06:39 PM


All times are GMT -5. The time now is 07:17 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration