subscribe iconSubscribe to this information
POWER7 information

cluster command

Purpose

Creates a cluster that uses the Virtual I/O Server (VIOS) partitions and performs cluster-related operations.

Syntax

To create a cluster:

cluster -create -clustername ClusterName -repopvs PhysicalVolume ... -spname StoragePool -sppvs PhysicalVolume ... -hostname HostName

cluster -create -clustername ClusterName -repopvs PhysicalVolume ... -spname StoragePool -file -sppvs FileName -hostname HostName

To add a VIOS partition node to the cluster:

cluster -addnode -clustername ClusterName -hostname HostName

To remove a VIOS partition node from the cluster:

cluster -rmnode [-f]-clustername ClusterName {-hostname HostName | -uuid HostUuid}

To remove a cluster from the system:

cluster -delete -clustername ClusterName

To display the health status of a cluster:

cluster -status -clustername ClusterName [-field FieldName... ] [-fmt Delimiter] [-verbose ]

To synchronize the cluster and Object Data Manager (ODM):

cluster -sync -clustername ClusterName

To list all clusters:

cluster -list [-field Fieldname ... ] [-fmt Delimiter ]

Note: For setting up a VIOS logical partition as a member of a cluster, IPv6 stateless autoconfiguration is suggested.

Description

The cluster command is used to create and delete the cluster.

The status subcommand displays a global cluster health status and the status for each node in the cluster. The cluster status can be OK, DEGRADED, or DOWN. If the cluster status is OK, all the nodes of the cluster are working. If the cluster health status is DEGRADED, some nodes are working and some nodes are shut down. If the cluster health status is DOWN, all the nodes are shut down. The node status is either OK or DOWN. A node is in OK state if it is up and running, and a node is in DOWN state if it is not up. A pool status is provided for each node that is not DOWN. The pool status is OK for a node if the node can service the shared storage pool (SSP) virtualized storage to the client logical partitions (LPARs). The pool status is DOWN if it is not usable from the node.

If the -verbose option is requested, additional status details such as the number of nodes in each state is provided. For each node that is not DOWN, it displays the node roles and the storage pool status from the point of view of the node.

If the -fmt option is requested, status output is displayed in a format of delimiter-separated value report.

With the -field option, you can specify which fields to display. If no pool information is requested, the command does not retrieve pool status on each node, thereby accelerating the command response time.

Flags

Flag name Description
-addnode Adds a member node to the cluster.
-clustername Specifies the name of the cluster.
-create Creates a cluster.
-delete Deletes a cluster.
-f Forces the removal of the VIOS partitions from the cluster.
-field
Supports the following fields if the -list flag is specified:
cluster_name, cluster_id
Supports the following fields if the -status flag is specified:
cluster_name, cluster_state, node_name, node_mtm, node_partition_num, 
node_state, pool_state
Supports the following fields if the -status flag is specified with the -verbose option:
cluster_name, cluster_id, cluster_state, repos_mode, number_of_nodes, nodes_ok, 
nodes_down, pool_name, pool_id, pool_state, node_name, node_id, node_mtm,
node_partition_num, node_state, node_repos_state, node_upgrade_status, 
node_roles
-file Specifies that you must specify a file name with the -sppvs option. The file must contain physical volume names separated by a space.
-fmt Divides output by a user-specified delimiter.
-hostname Specifies the host name or IP address of the VIOS partition.
-list Lists all clusters which have membership of the current node.
-repopvs Lists physical volumes on which a repository can be created.
-rmnode Removes the member node from the cluster.
-spname Specifies the name of the storage pool.
-sppvs Lists the physical volumes on which a shared storage pool can be created. If you specify the -file option, this flag lists the file name with the list of physical volume names.
-status Displays the health status of the cluster.
-sync Synchronizes the cluster and the ODM.
-uuid Specifies the UUID of a node.
-verbose Displays additional detailed information.

