ksysmgr command

Purpose

The ksysmgr command provides a consistent interface to configure the controller system (KSYS) and to perform Geographically Dispersed Resiliency for Power Systems™ operations by using a terminal or script.

Syntax

ksysmgr [-v] [-f] [-l {low|max}] 
[-a {<ATTR#1>,<ATTR#2>,...}] <ACTION> <CLASS> [<NAME>]
[-h | <ATTR#1>=<VALUE#1> <ATTR#2>=<VALUE#2> ...]

ksysmgr [-v] [-f] [-l {low|max}] 
[-a {<ATTR#1>,<ATTR#2>,...}] <ACTION> <CLASS> [<NAME>]
<ATTR#1>=<VALUE#1> <ATTR#2>=<VALUE#2> ...]

         ACTION={add|modify|delete|query|manage|unmanage|...}\n\
         CLASS={ksyscluster|site|hmc|host|...}\n\

ksysmgr {-h|-?} [-v] [<ACTION> [<CLASS>]]

ksysmgr [-v] help

The basic format for using the ksysmgr command is as follows:

ksysmgr ACTION CLASS [NAME] [ATTRIBUTES...]
Notes:
  • You must have root authority to run the ksysmgr command.
  • Help information is available for the ksysmgr command from the command line. For example, when you run the ksysmgr command without any flags or parameters a list of the available ACTIONs is displayed.
  • If you enter ksysmgr <ACTION> in the command line without specifying any CLASS, the command results in a list of all the available CLASSes for the specified ACTION.
  • Entering ksysmgr <ACTION> <CLASS> without specifying any NAME or ATTRIBUTES parameters is different because some ACTION and CLASS combinations do not require any additional parameters. To display help information in this scenario, you can view the help information by appending the -h flag to the ksysmgr <ACTION> <CLASS> command.
  • You cannot display help information from the command line for each of the ksysmgr command's individual ATTRIBUTES.

Description

All ksysmgr command operations are logged in the /var/ksys/ksysmgr.oplog file, which includes the name of the command that was executed, start time, process ID for the ksysmgr operation, the command with arguments, and overall return code.

Flags

ACTION
Describes the action to be performed.
Note: The ACTION flags are not case-sensitive. All ACTION flags provide a shorter alias. For example, rm is an alias for delete. Aliases are provided for convenience from the command line and must not be used in scripts.
The following ACTION flags are available:
Note: The asterisk (*) in the aliases signify wildcard characters. For example, for the modify ACTION, the alias value is mod*. If you type modd, the command still works.
  • query (alias: q*, ls, get, sh*)
  • add (alias: ad*, create, cr*, make, mk, bu*, bld)
  • delete (alias: de*, remov*, rm, er*)
  • modify (alias: mod*, ch*, set, sets)
  • verify (alias: ver*)
  • sync (alias: syn*, pr*)
  • restore (alias: rest*)
  • manage (alias: man*, mg)
  • unmanage (alias: unman*, umg)
  • discover (alias: di*)
  • help (alias: hel*, ?)
  • move (alias: mov*, mv, swi*)
  • recover (alias: rec*)
  • pair (alias: map)
  • cleanup (alias: clean*)
CLASS
Specifies the type of object on which the ACTION is performed. The CLASS flags are not case-sensitive.

The following CLASS objects are supported:

  • ksyscluster (alias: cl*, ksyscl*)
  • site (alias: sit*)
  • hmc (alias: hmcs, hmces)
  • host (alias: serv*, mach*, cec*, ho*)
  • start of changehost_group (alias: serv*, mach*, cec*, ho*)end of change
  • vios (alias: vi*)
  • vm (alias: lp*, vm*)
  • disk_pair (alias: dp, disk_p*)
  • disk_group (alias: dg, disk_g*)
  • storage_agent (alias: storage_a*, sta)
  • version (alias: vers*)
  • notify (alias: rn, remote_not*, noti*)
  • snapshot (alias: snap*)
  • script
NAME
Specifies the particular object, of type CLASS, on which the ACTION must be performed. The NAME flags are case-sensitive.
ATTR=VALUE
Specifies an optional flag that has attribute pairs and value pairs that are specific to the ACTION and CLASS combination. Use these pairs to specify configuration settings or to run particular operations. Both ATTR and VALUE flags are case-sensitive.
-a {<ATTR#1>,<ATTR#2>,...}
Displays only the specified attributes. This flag must be used with the query ACTION flag. For example:
ksysmgr -a name,sitetype query site
-f
Overrides any interactive prompts and forces the current operation to be run.
-h
Displays help information.
-l low|max
Activates the following trace logging values for troubleshooting purposes:
low (default)
Logs basic information for every ksysmgr operation.
max
Performs high tracing operations such as adding the routine function and the utility function. Adds transaction ID to the function's entry messages.
Note: All trace data is written into the ksysmgr.log file. This flag is ideal for troubleshooting problems.
-v
Displays maximum verbosity in the output.

Exit status

RC_UNKNOWN (Exit value = -1)
Result is not known. This value is used as an initializer.
RC_SUCCESS (Exit value = 0)
No errors are detected. The operation is successful.
RC_ERROR (Exit value = 1)
An error occurred.
RC_NOT_FOUND (Exit value = 2)
The specified resource does not exist or cannot be found.
RC_MISSING_INPUT (Exit value = 3)
Required input is missing.
RC_INCORRECT_INPUT (Exit value = 4)
Detected input is incorrect.

Examples

  • To get help information about the ksyscluster class, enter the following command:
    ksysmgr help ksyscluster
    An output that is similar to the following example is displayed:
    Available actions for ksyscluster:
             add
             delete
             query
             sync
             verify

Cluster configuration examples

  • To add a KSYS cluster, use the following command syntax:
    ksysmgr add ksyscluster clustername ksysndoes=nodename 
         type=DR [sync=true] 
    For example,
    ksysmgr add ksyscluster SampleClusterName ksysnodes=ksysnode1 
         type=DR sync=true
  • To query the KSYS cluster, enter the following command:
    ksysmgr query cluster
    An output that is similar to the following example is displayed:
    Name:            vmr
    State:           Online
  • To remove a KSYS cluster, use the following command syntax:
    ksysmgr delete ksyscluster clustername
    When you delete a KSYS cluster, the ksysmgr command prompts for your confirmation. The ksysmgr command also recommends to create a snapshot at this point. You can override these prompts by using the -f flag. For example,
    ksysmgr -f delete ksyscluster SampleClusterName
    An output that is similar to the following example is displayed:
    WARNING: This action will remove all configuration and destroy the KSYS setup, 
    it is recommended to create a backup "ksysmgr add snapshot -h"
    Consistency group cleanup successful
    Peer domain stopped successfully
    Peer domain was removed successfully

Site configuration examples

  • To create a site in the KSYS subsystem, use the following command syntax:
    ksysmgr add site sitename sitetype=home|backup
    For example,
    ksysmgr add site SiteA sitetype=home
    No output is displayed. The command returns with the exit value of 0.
  • To query the details about all existing sites, enter the following command:
    ksysmgr query site
    An output that is similar to the following example is displayed:
    Replication type for site(s): async
    Name:             SiteA
    Sitetype:        HOME
     
    Name:             SiteB
    Sitetype:        BACKUP
    The site that is currently running the active virtual machines is labeled as home. By default, the replication type of the site is async.
  • To query the details about a specific site, use the following command syntax:
    ksysmgr query site sitename
    For example,
    ksysmgr query site
    An output that is similar to the following example is displayed:start of change
    Name:                site2
    Sitetype:            BACKUP
    Host_groups:         None
    
    Name:                site1
    Sitetype:            HOME
    Host_groups:         None
    cpu_capacity:        none
    memory_capacity:     none
    skip_resource_check: No
    skip_power_on:       No
    vswitchmap:          none
    drvswitchmap:        none
    vlanmap:             none
    drvlanmap:           1/4,2/5,3/6
    end of change
  • To discover a site, use the following command syntax:
    ksysmgr discover site sitename
    For example,
    ksysmgr discover site SiteA
    The KSYS subsystem discovers all the hosts and virtual machines from all the host groups across both the sites. Discovery operation might take a few minutes to complete.
  • start of changeTo modify the configuration information of a site, use the following command syntax:
    ksysmgr modify site <sitename[,sitename2,...]> | file=<filepath>
    [name=<newsitename>]
    [memory_capacity=<(Whole Number >= 1)> | minimum | current_desired | none]
    [cpu_capacity=<(Whole Number >= 1)> | minimum | current_desired | none]
    [skip_resource_check=<yes|no>]
    [skip_power_on=<yes|no>]
    [network=<vlanmap | vswitchmap>  backupsite=siteB
      sitename=<#[,#,...] || all> siteB=<#[,#,...] || all> [dr_test=<yes|no>]
    [policy=<delete>]]
    For example,
    ksysmgr modify site site1 network=vlanmap backupsite=site2 
      site1=1,2,3 site2=4,5,6 dr_test=yes
    end of change
  • To change the replication type of a site from the default async value to the sync value, enter the following command:
    ksysmgr modify system replication_type=sync sites=Site1,Site2

HMC configuration examples

  • To add an HMC to the KSYS configuration, use the following command syntax:
    ksysmgr add hmc hmcname
          login=username
          [ password=password ]
          hostname|ip=hostname|ip
          site=site_name
          [hmctimeout=value]
          [maxjobs=value]
          [SwXSDVersion=value]
    For example,
    ksysmgr add hmc PrimaryHmcName login=hscroot password=xxx ip=86.xx.xx.xx site=SiteA
    No output is displayed. The command returns with the exit value of 0.
    You can also run the command without specifying the password in the command line. In this case, you can enter the password as hidden characters when the command prompts for the password. For example,
    ksysmgr add hmc PrimaryHmcName login=hscroot ip=86.xx.xx.xx site=SiteA
    Enter Password for hmc: ***********
    Re-Enter Password: ************
  • To query the details about all HMCs, enter the following command:
    ksysmgr query hmc
    An output that is similar to the following example is displayed:
    Name:            PrimaryHmcName
    Site:            SiteA
    Ip:               86.xx.xx.x
    Login:           hscroot
                            Managed Host List:
    Name                                    Uuid
    ================                        ================
    cola_8286-42A-2120DEW                   7d35be3a-a9b3-3cdf-a31e-80958bd2b9c8
    pepsi_8286-42A-2120DFW                  21b4b05f-9b84-349c-9ce9-d03f0e78f9f7
    ========================================================================
    
    Name:            BackupHmcName
    Site:            SiteB
    Ip:              9.3.18.34
    Login:           hscroot
                            Managed Host List:
    Name                                    Uuid
    ================                        ================
    pepsi_8286-42A-2120DFW                  21b4b05f-9b84-349c-9ce9-d03f0e78f9f7
    cola_8286-42A-2120DEW                   7d35be3a-a9b3-3cdf-a31e-80958bd2b9c8
    ========================================================================
  • To query the details about a specific HMC, use the following command syntax:
    ksysmgr query hmc <hmcname>
    For example,
    ksysmgr query hmc PrimaryHmcName
    An output that is similar to the following example is displayed:
    Name:            PrimaryHmcName
    Site:            SiteA
    Ip:               86.75.30.9
    Login:           username
                            Managed Host List:
    Name                                    Uuid
    ================                        ================
    cola_8286-42A-2120DEW                   7d35be3a-a9b3-3cdf-a31e-80958bd2b9c8
    pepsi_8286-42A-2120DFW                  21b4b05f-9b84-349c-9ce9-d03f0e78f9f7
    ========================================================================
  • To modify the details of a specific HMC, use the following command syntax:
    ksysmgr modify hmc hmcname
          [name=new_hmcname]
          [login=new_username]
          [password=new_password]
          [hostname|ip=hostname|ip]
    For example, to modify the login and password details of the PrimaryHmcName HMC, enter the following command:
    ksysmgr modify hmc PrimaryHmcName login=scott password=tiger
    No output is displayed. The command returns with the exit value of 0.
  • To remove an HMC from the KSYS configuration, use the following command syntax:
    ksysmgr delete hmc <hmcname>
    For example,
    ksysmgr delete hmc PrimaryHmcName
    An output that is similar to the following example is displayed:
    HMC resource removed

Host configuration examples

  • To add a host to the KSYS resource manager, use the following command syntax:
    ksysmgr add host hostname
          site=sitename
          [uuid=uuid]
          [hostname|ip=hostname|ip]
    For example,
    ksysmgr add host Site1_host1 site=Site1
    No output is displayed. The command returns with the exit value of 0.
  • To list details about all hosts, use the following command syntax:
    ksysmgr query host
    An output that is similar to the following example is displayed:
    Name:            Site1_host1
    UUID:            21b4b05f-9b84-349c-9ce9-d03f0e78f9f7
    FspIp:           10.xx.1.xxx
    Pair:            Site1_host1
    Site:            Site1
    VIOS:            Site1_VIOS1
                     Site1_VIOS2
    HMCs:            Site1_HMC1
    
    Name:            Site2_host1
    UUID:            7d35be3a-a9b3-3cdf-a31e-80958bd2b9c8
    FspIp:           10.40.1.161
    Pair:            Site1_host1
    Site:            Site2
    VIOS:            Site2_VIOS1
                     Site2_VIOS2
    HMCs:            Site2_HMC1
  • To list details about a specific host, use the following command syntax:
    ksysmgr query host hostname
    For example,
    ksysmgr query host Site1_host1
  • To pair two hosts across sites, use the following command syntax:
    ksysmgr pair host hostname pair=hostname
    For example,
    ksysmgr pair host Site1_host1 pair=Site2_host1
    An output that is similar to the following example is displayed:
    Site1_host1 on site1 has been paired
    with Site2_host1 on Site2 successfully.
  • To unpair two hosts across sites, use the following command syntax:
    ksysmgr pair host hostname pair=none
    For example,
    ksysmgr pair host Site1_host1 pair=none
    An output that is similar to the following example is displayed:
    Site1_host1 on site1 has been unpaired
    with Site2_host1 on Site2 successfully.
  • To remove a host from the KSYS resource manager, use the following command syntax:
    ksysmgr delete host hostname
    For example,
    ksysmgr delete host Site1_host1
start of change

Host group configuration examples

  • To create a host group in the active site and to add the existing hosts to this new host group, use the following command syntax:
    ksysmgr add host_group hg_name
          site=sitename
          hosts=host1,[host2,...] | file=filepath
    where, the file parameter is an XML file that contains a list of hosts.
  • To add or remove hosts from the existing host groups, use the following command syntax:
    ksysmgr modify host_group hg_name add | remove
    hosts=host1,[host2,...] | file=filepath
  • To modify the capacity-related attributes for all the hosts in a host group, use the following command syntax:
    ksysmgr modify host_group hg_name options
          [memory_capacity=(Whole Number > 1) | minimum | current_desired | none]
          [cpu_capacity=(Whole Number > 1) | minimum | current_desired | none]
          [skip_resource_check=yes|no]
          [skip_power_on=yes|no]
  • To create a network mapping policy of VLAN ID or virtual switches for all the hosts in a host group, across sites, use the following command syntax:
    ksysmgr modify host_group hg_name options
          network=vlanmap | vswitchmap  sites=siteA,siteB
           siteA=<#,[#,...]> siteB=<#,[#,...]>
  • To discover and verify all the hosts in a specific host group, use the following command syntax:
    ksysmgr discover host_group hg_name verify=true
  • To delete a host group, use the following command syntax:
    ksysmgr delete host_group hg_name
  • To query the details about all host groups or a specific host group, use the following command syntax:
    ksysmgr query host_group [hg_name]
end of change

LPAR configuration examples

  • To include or exclude a specific virtual machine from the KSYS configuration, use the following command syntax:
    ksysmgr -h manage|unmanage VM_name
    The excluded virtual machine is not moved to the backup site when a site-switch operation is initiated.
    Notes:
    • After including or excluding a virtual machine, you must run the discovery and verification commands to rediscover the resources and validate the modified configuration setting.
    • If you use SAN Volume Controller storage system, before you include a specific virtual machine to the KSYS subsystem, you must ensure that the new virtual machine is associated with the storage volumes that have the same relationship type as the other existing virtual machines. For more information about this restriction, see SAN Volume Controller system and Storwize system.
  • To update the priority of virtual machines, use the following syntax:
    ksysmgr modify VM name1[,name2,name3,...] | file=filepath
       [uuid=uuid_value]
       [host=hostname]
       [priority=low|medium|high]
    where, the file parameter is an XML file that contains a list of virtual machine references.

Storage configuration examples

  • To add a storage agent to a site, use the following command syntax:
    ksysmgr add storage_agent storage_agent_name
          hostname=hostname>|ip=ip
          site=sitename
          storagetype=type
          serialnumber=number | clusterid=number
    For example,
    ksysmgr add storage_agent StorageNamePrimary 
    site=Site1
    serialnumber=000196xxx
    storagetype=emc 
    ip=1.2.xx.xx
  • To list storage agent details, use the following command syntax:
    ksysmgr query storage_agent storage_agent_name
    For example,
    ksysmgr query storage_agent StorageNamePrimary
    An output that is similar to the following example is displayed:
    Name:             StorageNamePrimary
    Serialnumber:     00019xxxx
    Storagetype:     EMC
    Site:            Site1
    Ip:               1.2.xx.xx
  • To remove a storage agent from a site, use the following command syntax:
    ksysmgr delete storage_agent storage_agent_name
  • To resynchronize the storage data after an unplanned recovery from the active site to the backup site, use one of the following commands:
    ksysmgr resync site active_site_name
    ksysmgr resync host_group active_hg_name

    If the unplanned move operation was at site level, you must run the ksysmgr resync command at site level. Similarly, if a virtual machine was moved to the backup site in an unplanned move operation at host group level, you must run the ksysmgr resync command at host group level.

Discovery and verification examples

  • To discover the resources in a site, use the following command syntax:
    ksysmgr discover site sitename
    For example,
    ksysmgr discover site site1
  • To discover resources and to verify the KSYS configuration, use the following command syntax:
    ksysmgr discover site sitename verify=true
    For example,
    ksysmgr discover site site1 verify=true
    An output that is similar to the following example is displayed:
    Running discovery on entire site, this may take few minutes...
            Discovery has started for VM VM_1
            Configuration information retrieval started for VM VM_1
            Discovery has completed for VM VM_1
            Disk Group creation on storage subsystem started for Site site1
            Disk Group creation on storage subsystem started for Site site2
            Disk Group creation on storage subsystem completed for Site site1
            Disk Group creation on storage subsystem completed for Site site2
    Discovery has finished for site1
    1 out of 1 VMs have been successfully discovered

Script configuration examples

  • To add a script for automatic execution before or after the discovery and verification operations, use the following command syntax:
    ksysmgr add script entity=site|host_group pre_verify|post_verify=script_path
    Note: start of changeThe pre_verify and post_verify scripts can be run only at site or host group level. end of change
  • start of changeTo add a script for automatic execution before or after the disaster recovery move operation, use the following command syntax:
    ksysmgr add script entity=site|host|host_group 
        pre_offline|post_offline|pre_online|post_online=script_path
    end of change

Events query examples

  • To query the events of a specific type, use the following command syntax:
    ksysmgr query event [type=error|warning|info]
    For example,
    ksysmgr query event type=error
  • To query the events of all types, run the following command:
    ksysmgr query event
    An output that is similar to the following example is displayed:
    Event Name                     Description
    ---------------------------------------------------------------
    HMC_UNREACHABLE                HMC is down or not reachable
    STG_UNREACHABLE                Storage subsystem is down or not reachable
    HMC_REACHABLE                  HMC has recovered and is now reachable
    VIOS_RMC_STATE_DOWN            HMC to VIOS RMC connectivity seems to be having problems
    INSUFFICIENT_HOST_CAPACITY     Backup host does not have sufficient capacity 
                                   for a successful DR failover
    VIOS_FAILURE                   VIOS seems to have failed
    VM_CONFIG_COLLECTION_FAILURE   Configuration data collection failed for the VM
    DAILY_VERIFY_FAILED            Daily verification checks have failed
    REPLICATION_FAILURE            Storage reports replication problem
    MIRROR_RELATIONSHIP_MISSING    Disk has no mirror pair
    HOST_FAILURE                   Host failure has occurred
    FILESYSTEM_SPACE_WARNING       Filesystem is reaching full condition
    VM_MOVE                        VM has moved from one host to another
    DAILY_VERIFY_COMPLETE          Daily verification checks have completed successfully
    HOST_IN_INVALID_STATE          Host is in invalid state
    VM_STORAGE_COLLECTION_FAILURE  Storage information collection has failed for the VM
    HMC_LOGIN_FAILURE              HMC login failed
    DISK_VALIDATION_FAILURE        Disk Group validation failure
    VIOS_DELETED                   VIOS deletion has been detected
    VM_NOT_ACTIVE                  VM does not seem to be active
    DUPLICATE_VMs                  VM exists on multiple hosts

Notification configuration examples

  • To add an email, pager, or SMS notification for a specific user, use the following command syntax:
    ksysmgr add notify user=username contact=email_address
    ksysmgr add notify user=username contact=10_digit_phone_number@phone_carrier_email_address
    ksysmgr add notify user=username contact=pager_email_address
    For example,
    ksysmgr add notify user=John contact=john.doe@testmail.com
    ksysmgr add notify user=John contact=1234567890@tmomail.net
    ksysmgr add notify user=John contact=1234567890@SKYTEL.COM
  • To modify an email address, pager email address, or SMS number for a specific user, use the following command syntax:
    ksysmgr modify notify oldcontact=old_username newcontact=new_username
    ksysmgr modify notify oldcontact=old_email_address newcontact=new_email_address
    For example,
    ksysmgr modify notify oldcontact=John newcontact=Dave
    ksysmgr modify notify oldcontact=john@gmail.com newcontact=dave@gmail.com
  • To query all the registered contact details, use the following command:
    ksysmgr query notify contact
    An output that is similar to the following example is displayed:
    User:            Mark Smith
    Contact:       mike@mike.com
    
    User:            joe
    Contact:       joe@gmail.com
  • To delete all the contact information for a specific user, use the following command syntax:
    ksysmgt delete notify user=username
    For example,
    ksysmgt delete notify user=John
  • To add a script for a predefined set of notifications and subsequent actions for a specific event, use the following command syntax:
    ksysmgr add notify script=full_path_script events=event_name
    For example,
    ksysmgr add notify script=/tmp/script.sh events=HMC_DOWN
  • To modify a script, use the following command syntax:
    ksysmgr modify notify oldscript=old_file_name newscript=new_file_name
    For example,
    ksysmgr modify notify oldscript=/tmp/script.sh newscript=/tmp/newscript.sh
  • To remove a script, use the following command syntax:
    ksysmgr delete notify script=file_name
    For example,
    ksysmgr delete notify script=/tmp/script.sh
  • To query a script, use the following command:
    ksysmgr query notify script

System-wide attributes configuration

  • To query details about system-wide attributes, enter the following command:
    ksysmgr query system
    An output that is similar to the following example is displayed:
    System-Wide Persistent Attributes
    auto_discovery_time  =24 hours
    lose_vios_redundancy ="no"
    auto_reverse_mirror  ="yes"
    notification_level   ="high"
    dup_event_processing ="no"
    replication_type     ="Asynchronous"
  • To enable the KSYS subsystem to automatically rediscover the resources twice a day, enter the following command:
    ksysmgr modify system auto_discover_time=12
  • To change the notification level of your system to receive notification for all critical errors and warnings of all events, enter the following command:
    ksysmgr modify system notification_level=medium
  • To change the duplicate event processing option to receive notification for all events, even if the events are duplicated, enter the following command:
    ksysmgr modify system dup_event_processing=yes
  • To change the storage replication mode between two sites from asynchronous mode to synchronous mode, enter the following command:
    ksysmgr modify system replication_type=sync sites=SiteA,SiteB
  • start of changeTo enable the network mapping function and to create network mapping policy for all hosts and host groups across the active and the backup site, enter the following command:
    ksysmgr modify system network_mapping=enable network=vlanmap|vswitchmap sites=siteA,siteB
           siteA=<#,[#,...]> siteB=<#,[#,...]>]
    end of change
start of change

Disaster recovery failover rehearsal examples

  • To discover, set up, and enter into DR failover rehearsal mode, use the following command syntax:
    ksysmgr discover host_group|site name dr_test=yes|no
    For example:
    ksysmgr discover host_group hg1 dr_test=yes
  • To check whether the test environment is ready for the test-move operation, use the following command syntax:
    ksysmgr verify host_group|site name dr_test=yes|no
    For example:
    ksysmgr verify host_group hg1 dr_test=yes
  • To start the VMs in the DR test environment, use the following command syntax:
    ksysmgr move host_group|site name from=Site1 to=Site2 dr_test=yes|no
    For example:
    ksysmgr move host_group hg1 from=Site1 to=Site2 dr_test=yes
  • To clean up the DR test environment and to retain the normal DR backup state, use the following command syntax:
    ksysmgr cleanup host_group|site name dr_test=yes|no
    For example:
    ksysmgr cleanup host_group hg1 dr_test=yes
end of change

Disaster recovery operation examples

  • To initiate a site-switch operation, use the following command syntax: start of change
    ksysmgr move site|host_group hg_name
          from=sitename
          to=sitename
          [force=true|false]
          [lose_vios_redundancy=yes|no]
          [dr_type=planned|unplanned]
          [cleanup=yes|no]
    end of change Where, the default value of the force attribute is false, the default value of the lose_vios_redundancy attribute is no, and the default value of the dr_type attribute is planned. For example:
    ksysmgr move site from=Site1 to=Site2 dr_type=planned cleanup=no
    An output that is similar to the following example is displayed:
    Site move started for Site1 to Site2
    Shutdown on Site1 site has started for VM Site1_VM
    Shutdown on Site1 site has completed for VM Site1_VM
    Storage mirror reversal has started
    Mirroring will be setup from Site2 to Site1
    Storage mirror reversal has completed
    Restart on Site2 site has started for VM Site1_VM
    Restart on Site2 site has completed for VM Site1_VM
    Configuration cleanup successful on Site1 site for VM Site1_VM
    Move has completed for VM Site1_VM
    Site move completed from Site1 to Site2
    1 out of 1 Vms have been successfully moved from Site1 to Site2
    Site2 is now the active site
  • start of changeTo recover failed virtual machines after the move operation is complete, use the following command syntax:
    ksysmgr recover host_group name
    end of change
  • To clean up a site, use the following command syntax:
    ksysmgr cleanup site|host_group|VM name
    If you do not specify the cleanup attribute, for a planned recovery, the KSYS subsystem automatically cleans up the source site from the location where the switch was initiated. For an unplanned recovery, you must manually clean up the source site after the HMC and hosts become operational. For example:
    ksysmgr cleanup site SiteA

Snapshot examples

  • To save a snapshot of the KSYS cluster configuration and resources, use the following command syntax:
    ksysmgr add snapshot filepath=full_file_prefix_path|file_prefix type=cluster|basic|detailed ]
    For example,
    ksysmgr add snapshot filepath=/home/ksysdir/myksysbackup type=basic
  • To view a snapshot, use the following command syntax:
    ksysmgr query snapshot filepath=full_file_prefix_path
    For example,
    ksysmgr query snapshot filepath=/home/ksysdir/myksysbackup_2016_06_23_04:54:30.xml.tar.gz
  • To restore the configuration data on a KSYS node, use the following command syntax:
    ksysmgr restore snapshot filepath=full_file_prefix_path
    For example:
    ksysmgr restore snapshot filepath=/home/ksysdir/myksysbackup_2016_06_23_04:54:30.xml.tar.gz
    This command decompresses and unarchives the snapshot file, and then applies the configuration settings to the KSYS node.
  • To delete a snapshot, use the following command syntax:
    ksysmgr delete snapshot filepath=full_file_prefix_path
    For example,
    ksysmgr delete snapshot filepath=/home/ksysdir/myksysbackup_2016_06_23_04:54:30.xml.tar.gz