LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 08-30-2010, 08:14 AM   #1
sjremya
LQ Newbie
 
Registered: Aug 2010
Location: India
Distribution: open suse
Posts: 26

Rep: Reputation: 1
NFS is not mounting automatically @boot time


Hi all

I am trying to mount NFS for my embedded application. I could mount the NFS manually using mount command as follows :

mount -t nfs -o nolock 192.168.174.134:/nfs/nfs_point/ /mnt . This works fine.

I have to do the same thing in system boot up, in my ARM linux. I modified /etc/fstab as follows to achieve this :

192.168.174.134:/nfs/nfs_point /mnt nfs _netdev,rw 0 0

But when I tried to mount it only using 'mount <mount_point> ' ie. mount /mnt, its throwing me the following error.

portmap: server localhost not responding, timed out
RPC: failed to contact portmap (errno -5).


Please help me out to solve this issue

regards

SJR

 
Old 08-30-2010, 02:27 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,857

Rep: Reputation: 161Reputation: 161
Do you launch RPC deamon on server and client?
 
Old 08-30-2010, 11:30 PM   #3
sjremya
LQ Newbie
 
Registered: Aug 2010
Location: India
Distribution: open suse
Posts: 26

Original Poster
Rep: Reputation: 1
@nini09 . thanks ....

sorry ... i do not know it in depth .... But I could solve this issue [ i.e. not able to add nfs details in /etc/fstab]. My entry in /etc/fstab is as follows:

192.168.174.134:/nfs/nfs_test /mnt nfs rw,soft,bg,timeo=3,intr 0 0

I have mounted device after staring portmap as follows [ Entered this commands manually in the command prompt]

#portmap &
#mount /mnt </mnt is the mount point as in /etc/fstab>


Its working fine . But my problem exists still. I do not want to enter this commands manually in the command prompt.
I want to start all applications in the boot time itself.

Where can I add this command? It must run after reading /etc/fstab. Can I make an rc.local file and update it with the mount command?

I hope rc.local will work. But I could not see that file in my root filesystem? Is it a system generated file?

Please guide me with a good way to achieve this. Any other way there to make this command entry?

Thanks in advance & Regards
SJR

 
Old 08-31-2010, 12:22 AM   #4
sjremya
LQ Newbie
 
Registered: Aug 2010
Location: India
Distribution: open suse
Posts: 26

Original Poster
Rep: Reputation: 1
Unhappy

Quote:
Originally Posted by sjremya View Post
@nini09 . thanks ....

sorry ... i do not know it in depth .... But I could solve this issue [ i.e. not able to add nfs details in /etc/fstab]. My entry in /etc/fstab is as follows:

192.168.174.134:/nfs/nfs_test /mnt nfs rw,soft,bg,timeo=3,intr 0 0

I have mounted device after staring portmap as follows [ Entered this commands manually in the command prompt]

#portmap &
#mount /mnt </mnt is the mount point as in /etc/fstab>


Its working fine . But my problem exists still. I do not want to enter this commands manually in the command prompt.
I want to start all applications in the boot time itself.

Where can I add this command? It must run after reading /etc/fstab. Can I make an rc.local file and update it with the mount command?

I hope rc.local will work. But I could not see that file in my root filesystem? Is it a system generated file?

Please guide me with a good way to achieve this. Any other way there to make this command entry?

Thanks in advance & Regards
SJR



Hi


I could add this mount command in the newly created /etc/rc.d/rc.local file and run it manually by

/etc/rc.d/rc.local start

How to run this file automatically in the boot time itself ??

Please help me

SJR
 
Old 08-31-2010, 02:15 PM   #5
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,857

Rep: Reputation: 161Reputation: 161
What's your distribution, Fedora or something else?
 
Old 08-31-2010, 11:15 PM   #6
sjremya
LQ Newbie
 
Registered: Aug 2010
Location: India
Distribution: open suse
Posts: 26

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by nini09 View Post
What's your distribution, Fedora or something else?
its open suse...

I could not find rc.local or boot.local file( where we can add local commands) in its /etc/ directory.

So I thought of modifying /etc/fstab with the entry

192.168.174.134:/nfs/nfs_test /mnt nfs rw,soft,bg,timeo=3,intr 0 0

Its succeeding ONLY when I give

mount /mnt command manually ....

I feel /etc/fstab is not running before network fires up. So NFS is failing. How to make it sure that my network is working properly ?
 
Old 09-01-2010, 01:20 AM   #7
sjremya
LQ Newbie
 
Registered: Aug 2010
Location: India
Distribution: open suse
Posts: 26

Original Poster
Rep: Reputation: 1
Hi all

Happy to say that i solved NFS mounting problem in system boot up . Thank you all for your valuable suggestions.

It was a simple network problem. When I tried to mount NFS in /etc/init.d/rcs, network was not initialized properly. I have changed the position of network bringup to top (ifconfig eth0 <ip_addr> netmask <net_mask> up) in /etc/rc.d/rcS and gave some delay to establish network. At last i did NFS mounting using mount command.

mount -t nfs -o nolock <distant_machine> <my_mnt_pint> . It works fine.

But I wasted my time to look into fstab file to implement it . It is so easy to implement in rcS file.

Regards
SJR


 
  


Reply



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
NFS partition not mounting automatically milomak Linux - Networking 2 08-28-2010 03:31 PM
[SOLVED] NFS shares not mounting at boot time 2handband Linux - Networking 8 01-15-2010 05:48 PM
NFS not mounting at boot time thllgo Linux - Server 2 07-28-2009 03:01 PM
Mounting a nfs partition on boot time wjleon Linux - Newbie 1 05-02-2005 11:12 AM
nfs share is not mounting automatically pawlub Linux - General 1 01-03-2004 06:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 05:56 AM.

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
Open Source Consulting | Domain Registration