LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices



Reply
 
Search this Thread
Old 08-11-2009, 01:47 PM   #1
tongar
Member
 
Registered: Jan 2005
Distribution: SUSE ES 9 for x86
Posts: 43

Rep: Reputation: 15
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,
 
Old 08-11-2009, 02:19 PM   #2
tongar
Member
 
Registered: Jan 2005
Distribution: SUSE ES 9 for x86
Posts: 43

Original Poster
Rep: Reputation: 15
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,
 
Old 08-11-2009, 08:20 PM   #3
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 644Reputation: 644Reputation: 644Reputation: 644Reputation: 644Reputation: 644
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
 
Old 08-12-2009, 09:36 AM   #4
tongar
Member
 
Registered: Jan 2005
Distribution: SUSE ES 9 for x86
Posts: 43

Original Poster
Rep: Reputation: 15
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.
 
Old 08-12-2009, 10:25 AM   #5
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 644Reputation: 644Reputation: 644Reputation: 644Reputation: 644Reputation: 644
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

Last edited by kbp; 08-12-2009 at 10:26 AM.
 
Old 08-12-2009, 10:37 AM   #6
tongar
Member
 
Registered: Jan 2005
Distribution: SUSE ES 9 for x86
Posts: 43

Original Poster
Rep: Reputation: 15
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,

Last edited by tongar; 08-12-2009 at 10:44 AM.
 
Old 08-12-2009, 11:10 AM   #7
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , Solaris 10, RHEL
Posts: 1,935
Blog Entries: 1

Rep: Reputation: 188Reputation: 188
Quote:
Originally Posted by tongar View Post
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

Last edited by custangro; 08-12-2009 at 11:12 AM.
 
Old 08-12-2009, 12:54 PM   #8
tongar
Member
 
Registered: Jan 2005
Distribution: SUSE ES 9 for x86
Posts: 43

Original Poster
Rep: Reputation: 15
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,

Last edited by tongar; 08-12-2009 at 01:13 PM.
 
Old 08-12-2009, 01:53 PM   #9
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , Solaris 10, RHEL
Posts: 1,935
Blog Entries: 1

Rep: Reputation: 188Reputation: 188
Quote:
Originally Posted by tongar View Post
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NFS share in fstab fails to mount, but where is the log? gumpish Linux - Software 7 08-19-2009 08:22 PM
mount.nfs: mount to NFS server 'jesse' failed: timed out, retrying keupie Linux - Networking 3 06-05-2009 08:03 PM
AIX 5.3 to RHEL 5.1 nfs mount is read only ratiug65 Linux - Enterprise 1 09-24-2008 10:50 PM
RHEL 5 nfs mount hangs on RHEL 3 gwasigh Linux - Networking 1 06-13-2008 11:43 PM
Problem getting NFS mount to work between 2 RHEL servers beammeup Linux - Networking 7 02-21-2007 10:34 AM


All times are GMT -5. The time now is 09:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration