Creating a Lab Setup to Demo SnapVault and SnapMirror in a 4 Cluster Environment

Brief

Demonstrate a Primary & Secondary site setup which has:
1) Primary Cluster 1 --SnapVault--> Primary Cluster 2 (SV) (@0:20)
2) Primary Cluster 1 --SnapMirror--> Secondary Cluster 1 (@:00,:30)
3) Primary Cluster 2 (SV) --SnapMirror--> Secondary Cluster 2 (SV) (@0:25)

Snapshot Retention on Cluster 1 volumes is:
24 hourly (@:05)
31 daily (@0:10)
1 monthly (1@0:15)

Snapshot Retention on Cluster 2’s (SnapVault) volumes is:
31 daily (@0:10)
12 monthly (1@0:15)

This needs to be an active, living and breathing setup, which has the look and feel of mature relationship with 1 year worth of retention in the vault.

Lab Environment

Note: The Clusters; Licenses; SVMs (CIFS only); Cluster and Vserver peering; CIFS servers ... have already been setup!

Clusters       SVMs
========       ====
PRICLU1        PRICLU1V1
PRICLU2 (SV)   PRICLU2V1
SECCLU1        SECCLU1V1
SECCLU2 (SV)   SECCLU2V1

Test Data

Volume:
v_PKD --mounted@-- /v_PKD

Qtrees:
q_PKD_PDF --mounted@-- /v_PKD/q_PKD_PDF
q_PKD_Other --mounted@-- /v_PKD/q_PKD_Other

Folders:
LIT --in-- /v_PKD/q_PKD_Other/LIT
RTF --in-- /v_PKD/q_PKD_Other/RTF
TXT --in-- /v_PKD/q_PKD_Other/TXT

Shares:
v_PKD$ @ /v_PKD
PKD_PDF$ @ /v_PKD/q_PKD_PDF
PKD_Other$ @ /v_PKD/q_PKD_Other
PKD_LIT$ @ /v_PKD/q_PKD_Other/LIT
PKD_RTF$ @ /v_PKD/q_PKD_Other/RTF
PKD_TXT$ @ /v_PKD/q_PKD_Other/TXT

Note: The test data being using to populate the filesystem - with something interesting - will become more apparent later.

Step-By-Step Demo Setup

1. Create Volumes

PRICLU1::> vol create -vserver PRICLU1V1 -volume v_PKD -aggregate aggr1 -size 10g -junction-path /v_PKD -space-guarantee none -snapshot-policy none
PRICLU2::> vol create -vserver PRICLU2V1 -volume v_PKD -aggregate aggr1 -size 10g -space-guarantee none -snapshot-policy none -type DP
SECCLU1::> vol create -vserver SECCLU1V1 -volume v_PKD -aggregate aggr1 -size 10g -space-guarantee none -snapshot-policy none -type DP
SECCLU2::> vol create -vserver SECCLU2V1 -volume v_PKD -aggregate aggr1 -size 10g -space-guarantee none -snapshot-policy none -type DP

Note 1: We add the Snapshot Policy to the RW (Read Write and not DP) volume later.
Note 2: DP Volumes cannot be mounted until after SnapMirror Initialize has completed - we do this later.

2. Create Qtrees on PRICLU1V1

PRICLU1::> volume qtree create -vserver PRICLU1V1 -volume v_PKD -qtree q_PKD_PDF
PRICLU1::> volume qtree create -vserver PRICLU1V1 -volume v_PKD -qtree q_PKD_Other

3. Create Shares on PRICLU1V1 - Part I

PRICLU1::> vserver cifs share create -vserver PRICLU1V1 -share-name v_PKD$ -path /v_PKD                                                                         
PRICLU1::> vserver cifs share create -vserver PRICLU1V1 -share-name PKD_PDF$ -path /v_PKD/q_PKD_PDF
PRICLU1::> vserver cifs share create -vserver PRICLU1V1 -share-name PKD_Other$ -path /v_PKD/q_PKD_Other

4. Populate v_PKD

Now it becomes apparent why PKD - it was the only interesting and safe set of data to hand that’s not just a load of boring PDFs!

