swapnodes - swap the location info in the db (all the attributes in the ppc table and the nodepos table) between 2 nodes. If swapping within a cec, it will assign the IO adapters that were assigned to the defective node to the available node.
swapnodes [-h| --help]
swapnodes -c current_node -f fip_node [-o]
This command is only for Power 775 using Direct FSP Management, and used in Power 775 Availability Plus.
The swapnodes command will keep the current_node name in the xCAT table, and use the fip_node's hardware resource. Besides that, the IO adapters will be assigned to the new hardware resource if they are in the same CEC. So the swapnodes command will do 2 things:
1. Swap the location info in the db between 2 nodes:
All the ppc table attributes (including hcp, id, parent, supernode and so on). All the nodepos table attributes(including rack, u, chassis, slot, room and so on).
2. Assign the I/O adapters from the defective node(the original current_node) to the available node(the original fip_node) if the nodes are in the same cec.
The swapnodes command shouldn't make the decision of which 2 nodes are swapped. It will just received the 2 node names as cmd line parameters.
After running swapnodes command, the order of the I/O devices may be changed after IO re-assignment, so the administrator needs to run rbootseq to set the boot string for the current_node. And then boot the node with the same image and same postscripts because they have the same attributes.
Without -o option, it's used to swap the location info in the db between 2 nodes. With -o option, it's used to move the current_node definition to fip_node (the 2nd octant), not move the fip_node definition to the 1st octant. If the two nodes are in a cec, it will assign the IO adapters that were assigned to the defective node to the available node. Originally, the current_node is a defective non-compute node, and fip_node is a available compute node. After the swapping, the current_node will be a available node.
Display usage message.
current_node -- the defective non-compute node.
fip_node -- a compute node which will be swapped as the non-compute node.
one way. Only move the current_node definition to the fip_node's hardware resource, and not move the fip_node definition to the current_node. And then the current_node will use the fip_node's hardware resource, and the fip_node definition is not changed. if the two nodes are in the same CEC, the I/O adapter from the original current_node will be assigned to the fip_node.
0 The command completed successfully.
1 An error has occurred.
swapnodes -c sn1 -f compute2
swapnodes -c sn1 -f compute2
swapnodes -c sn1 -f compute2 -o
$XCATROOT/bin/swapnodes
(The XCATROOT environment variable is set when xCAT is installed. The default value is "/opt/xcat".)
This command is part of the xCAT software product.