Data Domain: How to convert collection replication to mtree replication
Summary: This article explains how to convert collection replication to mtree replication using the CLI.
Instructions
How to convert collection replication to mtree replication
PURPOSE:
Explain how to convert collection replication to mtree replication using the CLI.
APPLIES TO:
-
All Data Domain systems
-
Software Release 5.1 and later
SOLUTION:
-
Turn off any backups or anything writing to the Data Domain for at least 20-40 minutes prior to starting this process.
-
Confirm that File System cleaning is not scheduled to run on the same day as the conversion process as cleaning can send a large amount of data to the target Data Domain and may delay snapshot replication in the steps below. (Note that if cleaning has started prior to conversion, then you may still have a large amount of data to transfer even if cleaning was stopped. Pay special attention to the "Sync'ed-as-of time:" below.)
-
The file system on both the source and destination Data Domain is disabled during this process.
-
Before starting the process, verify replication is in sync and that you have a common snapshot in all of the mtree's on both Data Domains prior to breaking Collection replication. This process is covered below.
PROCESS:
- Confirm that replication is in sync. From the source Data Domain, run the command shown in the example below:
sysadmin@Dell01# replication show detailed-stats rctx://0
CTX: 0
Destination: col://Dell02.localdomain
Post-compressed bytes sent: 592,530,416,032,056
Post-compressed bytes received: 11,616,432,972
Post-compressed bytes remaining: 0 <---Note that the bytes remaining is 0
Sync'ed-as-of time: Wed Mar 29 08:59 <---Note this time should match the current time and date of the Data Domain
sysadmin@Dell01# date
Wed Mar 29 09:00:02 EDT 2017
sysadmin@Dell01#
- Identify the mtrees that need mtree replication established. In the example below, there are two mtrees: Mybackup and backup. In this case, the only mtree that must be set up for mtree replication is the Mybackup mtree. The backup mtree is the default and it cannot be setup for mtree replication to the destination without changing the name of the mtree on the Target/Destination system. If the name on the Target system is changed, then it can be done. If replication is needed between the backup mtree on the source and the backup mtree on the destination, then Directory based replication must be configured.
Example:
sysadmin@Dell01# mtree list
Name Pre-Comp (GiB) Status
--------------------- -------------- ------
/data/col1/Mybackup 3248783.0 RW
/data/col1/backup 394.5 RW
--------------------- -------------- ------
D : Deleted
Q : Quota Defined
RO : Read Only
RW : Read Write
RD : Replication Destination
RLGE : Retention-Lock Governance Enabled
RLGD : Retention-Lock Governance Disabled
RLCE : Retention-Lock Compliance Enabled
sysadmin@Dell01#
- Create a common snapshot. For mtree replication, a common snapshot is required for the re-sync process. The snapshot name is not important. If there is more than one mtree, this step must be repeated for each mtree.
Example:
sysadmin@Dell01# snapshot create snapshot-A-3-29 mtree /data/col1/Mybackup retention 1day
Snapshot "snapshot-A-3-29" for mtree "/data/col1/Mybackup" created and will be retained until Mar 30 2017 08:58.
sysadmin@Dell01# snapshot list mtree /data/col1/Mybackup
sysadmin@Dell01#
Snapshot Information for MTree: /data/col1/Mybackup
----------------------------------------------
Name Pre-Comp (GiB) Create Date Retain Until Status
--------------- -------------- ----------------- ----------------- ------
snapshot-A-3-29 3248783.0 Mar 29 2017 08:58 Mar 30 2017 08:58
--------------- -------------- ----------------- ----------------- ------
Snapshot Summary
-------------------
Total: 1
Not expired: 1
Expired: 0
sysadmin@Dell01#
- Perform a replication sync. This process accomplishes two things: 1) It kicks off the replication process to push the newly created snapshot/snapshots to the destination Data Domain, and 2) It also makes sure everything is in sync prior to breaking collection replication.
Example:
sysadmin@Dell01# replication sync
0 files flushed.
current=905268072 sync_target=905268072 head=905268072
sysadmin@Dell01#
- On the Destination Data Domain, validate that the newly created snapshots are showing on the system. Repeat this step for all of the mtrees that are set up with mtree replication.
Example:
sysadmin@Dell02# snapshot list mtree /data/col1/Mybackup
Snapshot Information for MTree: /data/col1/Mybackup
----------------------------------------------
Name Pre-Comp (GiB) Create Date Retain Until Status
--------------- -------------- ----------------- ----------------- ------
snapshot-A-3-29 3248783.0 Mar 29 2017 08:58 Mar 30 2017 08:58
--------------- -------------- ----------------- ----------------- ------
Snapshot Summary
-------------------
Total: 1
Not expired: 1
Expired: 0
sysadmin@Dell01#
Note: If there are multiple mtrees, you can quickly list all of the snapshots by using the following command: snapshot list mtree *
- Check if the snapshots are showing on both Data Domains and synced as of time is current. If unsure, you run the replication sync command again prior to disabling the files system. Disable the file system on both the Source and Destination Data Domain.
Example:
Source:
sysadmin@Dell01# filesys disable
This action will disable the file system.
Applications may experience interruptions
while the file system is disabled.
Are you sure? (yes|no|?) [no]: yes
ok, proceeding.
Please wait..............
The filesystem is now disabled.
sysadmin@Dell01#
Destination:
sysadmin@Dell02# filesys disable
This action will disable the file system.
Applications may experience interruptions
while the file system is disabled.
Are you sure? (yes|no|?) [no]: yes
ok, proceeding.
Please wait..............
The filesystem is now disabled.
sysadmin@Dell01#
- With the filesystem disabled, collection replication can now be broken. The following is performed both on the source and the destination Data Domain. Even though collection replication is always designated as context 0, it is always best practice to do a replication show config so that the proper context is broken.
Example:
Source:
sysadmin@Dell01# replication show config
CTX Source Destination Connection Low-bw-optim Encryption Enabled Max-repl-
Host and Port streams
--- ------------------------- ------------------------- ------------------------------- ------------ ---------- ------- ---------
0 col://Dell01.localdomain col://Dell02.localdomain Dell02.localdomain (default) disabled enabled yes -
--- ------------------------- ------------------------- ------------------------------- ------------ ---------- ------- ---------
DD System default Max-repl-streams per context: 16
sysadmin@Dell01#
sysadmin@Dell01# replication break rctx://0
The 'replication break' command irrevocably turns off replication
and makes this system a normal restorer. It will not be possible
to reconnect to the current destination. To reconfigure
replication, an empty destination is required.
Are you sure? (yes|no|?) [no]: yes
ok, proceeding.
sysadmin@Dell01#
Destination:
sysadmin@Dell02# replication show config
CTX Source Destination Connection Low-bw-optim Encryption Enabled Max-repl-
Host and Port streams
--- ------------------------- ------------------------- ------------------------------- ------------ ---------- ------- ---------
0 col://Dell01.localdomain col://Dell02.localdomain Dell02.localdomain (default) disabled enabled yes -
--- ------------------------- ------------------------- ------------------------------- ------------ ---------- ------- ---------
DD System default Max-repl-streams per context: 16
sysadmin@Dell01#
sysadmin@Dell02# replication break rctx://0
The 'replication break' command irrevocably turns off
replication and makes this system a normal restorer. It will not
be possible to make this system a destination again without destroying
all of its data with a 'filesys destroy' command.
Are you sure? (yes|no|?) [no]: yes
ok, proceeding.
sysadmin@Dell01#
- Enable the filesystem on both the source and destination Data Domain.
Example:
Source:
sysadmin@Dell01# filesys enable
Please wait......................
The filesystem is now enabled.
sysadmin@Dell01#
Destination:
sysadmin@Dell02# filesys enable
Please wait.....................
The filesystem is now enabled.
sysadmin@Dell01#
- Perform a mtree list to present your list of mtree's to make list of the mtrees that must have mtree replication configured.
Example:
sysadmin@Dell01# mtree list
Name Pre-Comp (GiB) Status
--------------------- -------------- ------
/data/col1/Mybackup 3248783.0 RW
/data/col1/backup 394.5 RW
--------------------- -------------- ------
D : Deleted
Q : Quota Defined
RO : Read Only
RW : Read Write
RD : Replication Destination
RLGE : Retention-Lock Governance Enabled
RLGD : Retention-Lock Governance Disabled
RLCE : Retention-Lock Compliance Enabled
sysadmin@Dell01#
- Setup replication for the mtrees that must be configured for replication. Repeat this process for all of the mtrees that must have replication configured. The same command is run on both the source and the destination Data Domain as shown below.
Example:
sysadmin@Dell01# replication add source mtree://<Name of source DD>/data/col1/<Mtree Name> destination mtree://<Name of source DD>/data/col1/<Mtree Name>
Source:
sysadmin@Dell01# replication add source mtree://Dell01.localdomain/data/col1/Mybackup destination mtree://Dell02.localdomain/data/col1/Mybackup
sysadmin@Dell01#
Destination:
sysadmin@Dell02# replication add source mtree://Dell01.localdomain/data/col1/Mybackup destination mtree://Dell02.localdomain/data/col1/Mybackup
sysadmin@Dell01#
- Run replication show config on both the source and destination Data Domain to insure that replication is properly configured on both sides.
Example:
Source:
sysadmin@Dell01# replication show config
CTX Source Destination Connection Low-bw-optim Encryption Enabled Max-repl-
Host and Port streams
--- ------------------------------------------------ ------------------------------------------------ ------------------------------- ------------ ---------- ------- ---------
1 mtree://Dell01.localdomain/data/col1/Mybackup mtree://Dell02.localdomain/data/col1/Mybackup Dell02.localdomain (default) disabled disabled no 16
--- ------------------------------------------------ ------------------------------------------------ ------------------------------- ------------ ---------- ------- ---------
DD System default Max-repl-streams per context: 16
sysadmin@Dell01#
Destination:
sysadmin@Dell02# replication show config
CTX Source Destination Connection Low-bw-optim Encryption Enabled Max-repl-
Host and Port streams
--- ------------------------------------------------ ------------------------------------------------ ------------------------------- ------------ ---------- ------- ---------
1 mtree://Dell01.localdomain/data/col1/Mybackup mtree://Dell02.localdomain/data/col1/Mybackup Dell02.localdomain (default) disabled disabled no 16
--- ------------------------------------------------ ------------------------------------------------ ------------------------------- ------------ ---------- ------- ---------
DD System default Max-repl-streams per context: 16
sysadmin@Dell01#
- Resync the newly created replication contexts. The resync process is only performed on the source Data Domain. Repeat this process for each context.
Example:
Source:
sysadmin@Dell01# replication resync rctx://1
The 'replication resync' command irrevocably removes the destination data
that are different from the source. It will not be possible to recover the lost data.
Aborting mid resync will not restore the data to its previous state.
Are you sure? (yes|no|?) [no]: yes
ok, proceeding.
(00:09) Waiting for resync to start...
(00:11) Resync started.
Use 'replication watch rctx://1' to monitor progress.
sysadmin@Dell01#
sysadmin@Dell01# replication watch rctx://2
Use Control-C to stop monitoring.
(00:00) Replication resync started...
(00:02) initializing:
(00:14) 100% complete, pre-comp: 0 KB/s, network: 0 KB/s
(00:14) Replication resync completed.
sysadmin@Dell01#
- Once this process is complete, run a replication status command on the source. Since all writes to the Data Domain were stopped prior to starting this process, everything should be in sync within a few minutes. In the example below, context one is in sync and the connection is idle. This indicates that replication is in sync.
Example:
sysadmin@Dell01# replication status
CTX Destination Enabled Connection Sync'ed-as-of-time
--- ------------------------------------------------ ------- ---------- ------------------
1 mtree://Dell02.localdomain/data/col1/Mybackup yes idle Wed Mar 29 09:53
--- ------------------------------------------------ ------- ---------- ------------------
sysadmin@Dell01#
- Turn backup applications back on.