Creating a new high availability configuration by using the CLI

It is recommended that policy-based high availability (HA) is configured and managed by using the GUI. Configuration can also be performed by using the REST API or the CLI.

Prerequisite to configure your systems to support the High Availability solution:
  • If not already configured, follow the link to set up a partnership: Partnerships.
  • If not already configured, follow the link to set up a linked storage pool: Pool linking.
  • If not already configured, follow the link to set up a partnership IP quorum application: IP quorum application.
Follow the steps to create a new policy-based high availability (HA) configuration by using command-line interface:
  1. To create a replication policy with the 2-site-ha topology, enter the following command.
    mkreplicationpolicy -topology 2-site-ha -location1system <name or ID of one system> -location1iogrp 0 -location2system <name or ID of other system> -location2iogrp 0
    if necessary, use lspartnership to get the name or ID of each system. For more information, see mkreplicationpolicy.
  2. To create a Storage Partition and associate it with the replication policy, enter the following command.
    # Creating a single-site storage partition that is later configured for HA
    mkpartition -name my_partition
    ...
    chpartition -replicationpolicy <HA policy ID or name> my_partition
    
    # Creating an HA storage partition
    mkpartition -name ha_partition -replicationpolicy <HA policy ID or name>
    For more information, see mkpartition.
  3. To create a logical host object that is maintained across both systems by specifying that the host should be associated with the Storage Partition, enter the following command.
    mkhost -partition <storage partition ID or name>...
    For more information, see mkhost.
    Note: To prioritize a colocated system for I/O, specify a location for the host.
  4. To create a volume group that is maintained across both systems by specifying that the volume group should be associated with the Storage Partition, enter the following command.
    mkvolumegroup -partition <storage partition ID or name>...
    For more information, see mkvolumegroup.
  5. To create a volume in this volume group, enter the following command.
    mkvolume -volumegroup <volume group ID or name>...
    For more information, see mkvolume.
  6. To map the created volume to the created host, enter the following command.
    mkvdiskhostmap -host <host ID or name> <volume ID or name>...
    For more information, see mkvdiskhostmap.
  7. Hosts can now discover paths to volumes at both locations. Monitor and change the active and preferred management systems that use lspartition and chpartition. You can monitor and change the active and preferred management systems using the lspartition and chpartition commands.