• July 5, 2022

Rocket Storage Monthly: Exploring Volume Cloning on VMAX with SYMCLI

RSM2
In last month’s entry of Rocket Storage Monthly, I described the primary methods for creating backups on EMC’s VMAX using the TimeFinder family of software. Now you should have an understanding about which type of TimeFinder you want to use, but how will you execute and manage backups? Let’s go into more detail today and explore EMC’s management tools to learn more about how to create and operate on a TimeFinder Clone backup.

EMC has a few solutions to help you administrate a VMAX such as Unisphere, but I find it is always good to have the option of a CLI utility and EMC does not disappoint here. On Unix, Linux, and Windows the Solutions Enabler is software allows you to manage a VMAX directly or facilitates in the creation of complex scripts to suit your environment’s needs.

Solutions Enabler contains SYMAPI, software for interacting with Symmetrix systems such as the VMAX, as well as SYMCLI which is built upon SYMAPI. SYMCLI provides us with dozens of binary files to inquire about all the details of a Symmetrix system, create snapshots and carry out other administrative commands.

When SYMCLI is installed on a server, creating a simple backup only requires a few steps. In this post, let’s work with TimeFinder/Clone backups for some test volumes. Before creating our clones, we should check that we have all the information that will be needed. First off, if there are multiple Symmetrix systems in your environment, do you know which one your data is on? We’ll run two simple commands to check this.

-bash-4.2$ symcfg list
                                S Y M M E T R I X
                                   Mcode    Cache      Num Phys  Num Symm
SymmID       Attachment  Model     Version  Size (MB)  Devices   Devices
000194900850 Local       VMAX-1SE  5876       28672        16      7001
000194900853 Local       VMAX-1SE  5876       28672        78      4023


The output of “symcfg list” shows us which storage arrays are visible to our system. In addition, you can find out detailed information such as system capabilities, uptime, and microcode version by using the command “symcfg list -v” Next, I’d like SYMCLI to search this server to identify which disks correspond to volumes on a storage array. In particular, I’d like to know which VMAX /dev/hdisk162 163 belong to.

-bash-4.2$ sympd list
Symmetrix ID: 000194900850
Device Name           Directors                  Device
--------------------------- ------------- -------------------------------------
Cap
Physical               Sym  SA :P DA :IT  Config        Attribute    Sts   (MB)
--------------------------- ------------- -------------------------------------
/dev/rhdisk55          0904 08E:0 07A:D1  2-Way Mir     N/Asst'd GK  RW       6
/dev/rhdisk56          0905 08E:0 07B:C1  2-Way Mir     N/Asst'd GK  RW       6
/dev/rhdisk114         08FE 07E:1 08C:D0  2-Way Mir     N/Grp'd      RW       6
/dev/rhdisk115         08FF 07E:1 07D:D0  2-Way Mir     N/Grp'd      RW       6
/dev/rhdisk117         0901 07E:1 08D:C0  2-Way Mir     N/Grp'd      RW       6
/dev/rhdisk158         0F2C 08E:0  NA:NA  TDEV          N/Grp'd      RW    1025
/dev/rhdisk162         0F62 08E:0  NA:NA  TDEV          N/Grp'd  (M) RW  983505
/dev/rhdisk163         0F2F 08E:0  NA:NA  TDEV          N/Grp'd  (M) RW  983505
 

Great, I’ve found that the disks from my volume group are here in VMAX 000194900850. In addition, I’ve found the volume IDs for each and this overview also shows me what type of volume (RAID, VDEV, or TDEV) I have, which can play a role in what commands I need to use for the backup.

If you recall from last month’s post, every backup on a VMAX needs a source to be paired with a target. The sources here are both TDEVs, and I’d like my targets to be the same.

In most cases, you will need the target devices for a backup to match the characteristics of the source volumes. In particular, make sure that the cylinder count and meta member configuration are identical, and that your target is the right device type and from the right device pool for your needs.

We can check all that information and more by using the “symdev show” command. Below is a few key sections of that output.

-bash-4.2$ symdev -sid 850 show 0F2F
Device Physical Name     : /dev/rhdisk163
Device Symmetrix Name    : 0F2F
...
Bound Thin Pool Name     : FTPT
Device Block Size        : 512
Device Capacity
   {
   Cylinders            :    1049072
   Tracks               :   15736080
   512-byte Blocks      : 2014218240
   MegaBytes            :     983505
   KiloBytes            : 1007109120
   Geometry Limited     : No
   }
