Server IP address change screws up active mounts
One question I had for you guys happened to us when we were moving our subnets to an internal 10. net. We were using autofs version 3 on redhat 8, and I haven't had a chance to test this with version 4 yet, but the problem might still exist.
If the redhat client using automounter had mounted a directory from some server (so the mount was active), and then we changed the IP address of the server, the automounter would hang on that mount forever after. In fact we couldn't even do "init 6", we had to do "reboot -f" to get the client working again. To compare, with our Solaris machines, we didn't have this problem. The new IP address was discovered and the mount continued to work.
So I'm not really sure if this is an automount issue, or a mount command issue, but I figured you guys would be the right ones to ask. I definitely think this issue should be fixed, it's not that uncommon to move servers to new IP addresses.
Thanks!
-Dave
________________________________________________________________________
David Meleedy Analog Devices, Inc.
[email protected] Three Technology Way
Phone: 781 461 3494 Norwood, MA 02062-9106 USA
Ian Kent
maintainerQuoted 6 lines · David Meleedy
One question I had for you guys happened to us when we were moving our subnets to an internal 10. net. We were using autofs version 3 on redhat 8, and I haven't had a chance to test this with version 4 yet, but the problem might still exist.
Quoted 7 lines
If the redhat client using automounter had mounted a directory from some server (so the mount was active), and then we changed the IP address of the server, the automounter would hang on that mount forever after. In fact we couldn't even do "init 6", we had to do "reboot -f" to get the client working again. To compare, with our Solaris machines, we didn't have this problem. The new IP address was discovered and the mount continued to work.
You must post this to the nfs list.
Quoted 5 lines
So I'm not really sure if this is an automount issue, or a mount command issue, but I figured you guys would be the right ones to ask. I definitely think this issue should be fixed, it's not that uncommon to move servers to new IP addresses.
Sounds like an issue with NFS or mount.
It sounds a bit strange though. It's been my impression that these types of behaviour have improved greatly in later kernel versions.
What are the versions of:
kernel
util-linux
autofs
Ian
Quoted 4 lines · David Meleedy
One question I had for you guys happened to us when we were moving our subnets to an internal 10. net. We were using autofs version 3 on redhat 8, and I haven't had a chance to test this with version 4 yet, but the problem might still exist.
It still exists in autofs4 because, like Dennis said, it's really a mount/nfs issue, not autofs. If you run a mount -t nfs you'll note that the IP of the server is stored in the mount into.
It's ugly, but one fix I've found to clear these up is to temporarily setup an aliased ethernet entry with the IP of the server and netmask 255.255.255.255 (so you don't lose contact with a whole network), umount the mount, then shut down that aliased ethernet entry, and let automounter remount the path on the hosts' new ip. This is on each client btw.
i.e. if the host was 10.0.0.10 and is now 10.0.1.10, mount will show something like:
myhost:/some/path on /some/path type nfs (rw,noquota,addr=10.0.0.10)
do something like:
ifconfig eth0:1 inet 10.0.0.10 netmask 255.255.255.255 up umount /some/path
ifconfig eth0:1 down
ls /some/path so that automount remounts it on new host ip... and you
should be ok.
I'm working on an audit script to do just this on our /net path, because /net is used by a lot of our engineers to access other desktop's local disk/scratch space, and when users' move... the machines move and often get re-IPd. I've noted that when a box moves, and then things like df hang, the automount daemon on /net will hang when checking for paths to expire and will never expire any anymore. It will however still respond to and mount new /net requests. So eventually a host can hit the max number of allowable mounts.
Signature · 7 lines
Mike Marion-Unix SysAdmin/Staff Engineer-http://www.qualcomm.com [Joe just pulled Antonio away from a beautiful woman he was talking to, to move a cabinet a tiny bit] Antonio: "We barely moved it!" Joe: "Yeah I know, but it was askew! Isn't it amazing how something like that can throw off your whole day?" Antonio: "Yes, and you know I only wish I could stay and slap you senseless.. but there's a goddess waiting for me in the terminal." -- Wings