[K12OSN] nfs problems, continued

Matthew Ross mross at esd165.org
Thu Jul 1 20:27:04 UTC 2004


Carl Keil wrote:

> After a reboot, showmount -e says:
> mount clntudp_create: RPC: Program not registered
>
> After running service nfs restart, I get:
> Shutting down NFS mountd:                                  [FAILED]
> Shutting down NFS daemon:                                  [FAILED]
> Shutting down NFS quotas:                                  [FAILED]
> Shutting down NFS services:                                [  OK  ]
> Starting NFS services:                                     [  OK  ]
> Starting NFS quotas:                                       [  OK  ]
> Starting NFS daemon:                                       [  OK  ]
> Starting NFS mountd:               [OK]
>
> [root at linuxhost root]# showmount -e
> Export list for linuxhost:
> /             192.168.0.253/255.255.255.0
> /home         192.168.0.253/255.255.255.0,192.168.0.0/255.255.255.0
> /opt/lts/i386 192.168.0.253/255.255.255.0,192.168.0.0/255.255.255.0
>
> Then, when I boot the client I get to the grey screen with the X on it.
>
> YAY!
>
> So, now I'm starting the gdm manager gdm.conf dance.  Which scares the 
> hell out of me, because I don't want to trash my server's desktop.
>
> But my question is, does anyone know what I need to do to not have to 
> type "service nfs restart" at the command line every time I reboot?  
> I'd love to just reboot this puppy and have everything start up.  But 
> I'm not getting anywhere with google, etc.
>
> Thanks again...
>
The problem is that you're having /home mounted via NFS in your 
/etc/fstab file. While that seems like it should work, it doesn't 
because they system doesn't have NIC drivers or NFS deamons loaded by 
the time the boot proccess tries to mount all the mountpoints in /etc/fstab.

The solution (was what I could find) was to use autofs, an automounter 
for all kinds of mounted media. What it does is wait until somebody or 
some proccess tries to access the directory to be mounted, then creates 
and mounts it all for you using parramiters you provide.

/etc/auto.master needs to be edited to add an entry for your new mount 
point. For example, you could put in the following line:

    /home   /etc/auto.home

Then, you'll need to create a /etc/auto.home file which will have your 
mount options. For example:

    home   -fstype=nfs,-rw   <hostname or ip of server>:/home

Then you should be able to restart autofs ('/etc/init.d/autofs restart') 
and then try to access the /home directory.

Please note, I've not tried this with NFS yet. I've only done a quick 
test using my CDRom drive. I recommend you read the fine manpages for 
autofs and auto.master for sanity checks.

--Matt





More information about the K12OSN mailing list