To shut down the SP system, log in to the control workstation. With authorization for the frames to be shut down and the suitable credentials for remote commands and SP trusted services, use the cshutdown command.
Note for high nodes and SP-attached servers |
---|
High nodes and SP-attached servers take a considerably longer time to power off than thin and wide nodes, depending on the number of processors in the node and the number of adapters. A fully configured POWER3 SMP high node can take even longer. After you have experienced the amount of time your nodes take, you can better estimate the amount of time to specify with the -W flag for the cshutdown command. There might be times when you need to control the shutdown of these nodes manually, rather than with the cshutdown command. When you do, be very careful of the sequencing that is otherwise automatically handled. For a POWER3 SMP high node with SP Expansion I/O Units in particular, the following additional considerations apply:
|
The SP cshutdown command is similar to the workstation shutdown command, except it has these advantages over using shutdown to shut down each node of an SP:
Using one cshutdown command on the control workstation, you can shut down all or selected nodes.
You can use the /etc/cshutSeq file to control the order in which nodes are shut down, or you can let the system determine the order based on System Data Repository information about servers and clients.
The /etc/subsysSeq file lists these special subsystems and describes any sequencing relationships between them.
You can shutdown nodes with a single cshutdown command as shown in
Table 4.
Table 4. Specifying nodes to shut down with cshutdown.
Command | Meaning |
---|---|
cshutdown ALL | Shuts down all nodes in the current system partition. |
cshutdown target_nodes | Shuts down specific nodes in the current system partition. All nodes listed must be in the current system partition or the command will fail. |
cshutdown -G ALL | Shuts down all nodes in the physical SP system. |
cshutdown -G target_nodes | Shuts down specific nodes in the physical SP system, regardless of system partitioning. |
The complete syntax of the cshutdown command is described in the PSSP: Command and Technical Reference. Understanding how shutdown processing works might help you understand some of the cshutdown command's options. See The phases of shutdown processing.
You can halt all nodes in the current system partition with one command, using:
cshutdown ALL
The -h (halt) flag is the default; you don't need to use it when you invoke cshutdown. The nodes are shut down in the sequence specified by the /etc/cshutSeq file. If this file doesn't exist, the nodes are shut down in a default sequence based on the SDR. If the /etc/subsysSeq the exists, those subsystem interfaces are invoked during shutdown.
Halting selected nodes is similar. To halt nodes cs3, cs5, and cs7 in the current system partition, use the command:
cshutdown cs3 cs5 cs7
The command checks for dependencies before shutting down the nodes. If the /etc/cshutSeq file exists, those rules apply; otherwise, cshutdown applies default sequencing rules based on the SDR. If the /etc/subsysSeq file exists, those subsystem interfaces are notified of the shutdown of the target nodes.
The subsystem shutdown phase tells special subsystems to terminate their own operations on the target nodes before the node phase shuts down the target nodes. Groups for which the /etc/subsysSeq file does not define a sequencing relationship are invoked concurrently. Subsystems not listed in the /etc/subsysSeq file are not notified of the pending system shutdown.
Reboot all nodes in the current system partition by using the cshutdown command with the -r (reboot) flag:
cshutdown -r ALL
The target nodes are halted according to the sequencing rules in /etc/cshutSeq, and restarted according to the rules in /etc/cstartSeq. If these files don't exist, the default sequencing rules are determined at shutdown and startup.
You can control how the system starts during reboot by passing flags to the cstartup processor using the cshutdown command's -C flag. For example, to pass the -E flag to tell the cstartup processor to ignore the sequence file when rebooting current system partition nodes numbered 4 and 5, use the command:
cshutdown -r -C "-E" -N 4-5
To pass multiple startup flags, you must escape any space characters in the string. The double quotes in this example ("-E") do that, although they are not strictly required with a single flag.
If you bring a node down to maintenance mode, you must ensure file system integrity before you reboot the node.
The cshutdown command, which runs from the control workstation, will be unable to rsh to the node to perform the node shutdown phase processing which includes synchronizing the file systems. IBM suggests that you issue the sync command three times in succession from the node console before running cshutdown. This is especially important if any files were created while the node was in maintenance mode.
To determine which nodes are in maintenance mode, run the spmon -d command and look for the combination of nodePower on and hostResponds no.
You probably want to warn your users if nodes are going down, so they can save and stop any work in progress. You can also have a customized shutdown clean script to gracefully terminate nonroot user processes. You can create a shell script, on each node where you want it to run, named /etc/cshut.clean. Make it an executable that performs the function you want to be processed before the cshutdown command terminates nonroot processes.
By default, when you issue a cshutdown command, a message is sent to all users who are logged in to the affected nodes, telling them how long they have before shutdown. You can customize the message as well as the time when the system shuts down.
To power off the entire SP system at 9 pm, for instance, issue the following command:
cshutdown -T 21:00 -M "All nodes will power off at 9 pm." -G ALL
To power off all nodes in the current system partition at 9 pm, issue the following command:
cshutdown -T 21:00 -M "All nodes will power off at 9 pm." ALL
Suppose you need to do an emergency reboot of the pair of nodes named cs1 and cs2 in the current system partition, but want to allow 10 minutes for jobs to complete. You can notify your users and schedule the reboot with this command:
cshutdown -r -T 10 -M \ "Reboot on cs1&2 in 10 minutes--don't submit new jobs." cs1 cs2
Several processing phases are involved in the cshutdown command.
The cshutdown command process has these phases:
The message specified with the -M option of the command is sent to all users who are logged in to the target nodes. If a customized shutdown clean script exists on a node (file /etc/cshut.clean), it is run. Then user processes that were not started by root and are running on the target nodes are sent a SIGTERM followed, 30 seconds later, by a SIGKILL. The 30 second delay gives user processes that handle SIGTERM a chance to do whatever cleanup is necessary.
The subsystem shutdown phase tells special subsystems to terminate their own operations on the target nodes before the node phase shuts down the target nodes. Groups for which /etc/subsysSeq doesn't define a sequencing relationship are invoked concurrently. Subsystems not listed in /etc/subsysSeq are not notified of the pending system shutdown.
If cshutdown is issued without the -Y flag and a nonzero (failure) code is returned, you receive a prompt allowing you to continue, to quit, or to start a subshell so that you can check /var/adm/SPlogs/cs/cshut.MMDDhhmmss.pid for messages and refer to the documentation for the subsystem. When you leave the subshell, you are prompted with the same choices.
The subsystem phase of shutdown waits for all subsystems to return before continuing with the node phase. If a subsystem does not return, the cshutdown command waits indefinitely. Use the -W flag to specify a time-out value.
The node phase operates on nodes specified with the cshutdown command. The /etc/cshutSeq file controls the sequencing of the node phase operation.
Node shutdown has potentially two levels of coordinated concurrent operations:
They are coordinated such that you can specify that one group must wait for the completion of some other specific groups before starting to shut down.
In a halt operation, the node phase applies the standard workstation shutdown on the target nodes. The nodes are halted in the sequence specified in the /etc/cshutSeq file, if it exists, or in the default sequence. Nodes not listed in the /etc/cshutSeq file might be halted concurrently with any other nodes.
If you request a system reboot with the -r flag, the node phase halts the nodes in the sequence specified in /etc/cshutSeq and then restarts the nodes consistent with the initialization sequence specified in /etc/cstartSeq. If these files do not exist, the default sequence is used. It does not power on any nodes that were powered off when the cshutdown command was issued. If you use the -r flag, the only nodes powered on during reboot are those powered off during shutdown.