Caprisun n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 08 May 2012 Posts: 15
|
Posted: Thu Jun 20, 2013 12:15 am Post subject: Diskless NFS mounting problem (Possible Fix Enclosed) |
|
|
Hello,
I have been working with Gentoo Diskless nodes for a while, and I'd like to thank everyone who made it possible.
It has been a while since I configured a diskless server, so today I was stumped for a few hours on an issue I know I solved before.
Basically, extra directories like /usr were defined in /etc/fstab but were not mounting on boot. mount-a had no problem performing the mount after logging in.
I altered the netmount script, which alleges that it cannot handle NFS mounts properly. However after the modification it yields proper mounts with no errors (No visible ones anyway).
The modification was to remove the "-O _netdev" option from the mount arguments.
I don't know if this is proper, however it seems to work. I also recalled (after rediscovering it) that this is how I resolved the issue months ago. The systems were always stable.
I tried to use the nfsmount script, however it complained that rpc.statd would not start, and I could not find any debug output in dmesg or /var/log.
The arguments can be found on lines 34 and 80.
EDIT : removing the arguments from line 80 creates the usual "Device is Busy" Warning on a diskless system. Leaving the options in place shuts it up.
Code: |
!/sbin/runscript
# Copyright (c) 2007-2009 Roy Marples <roy@marples.name>
# Released under the 2-clause BSD license.
description="Mounts network shares, other than NFS, according to /etc/fstab."
# We skip all NFS shares in this script because they require extra
# daemons to be running on the client in order to work correctly.
# It is best to allow nfs-utils to handle all nfs shares.
depend()
{
config /etc/fstab
use afc-client amd autofs openvpn
use dns
keyword -jail -prefix -vserver
}
start()
{
local x= fs= rc=
for x in $net_fs_list $extra_net_fs_list; do
case "$x" in
nfs|nfs4)
continue
;;
esac
fs="$fs${fs:+,}$x"
done
ebegin "Mounting network filesystems"
mount -at $fs
rc=$?
if [ "$RC_UNAME" = Linux ]; then
mount -a -O _netdev
rc=$?
fi
ewend $rc "Could not mount all network filesystems"
return 0
}
stop()
{
local x= fs=
ebegin "Unmounting network filesystems"
. "$RC_LIBEXECDIR"/sh/rc-mount.sh
for x in $net_fs_list $extra_net_fs_list; do
case "$x" in
nfs|nfs4)
continue
;;
*)
fs="$fs${fs:+,}$x"
;;
esac
done
if [ -n "$fs" ]; then
umount -at $fs || eerror "Failed to simply unmount filesystems"
fi
eindent
fs=
for x in $net_fs_list $extra_net_fs_list; do
case "$x" in
nfs|nfs4)
continue
;;
*)
fs="$fs${fs:+|}$x"
;;
esac
done
[ -n "$fs" ] && fs="^($fs)$"
do_unmount umount ${fs:+--fstype-regex} $fs --netdev
retval=$?
eoutdent
if [ "$RC_UNAME" = Linux ]; then
umount -a -O _netdev
retval=$?
fi
eend $retval "Failed to unmount network filesystems"
} |
|
|