mkcluster Command

Purpose

To create a single-site cluster.

Syntax

mkcluster -r reposdev [ -S sitename { [ cle_uuid=<UUID>,cle_globid=<id>,cle_prio=<prio> ] } ] [ -m node { [ cle_ip=<addr>,cle_uuid=<UUID>,cle_globid=<id> ] }] [,...] [-d shareddisk [,...] ] [ -n clustername ] [-s multi_cast_addr ] [-c capability [,...] ] [-v]

Description

The mkcluster command creates a cluster. A cluster is a collection of nodes and disks.

Each node that is added to the cluster must have common storage area network (SAN) storage devices that are zoned appropriately. The SAN storage devices are used for the cluster repository disk and for any clustered shared disks.

A multicast address is used for cluster communications between the nodes in the cluster. If any network considerations need to be reviewed before creating a cluster, consult your cluster systems administrator.

Flags

Item Description
-c capability [,...] Specifies a comma-separated list of capabilities that the cluster requires upon creation. If no capabilities are specified, the mkcluster command allows for the possibility that some nodes have older AIX® software that is not capable of supporting newer CAA capabilities. In that case, the cluster is created in such a way that it is compatible with nodes that run older AIX software. Once the cluster is created, and it is determined that all nodes are capable of supporting newer CAA capabilities, the cluster automatically allows those capabilities to be used. The –c flag merely allows the specified capabilities to be used without first determining that all nodes are able to support it. In some situations, it is necessary for newer CAA capabilities to be enabled immediately. For example, if one or more nodes do not have IPv4 connectivity to all of the other cluster nodes, then it is necessary to specify that IPv6 capability must be enabled during cluster creation, in order to allow those nodes that have only IPv6 connectivity to join the cluster. All nodes must be online and able to join the cluster in order to determine that the cluster can support newer capabilities. If a cluster must be created while one or more of the nodes are powered off, then specifying that the capability is needed during cluster creation allows the capability to be used before all of the nodes are able to join the cluster. However, you must make sure that all of the nodes have an AIX software level that is capable of supporting that capability. Otherwise, any nodes that have older AIX software that cannot support the capability are not allowed to join the cluster.
The –c flag supports the following capability key words:
  • ipv6: IPv6 connectivity is required because some nodes do not have IPv4 connectivity to the rest of the cluster, or IPv6 functionality is needed before all nodes are able to join the cluster.
  • site: The cluster needs to allow one or more sites to be defined before all nodes are able to join the cluster.
-r reposdev Specifies the name of the SAN shared storage device that is used as the central repository for the cluster configuration data, such as hdisk10. This device must be accessible from all gateway nodes in the site. It is required that this device is a minimum of 1 GB in size, and is backed up by a redundant and highly available SAN configuration.
-S sitename Specifies the name of the local site. If not specified, a default site with the name LOCAL is created. Currently, a cluster can support only two sites. To create a second site, use the chcluster command.
The following site information can be specified:
  • cle_uuid: The site UUID, which is honored as long as it is unique across the cluster. If not specified, the site UUID is automatically generated.
  • cle_globid: The short id of site, which must be a unique unsigned number greater than zero. If not specified, the site short ID is automatically generated.
The following site attribute can be specified:
  • cle_prio: The priority of a site. A lower value indicates a higher priority.

The priority is used in the context of synchronizing the repository metadata.

If two sites split and the repository data becomes out of sync, then the data from the site with higher priority must be copied over to the site with lower priority.

-m node[,...] Lists the comma-separated host names or IP addresses for nodes that are members of the cluster. The local host must be included in the list. If the -m option is not used, the local host is implied, causing a one-node local cluster to be created.
The following node information can be specified:
  • cle_uuid: The node UUID, which is honored as long as it is unique across the cluster. If not specified, the node UUID is automatically generated.
  • cle_globid: The short id of node, which must be a unique unsigned number greater than zero. If not specified, the node short ID is automatically generated.
