HDS – TrueCopy Replication Commands

Print Friendly, PDF & Email

Hds TrueCopy is equivalent of EMC SRDF Synchronous. It can be managed 2 ways – either by using Storage Navigator or by using CCI command line. Below is the list of few useful commands that I’ve used to manage truecopy relationship.

Assumption:

Primary Array serial number: 1111
Secondary Array serial number: 2222

Primary HORCM server and instance: instance number 11 on server primserv
Secondary HORCM server and instance: instance number 22 on server secserv

Primary devices: A111, B111
Secondary devices: A222, B222

Relationship: A111 -> A222, B111 -> B222

Consistency group: TESTGROUP

1. Displaying the pair status

From Primary server:
primserv# pairdisplay -I11 -g TESTGROUP -fcx
Group PairVol(L/R) (Port#,TID, LU),Seq#,LDEV#.P/S,Status,Fence, %,P-LDEV# M
TESTGROUP dev_1(L) (CL1-H-3,52, 477)1111 A111.SMPL —- —— , —– —– –
TESTGROUP dev_1(R) (CL1-E-2,16, 390)2222 A222.SMPL —- —— , —– —– –
TESTGROUP dev_2(L) (CL1-H-3,52, 478)1111 B111.SMPL —- —— , —– —– –
TESTGROUP dev_2(R) (CL1-E-2,16, 391)2222 B222.SMPL —- —— , —– —– –

-I instance 11, -g group TESTGROUP
-fc -> display COPY rate (percentage of data out of sync). 100 indicates PVOL and SVOL is 100% same.
-fx -> display hexadecimal number for device (default is to show decimal dev number)
-fcx -> combined -fc and -fx

Meaning of value of last field “M”

– For P-VOL and “PSUS” state:
M=“W” means S-VOL is suspended with R/W enabled through the pairsplit.
M=“-” means S-VOL is suspended with Read only through the pairsplit.

– For S-VOL and “SSUS”state:
M=“W” means S-VOL has been altered since entering SSUS state.
M=“-” means S-VOL has NOT been altered since entering SSUS state.

– For “COPY/RCPY/PAIR/PSUE” state:
M=“N” shows that its volume are Read-disabled through the paircreate ‘-m noread’.

From Secondary server:
secserv# pairdisplay -I22 -g TESTGROUP -fcx

2. Setting up initial pair

After pairing up primary and secondary devices, primary devs are read-write available whereas secondary servers are write-disable. Before setting up initial pair, seconday devices must not be in use on remote servers.

From Primary server:
primserv# paircreate -I11 -g TESTGROUP -vl -f never
-vl -> use local devs are primary
-f never -> don’t use any sort of fencing
primserv# pairdisplay -I11 -g TESTGROUP -fcx
Group PairVol(L/R) (Port#,TID, LU),Seq#,LDEV#.P/S,Status,Fence, %,P-LDEV# M
TESTGROUP dev_1(L) (CL1-H-3,52, 477)1111 A111.P-VOL PAIR NEVER , 100 A111 –
TESTGROUP dev_1(R) (CL1-E-2,16, 390)2222 A222.S-VOL PAIR NEVER , 100 A222 –
TESTGROUP dev_2(L) (CL1-H-3,52, 478)1111 B111.P-VOL PAIR NEVER , 100 B111 –
TESTGROUP dev_2(R) (CL1-E-2,16, 391)2222 B222.S-VOL PAIR NEVER , 100 B222 –

From Secondary server:
secserv# paircreate -I22 -g TESTGROUP -vr -f never
-vr -> use remote devs as primary

3. Splitting the replication (relationship stays but no updates are being sent)

Splitting the replication is same suspending the replication which means no updates are being sent from PVOL to SVOL, but both of them are still in relationship. PVOL was RW prior to split and remains RW even after split, SVOL was WD prior to split and will either stay WD or become RW after split depending upon what parameters were given while splitting.

From Primary server:
primserv# pairsplit -I11 -g TESTGROUP => SVOL will remain WD
primserv# pairdisplay -I11 -g TESTGROUP -fcx
Group PairVol(L/R) (Port#,TID, LU),Seq#,LDEV#.P/S,Status,Fence, %,P-LDEV# M
TESTGROUP dev_1(L) (CL1-H-3,52, 477)1111 A111.P-VOL PSUS NEVER , 100 A111 –
TESTGROUP dev_1(R) (CL1-E-2,16, 390)2222 A222.S-VOL SSUS NEVER , 100 A222 –
TESTGROUP dev_2(L) (CL1-H-3,52, 478)1111 B111.P-VOL PSUS NEVER , 100 B111 –
TESTGROUP dev_2(R) (CL1-E-2,16, 391)2222 B222.S-VOL SSUS NEVER , 100 B222 –

primserv# pairsplit -I11 -g TESTGROUP -rw => SVOL will become RW
primserv# pairdisplay -I11 -g TESTGROUP -fcx
Group PairVol(L/R) (Port#,TID, LU),Seq#,LDEV#.P/S,Status,Fence, %,P-LDEV# M
TESTGROUP dev_1(L) (CL1-H-3,52, 477)1111 A111.P-VOL PSUS NEVER , 100 A111 W
TESTGROUP dev_1(R) (CL1-E-2,16, 390)2222 A222.S-VOL SSUS NEVER , 100 A222 –
TESTGROUP dev_2(L) (CL1-H-3,52, 478)1111 B111.P-VOL PSUS NEVER , 100 B111 W
TESTGROUP dev_2(R) (CL1-E-2,16, 391)2222 B222.S-VOL SSUS NEVER , 100 B222 –

(Note W at the end of line for PVOLs – it means split was done with -rw. If there is W at the end of SVOLs line also, it means data has changed since the split).

From Secondary server:
secserv# pairsplit -I22 -g TESTGROUP

4. Splitting the replication only for a certain device instead of all devices

You also have liberty to suspend the replication on just a single device (or devices) from the group instead of the whole group. This is primarily useful when you want to troubleshoot the performance and the impact of replication on certain disk.

From Primary server:
primserv# pairsplit -I11 -g TESTGROUP -d dev_1
primserv# pairdisplay -I11 -g TESTGROUP -fcx
Group PairVol(L/R) (Port#,TID, LU),Seq#,LDEV#.P/S,Status,Fence, %,P-LDEV# M
TESTGROUP dev_1(L) (CL1-H-3,52, 477)1111 A111.P-VOL PSUS NEVER , 100 A111 –
TESTGROUP dev_1(R) (CL1-E-2,16, 390)2222 A222.S-VOL SSUS NEVER , 100 A222 –
TESTGROUP dev_2(L) (CL1-H-3,52, 478)1111 B111.P-VOL COPY NEVER , 100 B111 –
TESTGROUP dev_2(R) (CL1-E-2,16, 391)2222 B222.S-VOL COPY NEVER , 100 B222 –

Assuming both devices were in paired state before single device split

5. Resyncing the data from primary to secondary (resuming the replication from prim to sec)

Devices were paired up initially, then the replication was suspended thereby making SVOL RW available. Now when you want to resume the replication, you want to discard the changes and copy from PVOL to SVOL (this covers both the sitation when all the devices are split or only a few devices were split):

From Primary server:
primserv# pairresync -I11 -g TESTGROUP
primserv# pairdisplay -I11 -g TESTGROUP -fcx
Group PairVol(L/R) (Port#,TID, LU),Seq#,LDEV#.P/S,Status,Fence, %,P-LDEV# M
TESTGROUP dev_1(L) (CL1-H-3,52, 477)1111 A111.P-VOL PAIR NEVER , 100 A111 –
TESTGROUP dev_1(R) (CL1-E-2,16, 390)2222 A222.S-VOL PAIR NEVER , 100 A222 –
TESTGROUP dev_2(L) (CL1-H-3,52, 478)1111 B111.P-VOL PAIR NEVER , 100 B111 –
TESTGROUP dev_2(R) (CL1-E-2,16, 391)2222 B222.S-VOL PAIR NEVER , 100 B222 –

From Secondary server:
secserv# pairresync -I22 -g TESTGROUP

6. Swapping the personality – Resyncing the data from secondary to primary (prim devs becomes sec and sec becomes prim)

Devices were paired up initially, then the replication was suspended thereby making SVOL RW available. Now when you want to resume the replication, you want to retian the changes on SVOL and copy from SVOL to PVOL. This means changing the direction of replication temporarily (copying the changes made from SVOL to PVOL and then changing the direction of replication again from PVOL to SVOL) or permanently (copying the changes made from SVOL to PVOL and leave the direction of replication as it is). Whenever the direction of replication is changed, source will become PVOL and destination will become SVOL.

There are two ways to achieve this:

Option 1: Using horcmtakeover (THIS MUST BE RUN FROM SECONDARY SERVER)

From secondary server

Before reversing the replication:

secserv# pairdisplay -I22 -g TESTGROUP -fcx
Group PairVol(L/R) (Port#,TID, LU),Seq#,LDEV#.P/S,Status,Fence, %,P-LDEV# M
TESTGROUP dev_1(L) (CL1-E-2,16, 390)2222 A222.S-VOL PAIR NEVER , 100 A222 –
TESTGROUP dev_1(R) (CL1-H-3,52, 477)1111 A111.P-VOL PAIR NEVER , 100 A111 –
TESTGROUP dev_2(L) (CL1-E-2,16, 391)2222 B222.S-VOL PAIR NEVER , 100 B222 –
TESTGROUP dev_2(R) (CL1-H-3,52, 478)1111 B111.P-VOL PAIR NEVER , 100 B111 –

Reversing the replication:

secserv# horcmtakeover -I22 -g TESTGROUP

After reversing the replication:

secserv# pairdisplay -I22 -g TESTGROUP -fcx
Group PairVol(L/R) (Port#,TID, LU),Seq#,LDEV#.P/S,Status,Fence, %,P-LDEV# M
TESTGROUP dev_1(L) (CL1-E-2,16, 390)2222 A222.P-VOL PAIR NEVER , 100 A222 –
TESTGROUP dev_1(R) (CL1-H-3,52, 477)1111 A111.S-VOL PAIR NEVER , 100 A111 –
TESTGROUP dev_2(L) (CL1-E-2,16, 391)2222 B222.P-VOL PAIR NEVER , 100 B222 –
TESTGROUP dev_2(R) (CL1-H-3,52, 478)1111 B111.S-VOL PAIR NEVER , 100 B111 –

Option 2: Using pairresync (which either server)

From primary server:

Before reversing the replication:

primserv# pairdisplay -I11 -g TESTGROUP -fcx
Group PairVol(L/R) (Port#,TID, LU),Seq#,LDEV#.P/S,Status,Fence, %,P-LDEV# M
TESTGROUP dev_1(L) (CL1-H-3,52, 477)1111 A111.P-VOL PAIR NEVER , 100 A111 –
TESTGROUP dev_1(R) (CL1-E-2,16, 390)2222 A222.S-VOL PAIR NEVER , 100 A222 –
TESTGROUP dev_2(L) (CL1-H-3,52, 478)1111 B111.P-VOL PAIR NEVER , 100 B111 –
TESTGROUP dev_2(R) (CL1-E-2,16, 391)2222 B222.S-VOL PAIR NEVER , 100 B222 –

Reversing the replication:

primserv# pairresync -I22 -g TESTGROUP -swapp

After splitting the replication:

primserv# pairdisplay -I11 -g TESTGROUP -fcx
Group PairVol(L/R) (Port#,TID, LU),Seq#,LDEV#.P/S,Status,Fence, %,P-LDEV# M
TESTGROUP dev_1(L) (CL1-H-3,52, 477)1111 A111.S-VOL PAIR NEVER , 100 A111 –
TESTGROUP dev_1(R) (CL1-E-2,16, 390)2222 A222.P-VOL PAIR NEVER , 100 A222 –
TESTGROUP dev_2(L) (CL1-H-3,52, 478)1111 B111.S-VOL PAIR NEVER , 100 B111 –
TESTGROUP dev_2(R) (CL1-E-2,16, 391)2222 B222.P-VOL PAIR NEVER , 100 B222 –

From Secondary server:
secserv# pairresync -I22 -g TESTGROUP -swaps

7. Ceasing the replication (relationship between devices cease to exist)

You can cease the replication completely using pairsplit -S. However, the best way is to use pairsplit first and then use pairsplit -S. “pairsplit” forces all data in transit before suspending the replication. “pairsplit -S” suspends the replication drastically not destaging the data. (PS: I’ve read this in a note somewhere for shadowimage, and I myself have never tried running pairsplit -S without pairsplit. I’d rather be on safer side – split them first and then cease the replication). Both, PVOLs and SVOLs will become RW (simplex) after running this command.

From Primary server:
primserv# pairsplit -I11 -g TESTGROUP -S
primserv# pairdisplay -I11 -g TESTGROUP -fcx
Group PairVol(L/R) (Port#,TID, LU),Seq#,LDEV#.P/S,Status,Fence, %,P-LDEV# M
TESTGROUP dev_1(L) (CL1-H-3,52, 477)1111 A111.SMPL —- —— , —– —– –
TESTGROUP dev_1(R) (CL1-E-2,16, 390)2222 A222.SMPL —- —— , —– —– –
TESTGROUP dev_2(L) (CL1-H-3,52, 478)1111 B111.SMPL —- —— , —– —– –
TESTGROUP dev_2(R) (CL1-E-2,16, 391)2222 B222.SMPL —- —— , —– —– –

, , , ,

sanaswati

2 Responses to “HDS – TrueCopy Replication Commands”


  1. Fatal error: Uncaught Error: Call to undefined function ereg_replace() in /home/customer/www/sanspire.com/public_html/wp-content/themes/swatch/includes/theme-comments.php:63 Stack trace: #0 /home/customer/www/sanspire.com/public_html/wp-content/themes/swatch/includes/theme-comments.php(19): the_commenter_link() #1 /home/customer/www/sanspire.com/public_html/wp-includes/class-walker-comment.php(179): custom_comment(Object(WP_Comment), Array, 1) #2 /home/customer/www/sanspire.com/public_html/wp-includes/class-wp-walker.php(144): Walker_Comment->start_el('', Object(WP_Comment), 1, Array) #3 /home/customer/www/sanspire.com/public_html/wp-includes/class-walker-comment.php(139): Walker->display_element(Object(WP_Comment), Array, '5', 0, Array, '') #4 /home/customer/www/sanspire.com/public_html/wp-includes/class-wp-walker.php(387): Walker_Comment->display_element(Object(WP_Comment), Array, '5', 0, Array, '') #5 /home/customer/www/sanspire.com/public_html/wp-includes/comment-template.php(2225): Walker->paged_walk(Array, '5', 0, 0 in /home/customer/www/sanspire.com/public_html/wp-content/themes/swatch/includes/theme-comments.php on line 63