Unexpected NFS Auto-unmount?

Discussion in general that pertains to Sabayon Linux - Must Pertain to Sabayon Linux

Moderator: Moderators

Re: Unexpected NFS Auto-unmount?

Postby dison4linux » Tue Feb 19, 2013 17:08

I'm also having the same problem with a Sabayon 11 64-bit install on an i3 desktop with a GbE wired connection. Could the "wicd" work-around work in my case too? If so could you provide a little guidance on setting that up. Does this issue only apply to DHCP? I'll try changing my IP to static in Network Manager and see if that helps.
Baby Hen
Posts: 2
Joined: Tue Feb 19, 2013 17:03

Re: Unexpected NFS Auto-unmount?

Postby kayasaman » Tue Feb 19, 2013 17:44


what you could do to start with is see if you are getting the same issue.

See if NFS unmounts unexpectidly first.

Here's a script I wrote to remount things as my first work around:

Code: Select all

DATE=$(date +"%d-%b-%y %H:%M")

df -k | grep <mount_point> | grep -v grep > /dev/null

if [ $? == 1 ]; then

touch /tmp/nfs.temp
echo '===ALERT===' >> /tmp/nfs.temp
echo '' >> /tmp/nfs.temp
echo 'Mount Points Offline!' $HOSTNM $DATE >> /tmp/nfs.temp
echo '' >> /tmp/nfs.temp
echo 'TRACE:' >> /tmp/nfs.temp
echo '' >> /tmp/nfs.temp
tail -n -15 /var/log/messages >> /tmp/nfs.temp
echo '' >> /tmp/nfs.temp
mount <mount_point_1>
mount <mount_point_2>
echo 'Filesystems Have Been Remounted:' >> /tmp/nfs.temp
echo '' >> /tmp/nfs.temp
df -h >> /tmp/nfs.temp
mail -s "$DATE ALERT" <email_address> < /tmp/nfs.temp

rm /tmp/nfs.temp

else echo > /dev/null


Fill out the blanks < > with your details that I've described, so email could be any local email server or say Gmail etc....

This should give you the date and time of when the NFS session unmounted.

From there check your 'messages' log.... though the script prints it out automatically!!

Something like:

Code: Select all
tail -n -100 /var/log/messages

If you see a whole bunch of DHCP related stuff... "new lease" and so on then you know it IS the same issue.

First thing is to download wicd; being new to Sabayon myself I use:

Code: Select all
equo install wicd

Then disable NetworkManager and enable wicd:

Code: Select all
/usr/bin/rc-config delete NetworkManager default;

/usr/bin/rc-config add wicd default

Reboot and things should be fine! You can manage 'wicd' using the GUI interface which should pop up in your apps menu or 'wicd-curses' from the cli.

Nb. you need to be root to run the commands above!!

Alternately I wrote a script to automate the process and do some other bits as well:

Code: Select all

# Network Management script
_COLUMNS=$(tput cols)
_LINES=$(tput lines)
# Set default message if $1 input not provided
_MESSAGE="${1:-Network Management Switcher}"
# Calculate x and y coordinates so that we can display $MESSAGE
# centered in the screen
#x=$(( $_LINES / 2 ))
y=$(( ( $_COLUMNS - ${#_MESSAGE} )  / 2 ))
# Clear the screen
tput clear
# set x and y position
#tput cup $x $y
tput cup 0 $y
# set reverse video mode
tput rev
# Alright display message stored in $_MESSAGE
echo "${_MESSAGE}"

# Start cleaning up our screen...
#tput clear
tput sgr0
#tput rc

echo ''
echo 'Please choose an option:'
echo ''
   "Start wicd"
   "Start NetworkManager"
   "Enable wicd at boot"
   "Enable NetworkManager at boot"
   "Launch wicd-curses interface"
   "Check configured IP address"
   "Check wireless service"
   "Launch Wavemon"
   "Mount server"
   "Check storage usage"
   "Show Temperatures"
   "Check ntp status"
   "Print Menu"
   "Clear Screen"

select opt in "${options[@]}"; do
  case $REPLY in
      echo "Stopping NetworkManager";
                /etc/init.d/NetworkManager stop;
      sleep 10;
      echo "Starting wicd";
      /etc/init.d/wicd start
                echo "Stopping wicd";
                /etc/init.d/wicd stop;
                sleep 10;
                echo "Starting NetworkManager";
                /etc/init.d/NetworkManager start
                echo "Disabling NetworkManager from startup";
      /usr/bin/rc-config delete NetworkManager default;
      echo "Enabling wicd at startup";
      /usr/bin/rc-config add wicd default
             echo "Disabling wicd from startup";
                /usr/bin/rc-config delete wicd default;
                echo "Enabling NetworkManager at startup";
                /usr/bin/rc-config add NetworkManager default
      echo "Launching wicd-curses....";
      sleep 5;
      echo "Checking configured IP address";
      sleep 5;
      echo "Checking wireless connection";
      echo "Launching Wavemon....";
      sleep 5;
      echo "Mounting server shares:";
      /bin/mount <share_1>;
      sleep 2;
      /bin/mount <share_2>;
      echo "Shares have been mounted";
      /bin/df -h
      echo "Temperatures:";
      echo "";
      echo "Checking file system storage usage";
      echo "";
      /bin/df -h
                echo "Checking ntp connection";
      echo "";
      sleep 5;
                /usr/bin/ntpq -p
           echo "
1) Start wicd
2) Start NetworkManager
3) Enable wicd at boot
4) Enable NetworkManager at boot
5) Launch wicd-curses interface
6) Check configured IP address
7) Check wireless service
8) Launch Wavemon
9) Mount server
a) Check storage usage
b) Show Temperatures
c) Check ntp status
m) Print Menu
c) Clear Screen
r) Reboot
q) Quit
      /sbin/init 6
      echo "bye...";
tput clear

Again customize the shares between the < > ...
Young Hen
Posts: 29
Joined: Wed Feb 06, 2013 5:14


Return to Sabayon Linux General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest