LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 01-11-2013, 09:15 AM   #1
Jsaba2
LQ Newbie
 
Registered: Jan 2013
Posts: 14

Rep: Reputation: Disabled
RHEL 6.3 IP/Hostname change difficulties


I work for a company that provides Air Traffic Control Simulators running RHEL6 and I have a network of three computers A, B and C. These computers are not connected to the internet. Computer A is acting as the server while B and C are running off of the server. The IP address and host name configurations are as followed:

A- lab30a 192.168.20.51
B- lab30b 192.168.20.52
C- lab30c 192.168.20.53

My issue is that I have to reproduce this on two additional labs, rather than doing a clean install I just used Clonezilla and cloned the original lab twice. I am now trying to change the IP and host name to this:

A2- lab20a 192.168.20.41
A2- lab20b 192.168.20.42
A2- lab20c 192.168.20.43

A2- lab21a 192.168.20.44
A2- lab21b 192.168.20.45
A2- lab21c 192.168.20.46

I have gone in and changed the following files:

On lab20(21)a -
/etc/hosts
/etc/sysconfig/network
/tmp/admin_tools/machine_list
and ran
cd /home/atcsys/atc_storage/local/admin_tools
./system_setup/set_network_active_server.sh lab20(21)a

On lab20(21)b -
/etc/hosts
/etc/sysconfig/network
and ran
cd /home/atcsys/atc_storage/local/admin_tools
./system_setup/set_network_active_server.sh lab20(21)a

On lab20(21)c -
/etc/hosts
/etc/sysconfig/network
and ran
cd /home/atcsys/atc_storage/local/admin_tools
./system_setup/set_network_active_server.sh lab20(21)a

Now when I start up the computers (server first and then the two others) and log into anything other than root, the two student computers will hang as they are not properly mounted. I thought that I changed all the necessary host names, IP addresses and rebooted after the change so it all takes effect.

In root on all three I am able to ping each computer by their host names and ip addresses. Could this be an issue with the NFS server? The system says that they are trying to mount to the original IP address for some reason.

I hope that I was detailed enough for some help. If anyone needs additional information just let me know and I will obtain it promptly! This is a very time sensitive issue so any help is grateful!
 
Old 01-11-2013, 09:51 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,398

Rep: Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964
we have no idea at all what this script does so we really can't comment. It could be NFS, but you didn't say in the first instance that NFS was even being used. We have no idea at all what the server is serving.
 
1 members found this post helpful.
Old 01-11-2013, 09:55 AM   #3
Jsaba2
LQ Newbie
 
Registered: Jan 2013
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by acid_kewpie View Post
we have no idea at all what this script does so we really can't comment. It could be NFS, but you didn't say in the first instance that NFS was even being used. We have no idea at all what the server is serving.
The script is telling all three computers that lab30(20 21)a is the server and to get information to/from it, I believe. I was not the person who created this script, but here it is

set_network_active_server.sh:

#!/bin/sh

. `dirname ${0}`/lib/lib_common.sh
. lib_remote.sh
. lib_ipv4_addr.sh
. exit_codes.sh

#
# Remote command timeout
#
REMOTE_TIME_LIMIT_SEC=60


#
# Main
#
# Select the currently active ATCoach file server on all machines
#
# $1 = ATCoach file server machine name or address (in)
# $2 = system machine list file (in, optional)
# $3 = network address (in, optional)
#
Main()
{
server=$1
machine_list_file=${2:-machine_list}
atc_network=${3:-`echo $ATC_NETWORK`}

Get_Machine_Address ${machine_list_file} ${server} server_address
if [ -z "${server_address}" ]
then
exit ${EXIT_UNKNOWN_SERVER}
fi

Get_Remote_Machines ${machine_list_file} ${atc_network} \
${MACHINE_ADDRESS_HOST} machine_list
Move_IPv4_To_List_End ${this_machine} machine_list

Network_Command_With_Timeout machine_list ${REMOTE_TIME_LIMIT_SEC} \
"Setting active server ${server_address}" \
${SCRIPT_DIR}/set_active_server.sh ${server_address}
exit_code=$?
if [ ${exit_code} != ${EXIT_SUCCESSFUL} ]
then
echo "Failed to select ${server} as the active file server on all systems"
fi

exit ${exit_code}
}


Main $*

----------------------------

Yes, NFS is enabled.

Last edited by Jsaba2; 01-11-2013 at 09:58 AM. Reason: Forgot information
 
Old 01-11-2013, 09:58 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,398

Rep: Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964
This script appears to call other bespoke scripts we also don't know anything about.

Can you actually succinctly explain what is not working? what does "computers will hang as they are not properly mounted" mean? can you log in as root?

Last edited by acid_kewpie; 01-11-2013 at 09:59 AM.
 
1 members found this post helpful.
Old 01-11-2013, 10:03 AM   #5
Jsaba2
LQ Newbie
 
Registered: Jan 2013
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by acid_kewpie View Post
This script appears to call other bespoke scripts we also don't know anything about.

Can you actually succinctly explain what is not working? what does "computers will hang as they are not properly mounted" mean? can you log in as root?
Yes I can log in as root, when logging in as user, the two student computers are supposed to mount to the server machine but none of the data is loaded like it is trying to do something but can't get past a certain point. I will pull a log and copy and paste it into here momentarily.
 
Old 01-11-2013, 10:13 AM   #6
Jsaba2
LQ Newbie
 
Registered: Jan 2013
Posts: 14

Original Poster
Rep: Reputation: Disabled
Jan 10 04:14:37 lab20c ntpd[2425]: Listening on interface #5 eth0, 192.168.20.43#123 Enabled
Jan 10 04:14:37 lab20c ntpd[2425]: Listening on routing socket on fd #22 for interface updates
Jan 10 04:14:37 lab20c ntpd[2425]: kernel time sync status 2040
Jan 10 04:14:37 lab20c ntpd[2425]: frequency initialized 0.000 PPM from /var/lib/ntp/drift
Jan 10 04:14:37 lab20c abrtd: Init complete, entering main loop
Jan 10 04:14:37 lab20c kernel: Slow work thread pool: Starting up
Jan 10 04:14:37 lab20c kernel: Slow work thread pool: Ready
Jan 10 04:14:37 lab20c kernel: FS-Cache: Loaded
Jan 10 04:14:38 lab20c kernel: Registering the id_resolver key type
Jan 10 04:14:38 lab20c kernel: FS-Cache: Netfs 'nfs' registered for caching
Jan 10 04:14:41 lab20c mount[2590]: mount to NFS server '192.168.20.51' failed: No route to host, retrying
Jan 10 04:14:56 lab20c mount[2596]: mount to NFS server '192.168.20.51' failed: No route to host, retrying
Jan 10 04:15:07 lab20c mount[2596]: mount to NFS server '192.168.20.51' failed: No route to host, retrying
Jan 10 04:15:26 lab20c mount[2596]: mount to NFS server '192.168.20.51' failed: No route to host, retrying
Jan 10 04:16:01 lab20c mount[2596]: mount to NFS server '192.168.20.51' failed: No route to host, retrying
Jan 10 04:17:08 lab20c mount[2596]: mount to NFS server '192.168.20.51' failed: No route to host, retrying
Jan 10 04:19:11 lab20c mount[2596]: mount to NFS server '192.168.20.51' failed: No route to host, retrying
Jan 10 04:21:14 lab20c mount[2596]: mount to NFS server '192.168.20.51' failed: No route to host, retrying

This happens for a while and then disconnects.
 
Old 01-11-2013, 02:47 PM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,398

Rep: Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964
so is the network connection actually up? (/sbin/ifconfig) Can you see an arp entry for the server? (arp -a)
 
1 members found this post helpful.
Old 01-11-2013, 03:19 PM   #8
Jsaba2
LQ Newbie
 
