0

I'm facing a problem with NFS mounts. I manage a cluster with five Ubuntu 12.04 nodes. I need to NFS export some paths in the main node to run my applications. Ping and ssh are working fine if I boot without the NFS shares.

After stopping and restarting the system secondary nodes can not boot as they can't get the NFS shares. In the boot process I get this error messages:

Starting block the mounting event for NFS filesystems until statd is running

Stopping mount filesystems on boot

Starting NFSv4 id <-> name mapper

I have tried to start the nodes in recovery mode, edit /etc/fstab to remove the shares and then mount with sudo mount -va but without success:

meteo@ventus2:~$ sudo mount -va
[sudo] password for meteo: 
mount: proc ya está montado en /proc
mount.nfs: timeout set for Fri Mar 28 09:30:01 2014
mount.nfs: trying text-based options 'vers=4,addr=192.168.1.1,clientaddr=192.168.1.2'
mount.nfs: mount(2): Connection refused
mount.nfs: trying text-based options 'vers=4,addr=192.168.1.1,clientaddr=192.168.1.2'
mount.nfs: mount(2): Connection refused
mount.nfs: trying text-based options 'vers=4,addr=192.168.1.1,clientaddr=192.168.1.2'
mount.nfs: mount(2): Connection refused

I also tried

meteo@ventus2:~sudo service statd restart
statd stop/waiting
statd start/running, process 3759

meteo@ventus2:~$ ps -ef | grep statd
statd     3544     1  0 09:24 ?        00:00:00 rpc.statd -L

and then mount but it does not work.

Here you can see /etc/fstab and hosts in secondary node ventus2

fstab

ventus:/home/meteo/mirror /home/meteo/mirror nfs

hosts

192.168.1.1 ventus.ceam.es ventus 192.168.1.2 ventus2.ceam.es ventus2

and /etc/exports in main node ventus

192.168.1.1 ventus 192.168.1.2 ventus2

The funny thing is that the system had been working since the stop and start event this week. The main node is the only one with Internet connection so the system is regularly updated, the secondary ones remain with their first Ubuntu 12.04 system. Maybe a version conflict? mount -V gives the same version.

mount from util-linux 2.20.1 (with libblkid and selinux support)

Any idea or suggestion? I'll continue looking through the web.

Thanks in advance

0

I finally found a solution for the NFS mount problem. Looking for similar questions at Stackoverflow I arrived at this post

I applied the suggestion to install and run rcconf

sudo apt-get install rcconf dialog
sudo rcconf

In rcconf I marked statd as selected (it was unmarked) and rebooted the main node (NFS server). Then I restarted each node, entered in recovery mode, modified fstab so they could boot (commenting any NFS entry). When the node was up I restored fstab and mounted NFS filesystems.

When entering in recovery mode I had to remount the filesystem before editing fstab, it was not writable before

mount -o remount,rw /

nano /etc/fstab

then resumed normal boot.

In a terminal I uncommented NFS imports from /etc/fstab and run sudo mount -va

Now, mounted filesystems appear, they can be listed and a file created/edited in a node appears on all nodes.

Of course, there should be a better and more general solution for NFS properly booting but this has worked for me.

Hope it helps someone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.