Sun Cluster Data Service for Solaris Containers Guide

Installing and Configuring Zones

Installing and configuring Solaris Zones involves the following tasks:

  1. Enabling a zone to run in your chosen data service configuration, as explained in the following sections:

  2. Installing and configuring a zone, as explained in:

Perform this task for each zone that you are installing and configuring. This section explains only the special requirements for installing Solaris Zones for use with Sun Cluster HA for Solaris Containers. For complete information about installing and configuring Solaris Zones, see System Administration Guide: Solaris Containers-Resource Management and Solaris Zones.

ProcedureHow to Enable a Zone to Run in a Failover Configuration

Steps
  1. Register the SUNW.HAStoragePlus resource type.


    # scrgadm -a -t SUNW.HAStoragePlus
    
  2. Create a failover resource group.


    # scrgadm -a -g solaris-zone-resource-group
    
  3. Create a resource for the zone`s disk storage.


    # scrgadm -a -j solaris-zone-has-resource  \
    -g solaris-zone-resource-group   \
    -t SUNW.HAStoragePlus  \
    -x FilesystemMountPoints=solaris-zone-instance-mount-points
    
  4. (Optional) Create a resource for the zone`s logical hostname.


    # scrgadm -a -L -j solaris-zone-logical-hostname-resource-name  \
    -g solaris-zone-resource-group  \
    -l solaris-zone-logical-hostname
    
  5. Enable the failover resource group.


    # scswitch -Z -g  solaris-zone-resource-group
    

ProcedureHow to Enable a Zone to Run in a Multiple-Masters Configuration

Steps
  1. Create a scalable resource group.


    # scrgadm -a -g solaris-zone-resource-group \
    -y Maximum_primaries=max-number \
    -y Desired_primaries=desired-number
    
  2. Enable the scalable resource group.


    # scswitch -Z -g  solaris-zone-resource-group
    

ProcedureHow to Install and Configure a Zone


Note –

For complete information about installing a zone refer to System Administration Guide: Solaris Containers-Resource Management and Solaris Zones.


Before You Begin

Determine the following requirements for the deployment of the zone with Sun Cluster:

Steps
  1. Install the zone.


    Note –

    If the zone that you are installing is to become a failover zone, the zone's zone path must specify a highly available local file system. The file system must be managed by the SUNW.HAStoragePlus resource that you created in Step 3.


  2. Log in to the zone's console.


    # zlogin -C zone
    

    You are prompted to configure the zone.

  3. Follow the prompts to configure the zone.

    After you configure the zone has been created, an entry will exist in the /etc/zones/index file.

  4. Disconnect from the zone`s console.

    Use the escape sequence that you defined for the zone. If you did not define an escape sequence, use the default escape sequence as follows:


    # ~. 
    
  5. Determine the new zone's index entry by listing the contents of the /etc/zones/index.

    You need the new zone's index entry for How to Enable a Zone to Run in a Failover Configuration


    # cat /etc/zones/index
    
  6. Make the zone available to all nodes in the cluster.

    Perform the following steps on each cluster node.

    1. Log in to each cluster node.

    2. To prevent a loss of data, create a backup copy of the /etc/zones/index file.


      # cd /etc/zones 
      # cp index index_backup 
      
    3. Using a plain text editor, add the entry for the zone to the/etc/zones/index file on the node.

    4. Copy the zone.xml file to the /etc/zones/index directory on the node.


      # rcp  zone-install-node:/etc/zones/zonexml .