[Bug 933575] Re: NFS not being mounted at boot time - rpc.statd is not running but is required for remote locking

mastro 933575 at bugs.launchpad.net
Wed Mar 28 14:20:15 UTC 2012


Hi Steve,

I'm really sorry, that server has been took out from production a while
ago, and I completely forgotten about this.

last week we had some disk space issue in our multi-porpouse virtual
machine manager and I get rid of old unused VMs, the one with this issue
was one of them: it's gone.


I kept the workaround I used there and I report it here, it may be helpful to someone...
It's a script that start at boot time (as cron) and retry every 5 seconds to mount fstab disks until it's successfull.

I created this script in /usr/sbin/nfs-boot-mount

#!/bin/sh

LOG_DIR="/var/log/nfs-boot-mount";
LOG_FILE="${LOG_DIR}/nfs-boot-mount_`date +'%Y_%m_%d'`.log";
RETRY_IN_SEC=5;

checkAndMount() {
	echo "`date` - Try mounting nfs..." >> "${LOG_FILE}"
	mount -a >> "${LOG_FILE}" 2>&1;
	result=$?;
	if [ $result -eq 0 ] ; then
		echo "SUCCESS!" >> "${LOG_FILE}"
	else
		echo "FAILED! Retrying in ${RETRY_IN_SEC} seconds." >> "${LOG_FILE}"
	fi
	return $result;
}

loopCheckMount() {
	fail=1;
	while [ $fail -ne 0 ] ; do
		sleep ${RETRY_IN_SEC};
		checkAndMount;
		fail=$?;
	done;
}

mkdir -p "${LOG_DIR}";

checkAndMount
if [ $? -ne 0 ] ; then
	loopCheckMount &
fi

# END


gave it +x (execution permission)

then:
crontab -e

and add:
@reboot /usr/sbin/nfs-boot-mount-check


this will start the script at boot time and retry mount -a until it's successful, everything will be logged in /var/log/nfs-boot-mount/ directory.

I apologize again, I really forgot it.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to nfs-utils in Ubuntu.
https://bugs.launchpad.net/bugs/933575

Title:
  NFS not being mounted at boot time - rpc.statd is not running but is
  required for remote locking

Status in “nfs-utils” package in Ubuntu:
  Incomplete

Bug description:
  Version: Ubuntu SERVER 11.04

  installed nfs-commons

  added this to /etc/fstab:

  192.168.88.252:/repo  /mnt/repos   nfs     rw,hard,intr  0     0

  but I also tried
  192.168.88.252:/repo  /mnt/repos   nfs      _netdev,rw,hard,intr
  192.168.88.252:/repo  /mnt/repos   nfs      defaults,_netdev,rw,hard,intr

  
  with
  mnt /mnt/repos

  it works.

  reboot.

  I don't get the NFS up at boot time.

  I access to the server with SSH, eth0 and network is fine
  no NetworkManager
  no gui

  mount -a

  it works...

  so to debug the issue I added this to /etc/rc.local (before exit 0)

   mount /mnt/repos > /tmp/mounting.$$ 2>&1

  rebooted and I got this in that file:

  
  mount.nfs: rpc.statd is not running but is required for remote locking.
  mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
  mount.nfs: an incorrect mount option was specified


  I can't get NFS being mounted at boot time.
  --- 
  Architecture: amd64
  DistroRelease: Ubuntu 11.04
  InstallationMedia: Ubuntu-Server 11.04 "Natty Narwhal" - Release amd64 (20110426)
  Package: mountall 2.25ubuntu1
  PackageArchitecture: amd64
  ProcEnviron:
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  ProcVersionSignature: Ubuntu 2.6.38-13.55-server 2.6.38.8
  Tags:  natty
  Uname: Linux 2.6.38-13-server x86_64
  UpgradeStatus: No upgrade log present (probably fresh install)
  UserGroups:

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/933575/+subscriptions




More information about the foundations-bugs mailing list