swapnode
Use the swapnode command to performance maintenance actions on a node or to facilitate nondisruptive node replacement during hardware upgrade. This command maintains availability without interrupting on its virtualized target ports.
Syntax
Parameters
- -service | -failover | -failback | -replace
- (Required) Specifies the type of service action is being performed on a selected node. The
values are:
- -service: puts an active online node into service state after the system triggers a failover of N_Port ID Virtualization (NPIV) ports to the partner node in the I/O group. This command can succeed whether or not spare protection is available.
- -failover: fails over a clustered node to a standby spare, even if the clustered node is online. The specified node moves into service and the standby spare becomes an online_spare. The command can succeed with or without the optional -spare parameter. When used with the -spare parameter, it defines the standby spare to be used; otherwise, the best fit standby spare node is chosen.
- -failback: fails back an online_spare to a standby spare, and the node it protects exits the service mode and returns to the cluster. You must specify the node object ID or name of the online_spare for this command.
- -replace: replaces a specified node that is logically offline or in a service state with a candidate node whose WWNN is changed to match the specified node. This command is used for node replacement during hardware upgrade or when physically powered off and disconnected from the system.
- -force
- (Optional) Specifies that a node be removed, even if disruption to host system I/O might
occur as a result. Important: Specifying -force might result in a loss of access. Use it only under the direction of your product support information.
- -spare node_id | node_name
- (Optional) Specifies the ID or name of the standby spare to be brought online as a temporary
stand-in. This parameter can be used only with -failover parameter. Note: The value for the ID must be greater than
1because the spare is never the first node in the clustered system. - node_id | node_name
- (Required) Specifies the node ID or name that is being swapped or serviced.
Description
This command is used to perform maintenance actions on a node or to facilitate nondisruptive node replacement during hardware upgrade. This command maintains availability without interrupting on its virtualized target ports.
Specify -replace for the system to replace the name, I/O group, and site values associated with adding a node (by using the addnode command). These values are taken from the node that is being replaced. The existing node is explicitly specified, and a candidate node with the same WWNN value is chosen.
An invocation example
- Use the lsnode command to list all the nodes in the system. In the following
example of lsnode output, the node "node2" with ID 2 is in online
state.
lsnodeThe resulting output:
id name UPS_serial_number WWNN status IO_group_id IO_group_name config_node UPS_unique_id hardware iscsi_name iscsi_alias panel_name enclosure_id canister_id enclosure_serial_number site_id site_name 1 node1 500507680C000128 online 0 io_grp0 yes SV1 iqn.1986-03.com.ibm:2145.mcr-cay-cluster-23.node1 G71H00P 1 2 node2 500507680C000130 online 0 io_grp0 no SV1 iqn.1986-03.com.ibm:2145.mcr-cay-cluster-23.node2 G71H00M 1 3 spare1 500507680C000138 online_spare 1 io_grp1 no SV1 iqn.1986-03.com.ibm:2145.mcr-cay-cluster-23.node3 G71H00X 1 - Issue the swapnode -service command with the ID or name of the node. The
following example changes the node with ID 2 to the service
mode.
swapnode -service 2The detailed resulting output:
No feedback - Use lsnode command to verify that the node is in the service state. The
following example shows the node "node 2" with ID 2 is in service
state.
lsnodeThe resulting output:
id name UPS_serial_number WWNN status IO_group_id IO_group_name config_node UPS_unique_id hardware iscsi_name iscsi_alias panel_name enclosure_id canister_id enclosure_serial_number site_id site_name 1 node1 500507680C000128 online 0 io_grp0 yes SV1 iqn.1986-03.com.ibm:2145.mcr-cay-cluster-23.node1 G71H00P 1 2 node2 500507680C000130 service 0 io_grp0 no SV1 iqn.1986-03.com.ibm:2145.mcr-cay-cluster-23.node2 G71H00M 1 3 spare1 500507680C000138 online_spare 1 io_grp1 no SV1 iqn.1986-03.com.ibm:2145.mcr-cay-cluster-23.node3 G71H00X 1
An invocation example
- Use the lsnode command to list all the nodes in the system. In the following
example of lsnode output, the "node2" with ID 12 is in online state and the
"spare1" with ID14 is in spare state.
lsnodeThe resulting output:
id name UPS_serial_number WWNN status IO_group_id IO_group_name config_node UPS_unique_id hardware iscsi_name iscsi_alias panel_name enclosure_id canister_id enclosure_serial_number site_id site_name 1 node1 500507680C000128 online 0 io_grp0 yes SV1 iqn.1986-03.com.ibm:2145.mcr-cay-cluster-23.node1 G71H00P 1 12 node2 500507680C000130 online 0 io_grp0 no SV1 iqn.1986-03.com.ibm:2145.mcr-cay-cluster-23.node2 G71H00M 1 14 spare1 500507680C000138 spare 1 io_grp1 no SV1 iqn.1986-03.com.ibm:2145.mcr-cay-cluster-23.node3 G71H00X 1 - Issue the swapnode -failover command with the ID or name of the spare node
and the cluster node. The following example fails over the node with ID 12 to the spare node with ID
14.
swapnode -failover -spare 14 12The detailed resulting output:
No feedback - Use lsnode command to verify that the cluster node is in the service state
and the spare node is in online_spare state. The following example shows the "node2" with ID 12 is
in online state and the "spare1" with ID15 is in spare state. Note: Online_spare node ID is incremented to next available node_id.
lsnodeThe resulting output:
id name UPS_serial_number WWNN status IO_group_id IO_group_name config_node UPS_unique_id hardware iscsi_name iscsi_alias panel_name enclosure_id canister_id enclosure_serial_number site_id site_name 1 node1 500507680C000128 online 0 io_grp0 yes SV1 iqn.1986-03.com.ibm:2145.mcr-cay-cluster-23.node1 G71H00P 1 12 node2 500507680C000130 service 0 io_grp0 no SV1 iqn.1986-03.com.ibm:2145.mcr-cay-cluster-23.node2 G71H00M 1 15 spare1 500507680C000138 online_spare 1 io_grp1 no SV1 iqn.1986-03.com.ibm:2145.mcr-cay-cluster-23.node3 G71H00X 1
An invocation example
- Use the lsnode command to list all the nodes in the system. In the following
example of lsnode output, the "node2" with ID 12 is in service state and the
"spare1" with ID15 is in online_spare state.
lsnodeThe resulting output:
id name UPS_serial_number WWNN status IO_group_id IO_group_name config_node UPS_unique_id hardware iscsi_name iscsi_alias panel_name enclosure_id canister_id enclosure_serial_number site_id site_name 1 node1 500507680C000128 online 0 io_grp0 yes SV1 iqn.1986-03.com.ibm:2145.mcr-cay-cluster-23.node1 G71H00P 1 12 node2 500507680C000130 service 0 io_grp0 no SV1 iqn.1986-03.com.ibm:2145.mcr-cay-cluster-23.node2 G71H00M 1 15 spare1 500507680C000138 online_spare 1 io_grp1 no SV1 iqn.1986-03.com.ibm:2145.mcr-cay-cluster-23.node3 G71H00X 1 - Issue the swapnode -failback command with the ID or name of the spare node.
The following example fails back a spare node with ID 15 to the cluster node with ID
12.
swapnode -failback 15The detailed resulting output:
No feedback - Use lsnode command to verify that the cluster node is in the online state and
the spare node is in spare state. The following example shows the "node2" with ID 12 is in online
state and the "spare1" with ID15 is in spare state.Note: Online_spare node ID is incremented to next available node_id.
lsnodeThe resulting output:
id name UPS_serial_number WWNN status IO_group_id IO_group_name config_node UPS_unique_id hardware iscsi_name iscsi_alias panel_name enclosure_id canister_id enclosure_serial_number site_id site_name 1 node1 500507680C000128 online 0 io_grp0 yes SV1 iqn.1986-03.com.ibm:2145.mcr-cay-cluster-23.node1 G71H00P 1 12 node2 500507680C000130 online 0 io_grp0 no SV1 iqn.1986-03.com.ibm:2145.mcr-cay-cluster-23.node2 G71H00M 1 15 spare1 500507680C000138 spare 1 io_grp1 no SV1 iqn.1986-03.com.ibm:2145.mcr-cay-cluster-23.node3 G71H00X 1
An invocation example to replace an offline or service node with candidate node
swapnode -replace 2
The detailed resulting output:
No feedback