The following node attributes may be specified:
  • cle_ip: The nodes gateway address (in case the cluster spans across multiple sites). Typically this address would be an address through which this node can be reached from an external node. This can be specified in either IP version 4 or version 6 format.
-d shareddisk[,...] Specifies a comma-separated list of SAN shared storage devices, such as hdisk12, hdisk34, to be incorporated into the cluster configuration. Specified devices must not be open when the mkcluster command is run.
-n clustername Sets the name of the cluster being created. If no name is specified when you run the mkcluster command, a default of CL_hostname is used, where hostname is the name of the local host. You can retrieve the name of the local host by running the gethostname() function.
-s multi_cast_addr Sets the multicast address of the cluster that is created. This address is used for internal communication within the cluster. Only a multicast address in IPv4 format is accepted. If an IPv6 multicast address is needed, it must be generated from the IPv4 address. If the -s option is not specified when you first run the mkcluster command, the necessary multicast addresses are automatically generated.
-v Specifies the verbose mode.

Examples

  1. To create a cluster of one node and use the default values, enter:
    mkcluster –r hdisk1
    The output is a cluster that is named CL_myhostname with a single node in the cluster. The multicast address is automatically generated and no shared disks are created for this cluster. The repository device is set up on hdisk1, and this disk cannot be used by the node for any other purpose. The repository device is dedicated as the cluster repository disk.
  2. To create a multinode cluster, enter:
    mkcluster –n mycluster –m nodeA,nodeB,nodeC –r hdisk1 –d hdisk10,hdisk11,hdisk12
    The output is a cluster of three nodes and uses the default values. The output also creates a cluster with the specified name and the multicast address is automatically created. Three disks are created as shared clustered disks for this cluster. The repository device is set up on hdisk1, and it cannot be used by any of the nodes for any other purpose. The repository device is now dedicated to being the cluster repository disk. A volume group of cvg is created for the cluster repository disk and these logical volumes are used exclusively by the clustering subsystem.
  3. To create a cluster that is capable of IPv6 and sites, enter:
    mkcluster -n mycluster -m nodeA,nodeB,nodeC -r hdisk1 -c ipv6,site
    This command creates a cluster of three nodes that are immediately capable of using IPv6 networks and having sites defined. The cluster is named mycluster, and the local site and multicast address are automatically created with default values. If any IPv6 networks are configured, they can be used for cluster communication. The repository device is set up on hdisk1, and it cannot be used by any of the nodes for any other purpose. The repository device is now dedicated to being a cluster repository disk.
  4. To create a cluster with one site namedmysite , enter:
    mkcluster -n mycluster -S mysite -m nodeA,nodeB,nodeC -r hdisk1  -d hdisk10,hdisk11,hdisk12
    The output is a single-site cluster of three nodes that uses the default attribute values for all sites and all nodes. The cluster is named mycluster, and the local site is named mysite. The multicast address is automatically created. Three disks are created as shared clustered disks for the local site. The repository device is set up on hdisk1, and it cannot be used by any of the nodes for any other purpose. The repository device is now dedicated to being a cluster repository disk.
  5. To create a cluster with one site named mysite, specifying site and node information, enter:
    mkcluster -n mycluster -S mysite{cle_uuid=0551c722-92fe-11e1-97b0-1aae1ed14715,
    cle_globid=5,cle_prio=2} 
    -m nodeA,nodeB,nodeC{cle_uuid=e4ad47bc-92fd-11e1-8486-1aae1ed14715} 
    -r hdisk1 -d hdisk10,hdisk11,hdisk12
    The output is a single-site cluster of three nodes. Nodes nodeA and nodeB has automatically generated UUIDs, while nodeC has a UUID of e4ad47bc-92fd-11e1-8486-1aae1ed14715. The cluster is named mycluster, and the local site is named mysite and has a UUID of 0551c722-92fe-11e1-97b0-1aae1ed14715, a short ID of 5, and a priority of 2. The multicast address is automatically created. Three disks are created as shared clustered disks for the local site. The repository device is set up on hdisk1, and it cannot be used by any of the nodes for any other purpose. The repository device is now dedicated to being a cluster repository disk.