Examples

  1. To create a cluster, type the command as follows:
    cluster -create -clustername newcluster -repopvs repo_hdisk 
    -spname viosng -sppvs sp_hdisk -hostname myhost1
    The system displays the output as follows:

    Cluster newcluster has been created successfully.

  2. To create a cluster by using the -file flag, type the command as follows:
    cluster -create -clustername newcluster -repopvs repo_hdisk -spname sp -file -sppvs pvlist.txt 
    -hostname myhost1
    The system displays the output as follows:
    Cluster newcluster has been created successfully.
  3. To delete a cluster from the system, type the command as follows:
    cluster -delete -clustername newcluster
    The system displays the output as follows:

    Cluster newcluster has been removed successfully.

  4. To remove a member node from a cluster, type the command as follows:
    cluster -rmnode -clustername newcluster -hostname myhost2
    The system displays the output as follows:

    myhost2 has been removed from the newcluster cluster.

  5. To add a member node in a cluster, type the command as follows:
    cluster -addnode -clustername newcluster -hostname myhost2
    The system displays the output as follows:

    myhost2 has been added to the newcluster cluster.

  6. To display the health status summary, type the command as follows:
    cluster -status -clustername mycluster1
    The system displays the output as follows:
    Cluster Name         State
    mycluster1           OK
    
    Node Name    Pool State    MTM                  Partition #     State
    node1        OK            9115-505031006A2A    1               OK
    node2        DOWN          9115-5050310069FA    1               OK
    Note: The term node is the standard term that is used in the command instead of the term partition.
  7. To display a detailed health status report, type the command as follows:
    cluster -status -verbose -clustername mycluster2
    The system displays the output as follows:
    Cluster Name:             	mycluster2
    Cluster Id:              		d23624fe335f11e0bd510011257e1447
    Cluster State:           		OK
    Repository Mode:          	ASSERT
    Number of Nodes:          	2
    Nodes OK:                 	2
    Nodes DOWN:               	0
    
        Pool Name:            	pool1
        Pool Id:              	b118d73c42b322d0a5850011257e1447
    
        Node Name:            	node1
        Node Id:              	da18d52a32b211e0a5850011257e1447
        Node MTM:             	9115-505031006A2A
        Node Partition Num:    	4
        Node State:           	OK
        Node Repos State:      	OK
        Node Upgrade Status:		ON_LEVEL
        Node Roles:           	DBN
            Pool Name:        	pool1
            Pool Id:          	b118d73c42b322d0a5850011257e1447
            Pool State:       	OK
    
        Node Name:            	node2
        Node Id:              	4d5012722f9f11e0813c0011257e1447
        Node MTM:             	9115-5050310069FA
        Node Partition Num:   	9
        Node State:           	OK
        Node Repos State:     	OK
        Node Upgrade Status:		ON_LEVEL
        Node Roles:
            Pool Name:        	pool1
            Pool Id:          	b118d73c42b322d0a5850011257e1447
            Pool State:       	OK
  8. To display a formatted health status report, type the command as follows:
    cluster -status -fmt ',' -clustername mycluster2
    The system displays the output as follows:
    mycluster2,OK,myhost1,8233-E8B02061AAFP,55,OK,OK
    mycluster2,OK,myhost2,8233-E8B02061AAFP,11,OK,OK
  9. To display a formatted and detailed health status report, type the command as follows:
    cluster -status -fmt ',' -clustername mycluster2 -verbose
    The system displays the output as follows:
    mycluster2,d23624fe335f11e0bd510011257e1447,OK,ASSERT,2,2,0,node1,da18d52a32b211e0a5850011257e1447,
    9115-505031006A2A,4,OK,OK,ON_LEVEL,DBN,pool1, b118d73c42b322d0a5850011257e1447,OK
  10. To display a formatted health status report with some specific fields, type the command as follows:
    cluster -status -fmt ':' -field cluster_name node_name pool_label pool_state 
    -clustername mycluster -verbose
    The system displays the output as follows:
    mycluster:myhost1:test_pool:OK
    mycluster:myhost2:test_pool:OK
  11. To display a specific health status report with specific fields, type the command as follows:
    cluster -status -field node_name node_state cluster_name cluster_state -clustername mycluster2
    The system displays the output as follows:
    Node Name:               myhost1
    Node State:              OK
    Cluster Name:            mycluster2
    Cluster State:           OK
    Node Name:               myhost2
    Node State:              OK
    Cluster Name:            mycluster2
    Cluster State:           OK
  12. To display all clusters that have membership in the current node, type the command as follows:
    cluster -list
    The system displays the output as follows:
    CLUSTER_NAME:            mycluster
    CLUSTER_ID:              a64c8c725bfc11e1993500215e188da0
  13. To display all clusters that have membership in the current node by using the -fmt flag, type the command as follows:
    cluster -list -fmt ,
    The system displays the output as follows:
    mycluster,a64c8c725bfc11e1993500215e188da0


Send feedback Rate this page

Last updated: Wed, June 03, 2015