Using a Windows Client:
i. Connect to \\PRICLU1V1\v_PKD$
ii. Create the folders LIT, RTF, and TXT in \\PRICLU1V1\v_PKD$\q_PKD_Other
iii. Populate \\PRICLU1V1\v_PKD$\q_PKD_PDF with the dataset “Books by Phillip K Dick in PDF format”
iv. Populate \\PRICLU1V1\v_PKD$\q_PKD_Other\LIT “Books by Phillip K Dick in LIT format”
v. Populate \\PRICLU1V1\v_PKD$\q_PKD_Other\RTF “Books by Phillip K Dick in RTF format”
vi. Populate \\PRICLU1V1\v_PKD$\q_PKD_Other\TXT “Books by Phillip K Dick in TXT format”

5. Create Shares on PRICLU1V1 - Part II

This had to wait for the folders to be created in (4).

PRICLU1::> vserver cifs share create -vserver PRICLU1V1 -share-name PKD_LIT$ -path /v_PKD/q_PKD_Other/LIT
PRICLU1::> vserver cifs share create -vserver PRICLU1V1 -share-name PKD_RTF$ -path /v_PKD/q_PKD_Other/RTF
PRICLU1::> vserver cifs share create -vserver PRICLU1V1 -share-name PKD_TXT$ -path /v_PKD/q_PKD_Other/TXT

6. Create Cron Schedules

These are the non-overlapping cron schedules we need (hourly and daily are default):

hourly @:05
daily @0:10
monthly 1@0:15
sv0020 @0:20
sm30mins @:00,:30
smDailySV @0:25

cron create monthly -day 1 -hour 0 -minute 15
cron create sv0020 -hour 0 -minute 20
cron create sm30mins -minute 00,30
cron create smDailySV -hour 0 -minute 25

Create these on all 4 clusters (they will not be used on all four clusters.)

7. Create a SnapVault Policy

31 with snapmirror-label daily
12 with snapmirror-label monthly

We create a SnapMirror policy on the SnapVault cluster, and create the policy for the Cluster (admin type) Vserver, so that it can be used with different data SVMs.

PRICLU2::> snapmirror policy create -vserver PRICLU2 -policy sv003112
PRICLU2::> snapmirror policy add-rule -vserver PRICLU2 -policy sv003112 -snapmirror-label daily -keep 31
PRICLU2::> snapmirror policy add-rule -vserver PRICLU2 -policy sv003112 -snapmirror-label monthly -keep 12

8. Setup SnapVault

PRICLU2::> cron create smDailySV -hour 0 -minute 25
PRICLU2::> snapmirror create -source-path PRICLU1V1:v_PKD -destination-path PRICLU2V1:v_PKD -type XDP -schedule smDailySV -policy sv003112
PRICLU2::> snapmirror initialize -destination-path PRICLU2V1:v_PKD

Note: The SnapVault needs to be initialized before we create Snapshots. If we’d initialized the SnapVault after creating historical snapshots, the SnapVault policy would bring nothing across. SnapVault only acts on those snapshots created after initialization.

9. Create Historical Snapshots

We want these snapshots on v_PKD so that we have the 0 hourly/ 31 daily/ 12 monthly on PRICLU2 after setting up the SnapVault. We later delete snapshots on PRICLU1 to get the non-SnapVault retention of 24 hourly/ 31 daily/ 1 monthly.

The script below creates:
24 hourly (@:05) / 31 daily (@0:10) / 12 monthly (1@0:15)

The date is currently 22/06/2014 and it’s nearly 15:00!

snapshot create -snapshot monthly.2013-07-01.0015 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label monthly
snapshot create -snapshot monthly.2013-08-01.0015 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label monthly
snapshot create -snapshot monthly.2013-09-01.0015 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label monthly
snapshot create -snapshot monthly.2013-10-01.0015 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label monthly
snapshot create -snapshot monthly.2013-11-01.0015 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label monthly
snapshot create -snapshot monthly.2013-12-01.0015 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label monthly
snapshot create -snapshot monthly.2014-01-01.0015 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label monthly
snapshot create -snapshot monthly.2014-02-01.0015 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label monthly
snapshot create -snapshot monthly.2014-03-01.0015 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label monthly
snapshot create -snapshot monthly.2014-04-01.0015 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label monthly
snapshot create -snapshot monthly.2014-05-01.0015 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label monthly

snapshot create -snapshot daily.2014-05-22.0010 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label daily
snapshot create -snapshot daily.2014-05-23.0010 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label daily
snapshot create -snapshot daily.2014-05-24.0010 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label daily
snapshot create -snapshot daily.2014-05-26.0010 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label daily
snapshot create -snapshot daily.2014-05-27.0010 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label daily
snapshot create -snapshot daily.2014-05-28.0010 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label daily
snapshot create -snapshot daily.2014-05-29.0010 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label daily
snapshot create -snapshot daily.2014-05-30.0010 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label daily
snapshot create -snapshot daily.2014-05-31.0010 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label daily
snapshot create -snapshot daily.2014-06-01.0010 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label daily

snapshot create -snapshot monthly.2014-06-01.0015 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label monthly

snapshot create -snapshot daily.2014-06-02.0010 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label daily
snapshot create -snapshot daily.2014-06-03.0010 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label daily
snapshot create -snapshot daily.2014-06-04.0010 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label daily
snapshot create -snapshot daily.2014-06-05.0010 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label daily
snapshot create -snapshot daily.2014-06-06.0010 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label daily
snapshot create -snapshot daily.2014-06-07.0010 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label daily
snapshot create -snapshot daily.2014-06-08.0010 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label daily
snapshot create -snapshot daily.2014-06-09.0010 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label daily
snapshot create -snapshot daily.2014-06-10.0010 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label daily
snapshot create -snapshot daily.2014-06-11.0010 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label daily
snapshot create -snapshot daily.2014-06-12.0010 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label daily
snapshot create -snapshot daily.2014-06-13.0010 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label daily
snapshot create -snapshot daily.2014-06-14.0010 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label daily
snapshot create -snapshot daily.2014-06-15.0010 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label daily
snapshot create -snapshot daily.2014-06-16.0010 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label daily
snapshot create -snapshot daily.2014-06-17.0010 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label daily
snapshot create -snapshot daily.2014-06-18.0010 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label daily
snapshot create -snapshot daily.2014-06-19.0010 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label daily
snapshot create -snapshot daily.2014-06-20.0010 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label daily
snapshot create -snapshot daily.2014-06-21.0010 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label daily

snapshot create -snapshot hourly.2014-06-21.1505 -volume v_PKD -vserver PRICLU1V1
snapshot create -snapshot hourly.2014-06-21.1605 -volume v_PKD -vserver PRICLU1V1
snapshot create -snapshot hourly.2014-06-21.1705 -volume v_PKD -vserver PRICLU1V1
snapshot create -snapshot hourly.2014-06-21.1805 -volume v_PKD -vserver PRICLU1V1
snapshot create -snapshot hourly.2014-06-21.1905 -volume v_PKD -vserver PRICLU1V1
snapshot create -snapshot hourly.2014-06-21.2005 -volume v_PKD -vserver PRICLU1V1
snapshot create -snapshot hourly.2014-06-21.2105 -volume v_PKD -vserver PRICLU1V1
snapshot create -snapshot hourly.2014-06-21.2205 -volume v_PKD -vserver PRICLU1V1
snapshot create -snapshot hourly.2014-06-21.2305 -volume v_PKD -vserver PRICLU1V1
snapshot create -snapshot hourly.2014-06-22.0005 -volume v_PKD -vserver PRICLU1V1

snapshot create -snapshot daily.2014-06-22.0010 -volume v_PKD -vserver PRICLU1V1 -snapmirror-label daily

snapshot create -snapshot hourly.2014-06-22.0105 -volume v_PKD -vserver PRICLU1V1
snapshot create -snapshot hourly.2014-06-22.0205 -volume v_PKD -vserver PRICLU1V1
snapshot create -snapshot hourly.2014-06-22.0305 -volume v_PKD -vserver PRICLU1V1
snapshot create -snapshot hourly.2014-06-22.0405 -volume v_PKD -vserver PRICLU1V1
snapshot create -snapshot hourly.2014-06-22.0505 -volume v_PKD -vserver PRICLU1V1
snapshot create -snapshot hourly.2014-06-22.0605 -volume v_PKD -vserver PRICLU1V1
snapshot create -snapshot hourly.2014-06-22.0705 -volume v_PKD -vserver PRICLU1V1
snapshot create -snapshot hourly.2014-06-22.0805 -volume v_PKD -vserver PRICLU1V1
snapshot create -snapshot hourly.2014-06-22.0905 -volume v_PKD -vserver PRICLU1V1
snapshot create -snapshot hourly.2014-06-22.1005 -volume v_PKD -vserver PRICLU1V1
snapshot create -snapshot hourly.2014-06-22.1105 -volume v_PKD -vserver PRICLU1V1
snapshot create -snapshot hourly.2014-06-22.1205 -volume v_PKD -vserver PRICLU1V1
snapshot create -snapshot hourly.2014-06-22.1305 -volume v_PKD -vserver PRICLU1V1
snapshot create -snapshot hourly.2014-06-22.1405 -volume v_PKD -vserver PRICLU1V1