Meta Device Members (4)  :
   {
   ----------------------------------------------------------------------
   BCV  DATA                    RDF  DATA
   ----------------------------  --------------------------
   Sym    Cap    Std Inv BCV Inv Pair          R1 Inv R2 Inv Pair
   Dev    (MB)   Tracks  Tracks  State         Tracks Tracks State
   ----------------------------------------------------------------------
--> 0F2F 245876        -       -  N/A                -      - N/A
   0F30 245876        -       -  N/A                -      - N/A
   0F31 245876        -       -  N/A                -      - N/A
   0F32 245876        -       -  N/A                -      - N/A
   ----------------------------------------------------------------------
   983505        -       -                     -      -
   }
…
 

If the devices that will be part of the backup are in a pool, you’ll want to ensure that the pool has enough free space for your needs. You can check both thin and save pools by using the “symcfg list -pool” command. Here, you can see that I focused on thin pools from system 850 in particular.
-bash-4.2$ symcfg list -pool -thin -sid 850
Symmetrix ID: 000194900850
                       S Y M M E T R I X   P O O L S
---------------------------------------------------------------------------
Pool         Flags  Dev              Usable       Free       Used Full Comp
Name         PTECSL Config           Tracks     Tracks     Tracks  (%)  (%)
------------ ------ ------------ ---------- ---------- ---------- ---- ----
FTPT         TSFDEI RAID-5(7+1)    15080508   14824104     256404    1    0
…
Legend:
   (P)ool Type:
   S = Snap,  R = Rdfa DSE  T = Thin
   (T)echnology:
   S = SATA, F = Fibre Channel, E = Enterprise Flash Drive, M = Mixed, - = N/A
   Dev (E)mulation:
   F = FBA, A = AS400, 8 = CKD3380, 9 = CKD3390, - = N/A
   (C)ompression:
   E = Enabled, D = Disabled, N = Enabling, S = Disabling, - = N/A
   (S)tate:
   E = Enabled, D = Disabled, B = Balancing
   Disk (L)ocation:
   I = Internal, X = External, M = Mixed, - = N/A
 

My pool has plenty of space, and I’ve found target volumes 1375 and 1369 to match sources 0F2F and 0F62 now, so I am able to proceed with a full copy backup next.

Before creating the backup, we will first need to create a device group. This not only allows us to create and operate on backups, but also to keep track of which volumes are part of the backup.

Creating a group is simple. We’ll name it COPY_1:

-bash-4.2$ symdg create COPY_1
 

Next, we have to add our devices. We can give them a name to help remember them by for future use. Let’s call our sources SRC_VOL_1 and SRC_VOL_2, and we’ll call the target volumes TGT_VOL_1 and TGT_VOL_2.
-bash-4.2$ symdg -g COPY_1 -sid 000194900850 add dev 0F2F SRC_VOL_1
-bash-4.2$ symdg -g COPY_1 -sid 000194900850 add dev 0F62 SRC_VOL_2
-bash-4.2$ symdg -g COPY_1 -sid 000194900850 add dev 1375 TGT_VOL_1 -tgt
-bash-4.2$ symdg -g COPY_1 -sid 000194900850 add dev 1369 TGT_VOL_2 -tgt
 

It’s important to note that in the examples above I specified for each volume the volume number first and the nickname second. For the targets, the additional flag -tgt was needed. After this, the volumes are ready for backup. Since this is a full copy clone, we’ll use symclone commands.
-bash-4.2$ symclone -g COPY_1 create SRC_VOL_1 SYM LD TGT_VOL_1 SRC_VOL_2 SYM LD TGT_VOL_2

Execute 'Create' operation for the 2 specified devices
in device group 'COPY_1' (y/[n]) ? y

'Create' operation execution is in progress for the device list in
device group 'COPY_1'. Please wait...

'Create' operation successfully executed for the device list
in device group 'COPY_1'.
 

Notice here that the command ends with SRC_VOL_1 SYM LD TGT_VOL_1 SRC_VOL_2 SYM LD TGT_VOL_2. With this format what we are saying is to backup the volume named SRC_VOL_1 to the Symmetrix volume named TGT_VOL_1, and the same for SRC_VOL_2 and TGT_VOL_2. You’ll find this structure for other clone operations.

After calling the create command the point in time at which the backup will represent is set. To initiate the backup we must use “symclone activate”. It is also a good idea to use the -consistent parameter to ensure consistency across multiple volumes.

-bash-4.2$ symclone -g COPY_1 activate SRC_VOL_1 SYM LD TGT_VOL_1 SRC_VOL_2 SYM LD TGT_VOL_2 -consistent
 

