Adding high availability to an existing configuration by using the CLI

It is recommended that policy-based high availability (HA) is configured and managed by using the GUI. The GUI helps you create a new configuration or modify an existing configuration. You can also configure policy-based HA by using the REST API or the CLI.

Prerequisites to configure your systems to support the HA solution:
  • If not already configured, follow Partnerships to set up a partnership.
  • If not already configured, follow Pool links to set up a linked storage pool.
  • If not already configured, follow IP quorum application to set up an IP quorum application.
Follow these steps to add policy-based high availability to an existing configuration by using the CLI:
  1. Volumes must be in a volume group to add high availability. If necessary, to create a new volume group, enter the following command:
    mkvolumegroup
    For more information, see mkvolumegroup.
  2. If needed, use lsvolumegroup to see the ID of the volume group. For more information, see lsvolumegroup command.
  3. To add the volumes that you want to be HA to the volume group, enter the following command:
    chvdisk –volumegroup <volume group ID or name> <volume ID or name>
    For more information, see chvdisk.
  4. To create a draft partition, enter the following command:
    mkpartion –draft –name my_partition
    For more information, see mkpartition command.
    Note: lspartition shows draft=yes for a draft partition. A draft partition can be used to construct a storage partition, but has no effect until it is published.
  5. To add a volume group to the draft partition, enter the following command:
    chvolumegroup –draftpartition my_partition <volume group ID or name>
    For more information, see chvolumegroup. Adding the volume group to the draft partition automatically adds any dependent hosts and other volume groups to the draft partition. It does not automatically add volumes that are not in volume groups.
  6. The draft partition must be published to make it into a storage partition that is eligible for use in a high availability configuration. The draft partition can be published only when all the required volumes are in volume groups. To publish a draft partition, enter the following command:
    chpartition –publish my_partition
    For more information, see chpartition.
  7. If required, you can create another draft partition and repeat the process. Only one draft partition is allowed for each system.
  8. If required, partitions can be merged. To merge a second partition into the first partition, enter the following command:
    mergepartition –targetpartition <name or ID of other storage partition> my_partition
    For more information, see mergepartition.
  9. 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> -location2system <name or ID of other system> -location1iogrp 0 -location2iogrp 0
    If necessary, use lspartnership to get the name or ID of each system. For more information, see mkreplicationpolicy.
  10. To associate the published storage partition with the replication policy, enter the following command:
    chpartition –replicationpolicy <HA policy ID or name> my_partition
    Note: As long as the partition is associated with the replication policy, the volumes, volume groups, hosts and host-to-volume mappings that are contained in the partition are maintained across both systems.
  11. Hosts can now discover paths to volumes at both locations. Use lspartition to monitor the health of the HA solution. Use lspartnership to monitor connectivity between the systems. Use chpartition to change the active and preferred management systems.
    Note: To prioritize a colocated system for I/O, use chhost to specify a location for the host.