How to reboot two Linux servers with boot delayed on NFS client server
I am new to this forum and new to Linux administration and I will be really appreciated for your help and suggestions on this issue.
I have two RHL V6.1 servers. The Server1, which is a NFS client server, has an EDI application installed. This application uses all mount points; two of them are NFS which belongs to Server2.
I like to schedule reboot of these two servers in the following way:
- Stop EDI application on the Server1
- Shut down Server1
o Reboot Server2
- Boot up Server1
- Start EDI application on the Server1
So, the Server1 should start reboot process, wait for Server2 to reboot and then boot when Server2 (NFS server) is already up and running.
This is only a draft:
so you need to implement what you wrote in a shell (running on server1):
1. Stop EDI application on the Server1
2. start delayed reboot on server2, delay can be defined by measuring shutdown time
3. reboot server1 (optionally you can shutdown server1 and try to boot it from server2 if there was such possibility)
script is now completed.
during the reboot of server1 you need to insert a step before starting your app: wait for the nfs shares (to be available). If you use automounter you would only need to check the existence of those mounts in a loop.
Thank you for the replay. Just to clarify my case:
The Server1 is a client NFS server and Server2 is a NFS server.
I would like to start with reboot process on the Server1 (NFS client) to free up NFS partitions which belongs to the Server2.
Then reboot Server2.
After Server2 is up and running, NFS mount points are available, I like to boot Server1 and start my application.
What I am looking for is a solution to delay shutdown/startup of the Server1 and give plenty of time to Server2 for the reboot process.
A couple of solns:
1. use timing in cron eg
a) at time X, have client shutdown any processes dependent on the nfs and umount from nfs
b) at time X + T1 (eg 5 mins), have server reboot
c) at time X + T2 (eg 10 mins), have client do nfs mount & restart procs etc
2. more complex
a) as above
b) have a daemon on server check client mount has gone & reboot
c) have a daemon on client check for server nfs availability and re-mount when it is
Thank you Chris
It should work in the way you suggested.
The only thing I wary about is application on client server which I think I will stop/start from cron
|All times are GMT -5. The time now is 10:58 PM.|