Registered: Jan 2013
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by acid_kewpie View Post
so is the network connection actually up? (/sbin/ifconfig) Can you see an arp entry for the server? (arp -a)
Yes it is, I am able to ping each computer from the other computers (a -> b, a -> c, b -> a, c -> b, etc)
 
Old 01-12-2013, 03:23 AM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,398

Rep: Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964Reputation: 1964
So either the nfs daemon isn't running on the server, or maybe iptables is only allowing the original client ip's into the server? Show us "iptables -vnL" from the client and server, and also "netstat -plntu" on the server.
 
1 members found this post helpful.
Old 01-12-2013, 07:25 PM   #10
netnix99
Member
 
Registered: Jun 2011
Distribution: redhat, CentOS, OpenBSD
Posts: 241

Rep: Reputation: 73
Jsaba2,

Can you log into the student computers as root and just mount the NFS file system to any mount point?

mount nfs_server:/nfs_filesystem /mnt

ls /mnt (to see if you can see the data the fileserver is serving)

This will tell you if everything is working okay with NFS in general. Start with the basics and make sure everything is running correctly before you start trying to deduce whether someone is an accomplished script writer.

Also, if you are running this script as a normal unprivileged user, it will not be able to mount NFS filesystems. Only root can do that.

Last edited by netnix99; 01-12-2013 at 07:27 PM.
 
1 members found this post helpful.
Old 01-14-2013, 01:54 AM   #11
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,269

Rep: Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028
Code:
Jan 10 04:14:56 lab20c mount[2596]: mount to NFS server '192.168.20.51' failed: No route to host, retrying
so its trying to mount the OLD server's address. You need to amend the /etc/fstab.
You probably need to amend /etc/exports on the server also.
 
1 members found this post helpful.
Old 01-14-2013, 04:31 PM   #12
Jsaba2
LQ Newbie
 
Registered: Jan 2013
Posts: 14

Original Poster
Rep: Reputation: Disabled
Sorry about the delay, my work has me travel a lot. I will test these things in the next couple days and report back if they work. I appreciate all the help with this issue!
 
Old 01-19-2013, 12:27 PM   #13
Jsaba2
LQ Newbie
 
Registered: Jan 2013
Posts: 14

Original Poster
Rep: Reputation: Disabled
Okay, so I tried those things posted above. The /etc/mounts file on the students are blank while that file on the server doesn't call for any IP addresses. I tried messing with the mounts and what not, with no avail I just decided to do a mount -a and I got this response:

mount.nfs: backgrounding "192.168.20.51:home/atcsys/atc_storage/exports/exported/mounts/"

mount.nfs: mount options: "bg,vers=4,addr=192.168.20.51,clientaddr=192.168.20.46"

The computer I did this on is the correct client address of ....46 but it is calling on the original .51, rather than the new server IP ....44. How do I change what this mount.nfs is trying to call on so that it will auto-mount to 192.168.20.44?
 
Old 01-20-2013, 08:03 PM   #14
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,269

Rep: Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028
Did you check the files I mentioned above?
 
Old 01-20-2013, 08:20 PM   #15
Jsaba2
LQ Newbie
 
Registered: Jan 2013
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by chrism01 View Post
Did you check the files I mentioned above?
Yes, neither file calls on a particular IP address. I haven't been able to find any files other than my previous post that is calling on the IP when I try to mount -a.
 
  


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
getting errors related to hostname -- security problem? ok to change hostname? sneakyimp Linux - Server 2 11-18-2012 05:25 PM
New Unix/Linux user - trying to a write a bash script to change the hostname on RHEL *unix* Linux - Newbie 2 08-08-2012 08:21 AM
Bash Script to change hostname for RHEL wegadnie Linux - General 7 06-22-2011 05:37 AM
Redhat Cluster Suite on RHEL 5.2(Virtual Hostname) scbops Red Hat 3 08-13-2009 12:55 PM
after hostname change, syslogd still output previous hostname to messages file tiger2000 Linux - General 3 07-22-2009 09:36 PM


All times are GMT -5. The time now is 03:11 PM.

Main Menu
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