Sun Cluster Software Installation Guide for Solaris OS

ProcedureHow to Create a Zone Cluster

Perform this procedure to create a cluster of non-global zones.

Before You Begin
  1. Become superuser on an active member node of a global cluster.

    You perform all steps of this procedure from a node of the global cluster.

  2. Ensure that the node of the global cluster is in cluster mode.

    If any node is in noncluster mode, changes that you make are propagated when the node returns to cluster mode. Therefore, you can create a zone cluster even if some global-cluster nodes are in noncluster mode. When those nodes return to cluster mode, the system performs zone-cluster creation tasks on those nodes.


    phys-schost# clnode status
    === Cluster Nodes ===
    
    --- Node Status ---
    
    Node Name                                       Status
    ---------                                       ------
    phys-schost-2                                   Online
    phys-schost-1                                   Online
  3. Create the zone cluster.


    Note –

    By default, sparse root zones are created. To create whole root zones, add the -b option to the create command.



    phys-schost-1# clzonecluster configure zoneclustername
    clzc:zoneclustername> create
    
    Set the zone path for the entire zone cluster
    clzc:zoneclustername> set zonepath=/zones/zoneclustername
    
    Add the first node and specify node-specific settings
    clzc:zoneclustername> add node
    clzc:zoneclustername:node> set physical-host=baseclusternode1
    clzc:zoneclustername:node> set hostname=hostname1
    clzc:zoneclustername:node> add net
    clzc:zoneclustername:node:net> set address=public_netaddr
    clzc:zoneclustername:node:net> set physical=adapter
    clzc:zoneclustername:node:net> end
    clzc:zoneclustername:node> end
    
    Set the root password globally for all nodes in the zone cluster
    clzc:zoneclustername> add sysid
    clzc:zoneclustername:sysid> set root_password=encrypted_password
    clzc:zoneclustername:sysid> end
    
    Save the configuration and exit the utility
    clzc:zoneclustername> commit
    clzc:zoneclustername> exit
    
  4. (Optional) Add one or more additional nodes to the zone cluster,


    phys-schost-1# clzonecluster configure zoneclustername
    clzc:zoneclustername> add node
    clzc:zoneclustername:node> set physical-host=baseclusternode2
    clzc:zoneclustername:node> set hostname=hostname2
    clzc:zoneclustername:node> add net
    clzc:zoneclustername:node:net> set address=public_netaddr
    clzc:zoneclustername:node:net> set physical=adapter
    clzc:zoneclustername:node:net> end
    clzc:zoneclustername:node> end
    clzc:zoneclustername> exit
    
  5. Verify the zone cluster configuration.

    The verify subcommand checks for the availability of the specified resources. If the clzonecluster verify command succeeds, there is no output.


    phys-schost-1# clzonecluster verify zoneclustername
    phys-schost-1# clzonecluster status zoneclustername
    === Zone Clusters ===
    
    --- Zone Cluster Status ---
    
    Name      Node Name   Zone HostName   Status    Zone Status
    ----      ---------   -------------   ------    -----------
    zone      basenode1    zone-1        Offline   Running
              basenode2    zone-2        Offline   Running
  6. Install and boot the cluster.


    phys-schost-1# clzonecluster install zoneclustername
    Waiting for zone install commands to complete on all the nodes 
    of the zone cluster "zoneclustername"...
    
    Installation of the zone cluster might take several minutes
    phys-schost-1# clzonecluster boot zoneclustername
    Waiting for zone boot commands to complete on all the nodes of 
    the zone cluster "zoneclustername"...

Example 6–2 Configuration File to Create a Zone Cluster

The following example shows the contents of a command file that can be used with the clzonecluster utility to create a zone cluster. The file contains the series of clzonecluster commands that you would input manually.

In the following configuration, the zone cluster sczone is created on the global-cluster node phys-schost-1. The zone cluster uses /zones/sczone as the zone path. The first node of the zone cluster is assigned the hostname zc-host-1 and uses the public-network address 172.16.0.1 and the bge0 adapter. The second node of the zone cluster is created on the global-cluster node phys-schost-2. This second zone-cluster node is assigned the hostname zc-host-2 and uses the public-network address 172.16.0.2 and the bge1 adapter.

create
set zonepath=/zones/sczone
add node
set physical-host=phys-schost-1
set hostname=zc-host-1
add net
set address=172.16.0.1
set physical=bge0
end
end
add sysid
set root_password=encrypted_password
end
add node
set physical-host=phys-schost-2
set hostname=zc-host-2
add net
set address=172.16.0.2
set physical=bge1
end
end
commit
exit


Example 6–3 Creating a Zone Cluster by Using a Configuration File.

The following example shows the commands to create the new zone cluster sczone on the global-cluster node phys-schost-1 by using the configuration file sczone-config. The hostnames of the zone-cluster nodes are zc-host-1 and zc-host-2.


phys-schost-1# clzonecluster configure -f sczone-config sczone
phys-schost-1# clzonecluster verify sczone
phys-schost-1# clzonecluster install sczone
Waiting for zone install commands to complete on all the nodes of the 
zone cluster "sczone"...
phys-schost-1# clzonecluster boot sczone
Waiting for zone boot commands to complete on all the nodes of the 
zone cluster "sczone"...
phys-schost-1# clzonecluster status sczone
=== Zone Clusters ===

--- Zone Cluster Status ---

Name      Node Name        Zone HostName    Status    Zone Status
----      ---------        -------------    ------    -----------
sczone    phys-schost-1    zc-host-1        Offline   Running
          phys-schost-2    zc-host-2        Offline   Running

Next Steps

To add the use of a file system to the zone cluster, go to Adding File Systems to a Zone Cluster.

To add the use of global storage devices to the zone cluster, go to Adding Storage Devices to a Zone Cluster.