LinuxQuestions.org

LinuxQuestions.org (http://www.linuxquestions.org/questions/index.php)
-   Red Hat (http://www.linuxquestions.org/questions/forumdisplay.php?f=31)
-   -   RHEL 6.3 IP/Hostname change difficulties (http://www.linuxquestions.org/questions/showthread.php?t=4175445139)

Jsaba2 01-11-2013 09:15 AM

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!

acid_kewpie 01-11-2013 09:51 AM

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.

Jsaba2 01-11-2013 09:55 AM

Quote:

Originally Posted by acid_kewpie (Post 4867808)
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.

acid_kewpie 01-11-2013 09:58 AM

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?

Jsaba2 01-11-2013 10:03 AM

Quote:

Originally Posted by acid_kewpie (Post 4867821)
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.

Jsaba2 01-11-2013 10:13 AM

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.

acid_kewpie 01-11-2013 02:47 PM

so is the network connection actually up? (/sbin/ifconfig) Can you see an arp entry for the server? (arp -a)

Jsaba2 01-11-2013 03:19 PM

Quote:

Originally Posted by acid_kewpie (Post 4868010)
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)

acid_kewpie 01-12-2013 03:23 AM

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.

netnix99 01-12-2013 07:25 PM

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. :)

chrism01 01-14-2013 01:54 AM

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.

Jsaba2 01-14-2013 04:31 PM

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!

Jsaba2 01-19-2013 12:27 PM

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?

chrism01 01-20-2013 08:03 PM

Did you check the files I mentioned above?

Jsaba2 01-20-2013 08:20 PM

Quote:

Originally Posted by chrism01 (Post 4874371)
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.


All times are GMT -5. The time now is 05:35 AM.