10. Update the SnapVault

PRICLU2::> snapmirror update -destination-path PRICLU2V1:v_PKD

11. Delete v_PKD Snapshots Not Required on Production Cluster

The Production Cluster (PRICLU1) should have 24 hourly/ 31 daily/ 1 monthly.

snapshot delete -snapshot monthly.2013-07-01.0015 -volume v_PKD -vserver PRICLU1V1
snapshot delete -snapshot monthly.2013-08-01.0015 -volume v_PKD -vserver PRICLU1V1
snapshot delete -snapshot monthly.2013-09-01.0015 -volume v_PKD -vserver PRICLU1V1
snapshot delete -snapshot monthly.2013-10-01.0015 -volume v_PKD -vserver PRICLU1V1
snapshot delete -snapshot monthly.2013-11-01.0015 -volume v_PKD -vserver PRICLU1V1
snapshot delete -snapshot monthly.2013-12-01.0015 -volume v_PKD -vserver PRICLU1V1
snapshot delete -snapshot monthly.2014-01-01.0015 -volume v_PKD -vserver PRICLU1V1
snapshot delete -snapshot monthly.2014-02-01.0015 -volume v_PKD -vserver PRICLU1V1
snapshot delete -snapshot monthly.2014-03-01.0015 -volume v_PKD -vserver PRICLU1V1
snapshot delete -snapshot monthly.2014-04-01.0015 -volume v_PKD -vserver PRICLU1V1
snapshot delete -snapshot monthly.2014-05-01.0015 -volume v_PKD -vserver PRICLU1V1

12. Snapshot Policy

PRICLU1::> snapshot policy create -policy sn243101 -vserver PRICLU1 -schedule1 hourly -count1 24 -schedule2 daily -count2 31 -schedule3 monthly -count3 1 -enabled true
PRICLU1::> vol modify -vserver PRICLU1V1 -volume v_PKD -snapshot-policy sn243101

13. Setup SnapMirrors

SECCLU1::> snapmirror create -source-path PRICLU1V1:v_PKD -destination-path SECCLU1V1:v_PKD -type DP -schedule sm30mins
SECCLU1::> snapmirror initialize -destination-path SECCLU1V1:v_PKD

SECCLU2::> snapmirror create -source-path PRICLU2V1:v_PKD -destination-path SECCLU2V1:v_PKD -type DP -schedule smDailySV
SECCLU2::> snapmirror initialize -destination-path SECCLU2V1:v_PKD

14. Create shares to Read-Only Volumes

Repeat on PRICLU2V1, SECCLU1V1, and SECCLU2V2, replacing the vserver name as required:

vol mount -volume v_PKD   -vserver PRICLU2V1 -junction-path /v_PKD
vserver cifs share create -vserver PRICLU2V1 -share-name v_PKD$ -path /v_PKD                                                                         
vserver cifs share create -vserver PRICLU2V1 -share-name PKD_PDF$ -path /v_PKD/q_PKD_PDF
vserver cifs share create -vserver PRICLU2V1 -share-name PKD_Other$ -path /v_PKD/q_PKD_Other
vserver cifs share create -vserver PRICLU2V1 -share-name PKD_LIT$ -path /v_PKD/q_PKD_Other/LIT
vserver cifs share create -vserver PRICLU2V1 -share-name PKD_RTF$ -path /v_PKD/q_PKD_Other/RTF
vserver cifs share create -vserver PRICLU2V1 -share-name PKD_TXT$ -path /v_PKD/q_PKD_Other/TXT

THE END

Comments