@KCotreau: Your method is no guarantee that the server won't get hung up on the shutdown. It may seem more likely that it will reboot successfully but I doubt there's any data to support that supposition. If you want to make absolutley sure that you can remotely reboot a server and recover it if it hangs, you need remotely controlled power and an IP kvm.
Personally, I reboot our servers the usual way and if one of them hangs up I deal with it... that's part of the job. I can tell you that in my 11 years in the IT field that the instances of a server hanging up on a reboot could be counted on 1 hand.
I get where you're coming from but if I spent my time worrying about something that might happen, without evidence showing that it's likely to happen, I'd never leave the house.
At any rate, you've worked out a method for yourself and it looks sound, so I say if it makes you comfortable to do it that way then carry on.
I actually know how I do it, but I really wanted to share this tip, so I phrased it as a question. I hope that is O.K.
If you use the obvious Start>Shutdown>Reboot, you risk the server not actually rebooting. We have all seen situations where you just log off of a computer, but it waits for you to end task on some program hung in the background. If that happens, you may be going into work to fix the problem immediately if the server is important enough.
I strongly suggest that you never reboot a computer remotely using Start>Shutdown>Reboot, or to allow a program install to do it (say no to the reboot, then follow the directions below), but rather create a batch file called reboot.bat with the command “shutdown -r -f -t 00” (minus the quotes) and put it in %windir%\system32 directory. The switch -f forces those tasks closed, and you are much more likely to have a successful reboot. You then just run reboot in either Start>Run, or as I prefer, simply at a command prompt. I prefer not to leave a command in the run box that can accidentally reboot a server.
In my experience it helps if you close down most programs/services first. Especially Exchange can be a bitch to reboot, but less so if you first manually shut down the services.
First, I am going to assume you have out-of-band management (DRAC, iLO, a/iLOM, etc). A terminal server or IP KVM can be helpful but if you have a lockup when you're shutting down your boat is sunk. If you don't, you may want to look into one of the above for the future if its a possible addon. From there, simply log in, reboot, and watch what happens. If it locks up at shutdown, kill the power and let the OS come back up. This is why out of band management is important.
I have a ready made batch file which calls the shutdown command with appropriate parameters. I also have a one-time scheduled task that is normally disabled. When required I set the schedule for that task to a couple of minutes in the future, enable it and log off.
The logging off part is the key, as every time I've had a server hang during shutdown it was because I did the shutdown while logged on. Using the task scheduler method I've so far (about 6 years) had 100% success.
@KCotreau: Your method is no guarantee that the server won't get hung up on the shutdown. It may seem more likely that it will reboot successfully but I doubt there's any data to support that supposition. If you want to make absolutley sure that you can remotely reboot a server and recover it if it hangs, you need remotely controlled power and an IP kvm.
Personally, I reboot our servers the usual way and if one of them hangs up I deal with it... that's part of the job. I can tell you that in my 11 years in the IT field that the instances of a server hanging up on a reboot could be counted on 1 hand.
I get where you're coming from but if I spent my time worrying about something that might happen, without evidence showing that it's likely to happen, I'd never leave the house.
At any rate, you've worked out a method for yourself and it looks sound, so I say if it makes you comfortable to do it that way then carry on.
I actually know how I do it, but I really wanted to share this tip, so I phrased it as a question. I hope that is O.K.
If you use the obvious Start>Shutdown>Reboot, you risk the server not actually rebooting. We have all seen situations where you just log off of a computer, but it waits for you to end task on some program hung in the background. If that happens, you may be going into work to fix the problem immediately if the server is important enough.
I strongly suggest that you never reboot a computer remotely using Start>Shutdown>Reboot, or to allow a program install to do it (say no to the reboot, then follow the directions below), but rather create a batch file called reboot.bat with the command “shutdown -r -f -t 00” (minus the quotes) and put it in %windir%\system32 directory. The switch -f forces those tasks closed, and you are much more likely to have a successful reboot. You then just run reboot in either Start>Run, or as I prefer, simply at a command prompt. I prefer not to leave a command in the run box that can accidentally reboot a server.
In my experience it helps if you close down most programs/services first. Especially Exchange can be a bitch to reboot, but less so if you first manually shut down the services.
First, I am going to assume you have out-of-band management (DRAC, iLO, a/iLOM, etc). A terminal server or IP KVM can be helpful but if you have a lockup when you're shutting down your boat is sunk. If you don't, you may want to look into one of the above for the future if its a possible addon. From there, simply log in, reboot, and watch what happens. If it locks up at shutdown, kill the power and let the OS come back up. This is why out of band management is important.
I have a ready made batch file which calls the shutdown command with appropriate parameters. I also have a one-time scheduled task that is normally disabled. When required I set the schedule for that task to a couple of minutes in the future, enable it and log off.
The logging off part is the key, as every time I've had a server hang during shutdown it was because I did the shutdown while logged on. Using the task scheduler method I've so far (about 6 years) had 100% success.