Under Construction

How Data Replication Works

As soon as data replication is activated on an HMC, a version number (level) is incremented for each data type with each change. This version number (level) can be displayed with the command “hmc lsdatarep”, e.g. for the HMC hmc01:

$ hmc lsdatarep hmc01
DATA_TYPE  LEVEL  UPDATED_SINCE_START  UPDATED_TIME  SOURCE_HMC_NAME  NOT_IN_SYNC_SLAVES
pwdpolicy  0      0                    -             -                -
user       0      0                    -             -                -
kerberos   0      0                    -             -                -
customer   0      0                    -             -                -
outbound   0      0                    -             -                -
ldap       0      0                    -             -                -
mfa        0      0                    -             -                -
$

As long as data replication is not activated, the level does not change when the data changes. For example, if you change a user account

$ hmc chhmcusr hmc01 testuser description="update1 from hmc01"
Shared connection to hmc01 closed.
$

the level remains unchanged:

$ hmc lsdatarep hmc01
DATA_TYPE  LEVEL  UPDATED_SINCE_START  UPDATED_TIME  SOURCE_HMC_NAME  NOT_IN_SYNC_SLAVES
pwdpolicy  0      0                    -             -                -
user       0      0                    -             -                -
kerberos   0      0                    -             -                -
customer   0      0                    -             -                -
outbound   0      0                    -             -                -
ldap       0      0                    -             -                -
mfa        0      0                    -             -                -
$

However, if data replication is enabled on the HMC

$ hmc enabledatarep hmc01
$

this behavior changes immediately. If a user account is changed again, the version number (level) is immediately incremented by one:

$ hmc lsdatarep hmc01
DATA_TYPE  LEVEL  UPDATED_SINCE_START  UPDATED_TIME         SOURCE_HMC_NAME  NOT_IN_SYNC_SLAVES
pwdpolicy  0      0                    -                    -                -
user       1      1                    05/18/2023 17:32:58  hmc01            -
kerberos   0      0                    -                    -                -
customer   0      0                    -                    -                -
outbound   0      0                    -                    -                -
ldap       0      0                    -                    -                -
mfa        0      0                    -                    -                -
$

The output shows that the value of LEVEL for the user data type has changed from 0 to 1. In addition, the UPDATED_SINCE_START column shows that there has been a change in the user data type since data replication was activated. Additional columns contain the time stamp of the last change and the source (master) of the change.

However, activating data replication alone does not mean that data is replicated! First it must be configured which HMC uses which other HMC as a source (master) for which data types.

A source (or master) can be specified using the “hmc adddatarep” command; one or more data types can optionally be specified that are to be replicated by the specified master:

$ hmc adddatarep hmc02 hmc01 data_types=user
$

The HMC hmc02 is a slave of the HMC hmc01 with regard to the user data type. The HMC hmc01 is a so-called master for HMC hmc02. Changes to user accounts on the master (here hmc01) are automatically replicated to the slave (here hmc02). The slave adopts the version of the master, accordingly the level of the data type that is replicated on the slave is the same as on the master.

If a change is made on the master, the level on the master is increased by one and the change is passed on to the slave. The level on the slave is set to the same value as on the master.