The backup should now be in progress. We can verify this and monitor backup progress with “symclone query”.
-bash-4.2$ symclone -g COPY_1 query
Device Group (DG) Name: COPY_1
DG's Type             : REGULAR
DG's Symmetrix ID     : 000194900850
Source Device                   Target Device            State     Copy
--------------------------------- ---------------------------- ------------ ----
Protected Modified                Modified
Logical   Sym  Tracks    Tracks   Logical   Sym  Tracks   CGDP SRC <=> TGT  (%)
--------------------------------- ---------------------------- ------------ ----
SRC_VOL_1 0F2F  15735858        0 TGT_VOL_1 1375        0 XXX. CopyInProg     0
SRC_VOL_2 0F62  15735849        0 TGT_VOL_2 1369        0 XXX. CopyInProg     0
Total           -------- --------                --------
Track(s)      31471707        0                       0
MB(s)          1966982        0                       0
Legend:
   (C): X = The background copy setting is active for this pair.
   V = The VP Snap setting is active for this pair.
   . = Neither setting is active for this pair.
   (G): X = The Target device is associated with this group.
   . = The Target device is not associated with this group.
   (D): X = The Clone session is a differential copy session.
   . = The Clone session is not a differential copy session.
   (P): X = The pre-copy operation has completed one cycle.
   . = The pre-copy operation has not completed one cycle.
 

A view of the full copy backup
A view of the full copy backup

Depending on volume size, the first full clone backup for a source and target pair may take a while. Once this process is finished the state of these volumes will change to “Copied”.

At a future point in time, you may need to restore from a backup you’ve taken. The steps required to restore a TimeFinder clone are similar to what we’ve done for creating the backup. If the backup pairs are not already in a device group, remember to add them to a group as we had done earlier. Once this is complete, we can issue the “symclone restore” command to start the restore process:

-bash-4.2$ symclone -g COPY_1 restore SRC_VOL_1 SYM LD TGT_VOL_1 SRC_VOL_2 SYM LD TGT_VOL_2
 

When the restore session begins, data that is being restored from the target volumes will be immediately visible on the source volumes, but the restore session will be in progress until the data is fully copied back to the source. Once again, we can view this progress with the “symclone query” command.
-bash-4.2$ symclone -g COPY_1 query
…
Source Device                   Target Device            State     Copy
--------------------------------- ---------------------------- ------------ ----
Protected Modified                Modified
Logical   Sym  Tracks    Tracks   Logical   Sym  Tracks   CGDP SRC <=> TGT  (%)
--------------------------------- ---------------------------- ------------ ----
SRC_VOL_1 0F2F         0        0 TGT_VOL_1 1375        0 XXX. Restored     100
SRC_VOL_2 0F62         0        0 TGT_VOL_2 1369        0 XXX. Restored     100
…
 

When the restore is finished, you must split the backup session before any other operations can be carried out on your backup pairs, such as successive backups or removal of the backups.

A view of the restoration process
A view of the restoration process

-bash-4.2$ symclone -g COPY_1 split SRC_VOL_1 SYM LD TGT_VOL_1 SRC_VOL_2 SYM LD TGT_VOL_2
 

At some point, you might want to recreate a clone such that it represents a more recent point in time. Or alternatively, you may wish to remove a backup altogether to conserve space. Using symclone, we can carry out both operations easily. To recreate a clone, all you need to do is issue the “symclone recreate” command:
-bash-4.2$ symclone -g COPY_1 recreate SRC_VOL_1 SYM LD TGT_VOL_1 SRC_VOL_2 SYM LD TGT_VOL_2
-bash-4.2$ symclone -g COPY_1 activate SRC_VOL_1 SYM LD TGT_VOL_1 SRC_VOL_2 SYM LD TGT_VOL_2
 

Note that since we took a differential clone backup, successive backups using the recreate command will typically take much less time since it will only be updating sections of data that has changed since the last backup.

Finally, if you want to remove a backup, the symclone terminate
command accomplishes this:

-bash-4.2$ symclone -g COPY_1 terminate SRC_VOL_1 SYM LD TGT_VOL_1 SRC_VOL_2 SYM LD TGT_VOL_2
 

Terminating the previous backup pairs
Terminating the previous backup pairs

 

There are so many more commands to cover in order to give a complete picture of what SYMCLI can accomplish, but now you should have a good understanding on how to drive TimeFinder Clone through the CLI. Other TimeFinder variants work in similar fashion, and perhaps we’ll cover those in a future posting but when in doubt, utilizing EMC’s Command Reference for SYMCLI or simply using the “-h” parameter with a SYMCLI command will point you in the right direction.

Contact us to learn more about Rocket Storage Solutions

0 Comments

Leave a Comment

Your email address will not be published.