LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   RHEL 5.2 log locations to debug an NFS mount (https://www.linuxquestions.org/questions/red-hat-31/rhel-5-2-log-locations-to-debug-an-nfs-mount-746785/)

tongar 08-11-2009 12:47 PM

RHEL 5.2 log locations to debug an NFS mount
 
Hi,

Environment: RHEL 5.2 Advanced Platform x86_64, with updates current

When I select the show details during boot, I see a lot of messages go by. They are not logged to dmesg or var/log/messages. Does anyone know where they are saved or if I need to ask that they be saved?

In that case, I was looking at errors from and fstab nfs mount that refused to work. Some say the network is not ready for nfs at fstab time. Moved the mount to it to etc/rc.local and it still refuses to work. I put some touch command in rc.local to verify it was executing. As root, I can copy/paste the rc.local mount line to a commandline and it works.

Firewalls/SELinux are disabled. nfs and portmap are on for 3,4,5.

Could this be timing or permissions? What runs later than rc.local? Who is the pre-login user running rc.local?

Also, when /etc/rc.local local executes, do error messages get logged anywhere? They do not appear to be in dmesg or var/log/messages.

thanks,

tongar 08-11-2009 01:19 PM

Update:

Appears to be timing, put a "sleep 300" before the mount command in rc.local and it worked.

Hardware: IBM System x 3650, 2x4core2GHz, 64-bit, 8G mem

I would still appreciate any insight into the log message locations.

thanks,

kbp 08-11-2009 07:20 PM

Hi Tongar,

Not sure why your messages aren't showing up in dmesg/messages but the mount issue may be resolved by enabling netfs rather than using rc.local

cheers

tongar 08-12-2009 08:36 AM

Thanks kbp,

netfs is on for 3,4,5. I did not verify that it was on when trying to use fstab, but I did not knowingly turn it on since then.

If there is a way to get fstab to function properly, that would be great.

kbp 08-12-2009 09:25 AM

Hi Tongar,

You didnt mention whether nfslock was enabled.. ? .. this is required on client and server. Also, what platform is the nfs server.. I've had issues in the past with nfs version mismatches

cheers,

kbp

tongar 08-12-2009 09:37 AM

nfslock is enabled for 3,4,5. The server is identical to the client.

This seems to be a common problem in a variety of distros Most workaround with the rc.local approach. Some fiddle with the start order of various services (S/K) in rc.

If I just wanted it to work, I would be done and use the goofy rc.local/sleep workaround. But I am documenting process for others who I would not want coming to either of the conclusions: A. Tongar is a total idiot and has implemented this crazy workaround when all he had to do was flip this simple switch. or B. Linux is an unreliable Kludge.

What about another solution I saw with the auto mount option in fstab tha would delay mount until someone wanted it? seems simple, any ill effects? Would assume it stays mounted after mount, correct?

thanks for any other ideas,

custangro 08-12-2009 10:10 AM

Quote:

Originally Posted by tongar (Post 3640538)
nfslock is enabled for 3,4,5. The server is identical to the client.

This seems to be a common problem in a variety of distros Most workaround with the rc.local approach. Some fiddle with the start order of various services (S/K) in rc.

If I just wanted it to work, I would be done and use the goofy rc.local/sleep workaround. But I am documenting process for others who I would not want coming to either of the conclusions: A. Tongar is a total idiot and has implemented this crazy workaround when all he had to do was flip this simple switch. or B. Linux is an unreliable Kludge.

What about another solution I saw with the auto mount option in fstab tha would delay mount until someone wanted it? seems simple, any ill effects? Would assume it stays mounted after mount, correct?

thanks for any other ideas,

I had the same issues with NFS in the fstab...the "common" workaround is to have this (This is from Dell's Red Hat team)...
Code:

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
       
touch /var/lock/subsys/local
mount -a
#

The automount solution is a bit more "elegant" ...so lets say you wanted nfs-server:/exports/bob to mount on /share/bob anytime someone wants to access it...

In the /etc/auto.master file add the following...

Code:

/share    /etc/auto.share  --timeout=60
Then create the /etc/auto.share file with the following entry...

Code:

*              -rw,soft,intr          nfs-server:/exports/&
Restart the autofs service and you should be good to go :)

I've done this with homedirs on my servers (so there is a "common" homedirs on ALL servers) and it only mounts when someone logs in or accesses the dir (i.e. like when they cd or when they ls the dir).

-C

tongar 08-12-2009 11:54 AM

thanks custangro,

Anyone succeeded in making the option below work in an fstab nfs mount?

_netdev
The filesystem resides on a device that requires network access (used to prevent the system from attempting to mount these filesystems until the network has been enabled on the system).

If so, do you include a seperate mount statement in fstab or just the device lines?

What does _netdev really mean:
A: we now understand that this device is dependent on the network being up and since we are an intelligent OS will will take care of this for you and automatically mount it the instance that your network becomes available. You do not need to take further action.

or

B: (same as noauto) we will not automatically mount this device. you are on your own as to how it gets mounted.


thanks,

custangro 08-12-2009 12:53 PM

Quote:

Originally Posted by tongar (Post 3640725)
thanks custangro,

Anyone succeeded in making the option below work in an fstab nfs mount?

_netdev
The filesystem resides on a device that requires network access (used to prevent the system from attempting to mount these filesystems until the network has been enabled on the system).

If so, do you include a seperate mount statement in fstab or just the device lines?

What does _netdev really mean:
A: we now understand that this device is dependent on the network being up and since we are an intelligent OS will will take care of this for you and automatically mount it the instance that your network becomes available. You do not need to take further action.

or

B: (same as noauto) we will not automatically mount this device. you are on your own as to how it gets mounted.


thanks,

Yup they have me try the "_netdev" too...didn't work for me.

I had to do the rc.local "workaround"

I'm surprised that this is such a problem for Linux...on ALL of my Solaris boxes...I put an NFS share in the vfstab file...and guess what?

Solaris mounts them on boot! What an idea! ;)

-C


All times are GMT -5. The time now is 01:59 PM.