Results 1 to 10 of 17
Enjoy an ad free experience by logging in. Not a member yet? Register.
[SOLVED] NFS is not mounting automatically @boot time
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
probably you need to start portmap/rpcbind service on startup before network mount of filesystems
what is your embedded OS?
@coopstah13 : thanks for the concern
I am using linux 2.6.20 .
how to start portmap/rpcbind ??
#mount /mnt </mnt is the mount point as in /etc/fstab>
But still i have a problem. I have to do this automatically in the boot time, instead of giving commands in the command prompt..? how can i do that ? Will rc.local do that ?? How to create rc.local ?
i dont know what your embedded OS is
usually you create either manually or through a command a set of startup scripts, typically they go in /etc/rcX.d folder where X is replaced by the runlevel number that script will be executed on
/etc/rc.local is executed last, so I suppose the easiest solution if it works is to start portmap in that file and then mount the NFS share, but if you need it earlier in the boot process (or want to use it in /etc/fstab file) you will need to create a script to start portmap and put it in the rcX.d folders corresponding to your runlevels
You mentioned the exact problem, I face here.
I would like to get a program flow as follows:
-> ethernet UP
-> mount NFS
-> run the NFS mounted applications ( appln1, appln2, .. etc)
Ethernet (eth0) up, is done in /etc/init.d/rcS. So next step is NFS mount. After that applications should start.
Please tell me which method I can use to achieve it. Even though i did an entry in /etc/fstab, I have to enter portmap start , and mount command manually. I would like to avoid that.
Is rc.local is a better way? But I could not see that file in my root filesystem? Is it a system generated file? Or I can add it in /etc/init.d/ ?
Thanks in advance
I have selected rc.local method.
I tested the rc.local file manually by starting it in the command prompt as shown here :
# /etc/rc.d/rc.local &
Its running fine ,and executing the script commands i given in that. But how to run it automatically in the boot time? I mean where to run this rc.local file in the filesystem to make it run automatically. Thats my problem. Please help me out
- Join Date
- Nov 2008
I am using fedora for the last 3 years with nfs mount points
Here is only a suggestion but it could help you :
I add a line for each mount point in my /etc/fstab after the devices such as :
my_server_name:/my_distant_folder /my_mount_point nfs defaults 0 0
It will be mounted at each boot without problem, or running "mount -a" or "mount /my_mount_point"
then you can add options instead the default one.
I have added the above command in /etc/fstab .
192.168.174.134:/nfs/nfs_test /mnt nfs rw,soft,bg,timeo=3,intr 0 0
But i have to give 'mount /mount_point in the command prompt to finish mounting. Is there any other way to add this command [ i mean , instead of doing it manually]