Storage Provisioning on exiting DR critical server  (SRDF REPLICATION SETUP)

To run below script you must save the content in a file on your unix based storege management server and then change the persmision of file to allow execution of the script, post that you can run it like any other unix script using ./filename method

#############VMAX3/AFA Allocation with replication on exiting replication group################
##############Script Version 1####################################
##############Scripted by Dinesh Punyani##########################
#!/bin/sh
echo “############################################”
echo “#### THIS SCRIPT WILL CREATE NEW LUNS FOR DR CRITICAL SERVER, SETUP R1-R2 RELATIONSHIP SYNC SOURCE AND TARGET LUNS ON EXISTING RDFG GROUP,REPLICATION TYPE IS ASYNC #####”
#Get the Source and Target Frame, LUN Size and server name, RDFG number
echo “NOTE: PLEASE MAKE SURE YOU RUN THIS SCRIPT FROM SOURCE MANAGEMENT SERVER. EXAMPLE IF SOURCE SERVER IS IN DALLAS THEN RUN THIS SCRIPT FROM DALLAS STORAGE MANAGEMENT SERVER.”
echo “Please enter the WorkOrder/Task/Ticket number:”
read ticket
{
echo $ticket
date
pwd
whoami

echo “Hi `whoami`, Please enter the Source Storage (R1) SID last 4 digits:”
read sid_local
echo “Please enter the Target Storage (R2) SID last 4 digits:”
read sid_remote
echo “Please enter Primary Source(R1) server name:”
read l_server
echo “Please enter Target (R2) server name:”
read r_server
echo “Please enter the size of LUN in CYL or GB to be created (Example 100 GB or 109228 CYL):”
read size
echo “How many LUNs of $size need to be added on Primary(R1) $l_server:”
read count
echo “!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!”
symcfg -sid $sid_local list -rdfg all
echo “Please provide the RDFG replciation group number in decimal for Primary(R1) to replicate from Local $sid_local to target $sid_remote:”
read rdfg
echo “!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!”
echo “Requested Local sid $sid_local, Remote sid $sid_remote , Local Server $l_server , Remote Server $r_server, LUN SIZE $size , Number of LUN: $count, RA Group $rdfg”

symaccess -sid $sid_local list -type storage | grep -i $l_server >/home/dinesh/scripts/logs/sg_avail_local
symaccess -sid $sid_remote list -type storage | grep -i $r_server >/home/dinesh/scripts/logs/sg_avail_remote

if [[ -z “$(</home/dinesh/scripts/logs/sg_avail_local)” ]]
then
{
echo “No storage group found for this $l_server on Primary R1 storage frame $sid_local and hence exiting the script.”; exit
}
else
{
echo “Listed storage groups available for $l_server on Primary R1 storage frame $sid_local, please confirm which SG needs to be used: $(</home/dinesh/scripts/logs/sg_avail_local)” >>/home/dinesh/scripts/logs/$ticket.log
echo “Listed storage groups available for $l_server on Primary R1 storage frame $sid_local, please confirm which SG needs to be used:
$(</home/dinesh/scripts/logs/sg_avail_local)”
}
fi

echo “Please enter Primary(R1) SG Name:”
read sg_local

if [[ -z “$(</home/dinesh/scripts/logs/sg_avail_remote)” ]]
then
{
echo “No storage group found for this $r_server on Target R2 storage frame $sid_remote and hence existing the script.”; exit
}
else
{
echo “Listed storage groups available for $r_server on Target R2 storage frame $sid_remote, please confirm which SG needs to be used for R2: $(</home/dinesh/scripts/logs/sg_avail_remote)” >>/home/dinesh/scripts/logs/$ticket.log
echo “Listed storage groups available for $r_server on Target R2 storage frame $sid_remote, please confirm which SG needs to be used for R2:
$(</home/dinesh/scripts/logs/sg_avail_remote)”
}
fi
echo “Please enter Target(R2) SG Name:”
read sg_remote
echo ” !!!!! List of LUNs in Primary SG $sg_local !!!!!! ”
symaccess -sid $sid show $sg_local -type storage
echo ” !!!!! List of LUNs in remote SG $sg_remote !!!!!! ”
symaccess -sid $sid_remote show $sg_remote -type storage
echo “#############################################################”
echo “Script is creating $count LUNs of $size on VMAX-$sid_local and will be replicating on RDFG group $rdfg . Replication direction will be from VMAX-$sid_local –> VMAX-$sid_remote .Verify the input you provided is correct, If information is incorrect then press clt+c to exit.”
########VMAX LUN Creation and Replication (R1–>R2) setup command########
echo “###############################################################”
echo “Disabling consistency and Changing the mode of DG$rdfg on Replication group $rdfg to ACP_DISK MODE”

symrdf -g DG$rdfg query >>/home/dinesh/scripts/logs/$ticket.log
symrdf -g DG$rdfg query
symrdf -g DG$rdfg disable -nop
symrdf -g DG$rdfg set mode acp_disk -nop
echo “###############################################################”
symconfigure -sid $sid_local -cmd “create dev count=$count , size=$size , dynamic_capability=DYN_RDF, emulation=FBA,config=RDF1+TDEV, remote_config=RDF2+TDEV, ra_group=$rdfg,sg=$sg_local, remote_sg=$sg_remote;” -v commit -nop

cat /home/dinesh/scripts/logs/$ticket.log| grep -i “New symdev”
cat /home/dinesh/scripts/logs/$ticket.log| grep -i “New remote”

echo “Please enter the new R1 SYMDEV to be added to DG$rdfg:”
read r1

echo “Adding new R1 LUNs $r1 to DG$rdfg”
symdg -g DG$rdfg addall -devs $r1

echo “Enabling consistency and Changing the mode of DG$rdfg on Replication group $rdfg to ASYNC MODE”
symrdf -g DG$rdfg set mode async -nop
symrdf -g DG$rdfg enable -nop
symrdf -g DG$rdfg query

echo “###############################################################”
} | tee /home/dinesh/scripts/logs/$ticket.log

Advertisements

Storage Provisioning on exiting NON-DR critical server  (NO REPLICATION SETUP)

To run below script you must save the content in a file on your unix based storege management server and then change the persmision of file to allow execution of the script, post that you can run it like any other unix script using ./filename method

#########Script for LUN Allocation on VMAX-3/AFA without Replication######
##############Script Version 1############################################
##############Scripted by Dinesh Punyani##################################
#!/bin/sh
echo “############################################”
echo “#### THIS SCRIPT WILL CREATE NEW LUNS FOR NON-DR CRITICAL SERVER#####”
#Get the Source and Target Frame, LUN Size and server name, RDFG number from stor-ops
echo “NOTE: PLEASE MAKE SURE YOU RUN THIS SCRIPT FROM SOURCE MANAGEMENT SERVER. EXAMPLE IF SOURCE SERVER IS IN DALLAS THEN RUN THIS SCRIPT FROM DALLAS STORAGE MANAGEMENT SERVER.”
#Get the Frame, LUN Size and server name
echo “Please enter the WorkOrder/Task/Ticket number:”
read ticket
{
echo $ticket
date
pwd
whoami
echo “Hi `whoami`, Please enter the Source Storage SID last 4 digits:”
read sid
echo “Please enter the size of LUN in CYL or GB to be created (Example 100 GB or 109228 CYL):”
read size
echo “How many LUNs of $size you need:”
read count
echo “Name of the server”
read server
symaccess -sid $sid list -type storage | grep -i $server >/home/dinesh/scripts/logs/sg_avail
if [[ -z “$(</home/dinesh/scripts/logs/sg_avail)” ]]
then
{
echo “No storage group found for this $server and hence existing the script.”; exit
}
else
{
echo “Listed storage groups available for $server, please confirm which SG needs to be used:
$(</home/dinesh/scripts/logs/sg_avail)”
}
fi
echo “Please enter the SG Name:”
read sg_local
echo “!!!!!!!! Storage group $sg_local have below LUNs currently !!!!!!!!”
echo “!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!”
symaccess -sid $sid -type storage show $sg_local
echo “Script is creating $count LUNs of $size on VMAX-$sid and adding LUNs in $sg_local . Verify the input you provided is correct, If information is incorrect then press clt+c to exit.”
########VMAX LUN Creation command########
echo “!!!!!! Executing LUN creation and Commiting VMAX Changes !!!!!!!”
echo “!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!”
symconfigure -sid $sid -cmd “create dev count=$count , size=$size, emulation=FBA, config=TDEV, sg=$sg_local;” -v commit -nop
echo “!!!!!! Storage group $sg_local have below LUNs after new provisioning !!!!!!”
echo “!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!”
symaccess -sid $sid -type storage show $sg_local
echo “You can find symdev list (Lun details) that is generated from this script in /home/dinesh/scripts/logs/$ticket.log
} | tee /home/dinesh/scripts/logs/$ticket.log

 
Introduction:
Physical link for replication between source and target storage frames is available, Remote Management tables between source and target frames are up to date.. You need create a new dynamic RDFG or replication group between the frames and setup the replication for one or more
SYMDEV: AAAA(Source) and BBBB(Target) Lun.
Assumption:
Source RE Ports: 8G:0,10G:0
Remote RE Ports: 1E:24,2E:24
RDFG Group number: 100 (we will be using same number for local and remote arrays but you can use different if you want)
RDFG Group label:  SRDF-GRP01
Source Device to be added: AAAA
Target Device to be added: BBBB
Source SID: YYYY
Target SID: ZZZZ
Device Group Name: DG100

Steps to be followed:
 
1.       Create a new RA pair or Dynamic RDFG group between source and target using required RE. RE ports are used for remote replication or for SRDF based migration purpose only.
symrdf -sid YYYY -dir 8G:0,10G:0 -rdfg 100 -remote_sid ZZZZ -remote_dir 1E:24,2E:24 -remote_rdfg 100 -label SRDF-GRP01 addgrp

2.       Check the group is created successfully on local and remote storage frames:
symcfg -sid YYYY list -rdfg all
symcfg -sid ZZZZ list -rdfg all

You can also run SRDF ping from source for target SID to confirm that physical link between local and remote storage frames is working fine.
symrdf -sid ZZZZ ping

3.       Create a new pair file and add the R1/R2 Entries in that file. Save the file.
TempPair.txt
#R1 R2
AAAA BBBB

4.       Create pair for new devices to be added.
symrdf createpair -sid YYYY -f TempPair.txt -type RDF1 -rdfg 100 -invalidate R2

Be careful before running above steps, be sure you are selecting right source SID, if by any chance you use remote SID then all data on source (R1) devices will get over written by zero tracks of target (R2).

5.       Create a new device group 
Symdg create DG100 –type rdf1

6.       Lable the new device
symdg -g DG100 add dev AAAA DEV010

7.       Run a Full establish
symrdf -g DG100 establish -full DEV010

8.       Set the device group to Async mode once the group is under 30000 Tracks
symrdf -g DG100 set mode async
 
9.       To check the replication status run below command
Symrdf –g DG100 query

Introduction:
SRDF Async session is running on DG100. you need t0 add 1 more SYMDEV: AAAA(Source) and BBBB(Target) Lun in existing session.

 

Assumption:

Source Device to be added: AAAA

Target Device to be added: BBBB

Target/Remote BCV: CCCC

Source SID: YYYY

Device Group No.: 100

Device Group Name: DG100

 

Steps to be followed:

1: Disable the consistency on existing SRDF group that need to be modified by below command.

symrdf -g DG100 disable

2: Split the existing group:

symrdf -g DG100 split

3: Device group needs to be set to adaptive copy mode

symrdf -g DG100 set mode acp_disk

4: Create a new pair file and add the R1/R2 Entries in that file. Save the file.

TempPair.txt
#R1 R2
AAAA BBBB

5: Create pair for new devices to be added.

symrdf createpair -sid YYYY -f TempPair.txt -type RDF1 -rdfg 100 -invalidate R2

6: Lable the new device

symdg -g DG100 add dev AAAA DEV010

7. Run a Full establish

symrdf -g DG100 establish -full DEV010

8. Set the device group to Async mode once the group is under 30000 Tracks

symrdf -g DG100 set mode async

If you have remote BCV devices in your setup then you can follow the below mentioned additional steps.

9. Create Remote BCV relationship

symbcv -sid YYYY -g DG100 -rdf associate dev CCCC RBCV010

10. Run Full establish

symmir -g DG100 establish -full DEV010

Introduction:

This Document explains new zone creation for Server to Storage ports on CISCO MDS SAN Switches.

Assumptions:

This document assumes you have a detailed knowledge of SAN Infrastructure and knowledge of

CISCO NX-OS commands. This document is for SAN Infrastructure administrators use only.

Server HBA1 wwn: aa:aa:aa:aa:aa:aa:aa:aa

Storage FA-1 port wwn: bb:bb:bb:bb:bb:bb:bb:bb

Active VAN:  VSAN 10 (here we want to update configuration of VSAN 10 on MDS switch)

Active zoneset name: ZS_MDS_VSAN10

 

Zoning Steps:

1. Login to Primary SAN Switch and take configuration backup.

    copy running-config tftp://yourftpserver/mdsbackup.txt

Optionally we can also run supportsave command before the activity to save the switch logs.

    show tech-support 

2. Create FC alias name for Server HBA wwn and Storage Port wwn.

To create alias for Server HBA

    fcalias name SERVER_HBA1 vsan 10

Add server wwn as member of FC alias

     member pwwn aa:aa:aa:aa:aa:aa:aa:aa

To create alias for Storage FA ports

     fcalias name STORAGE_FA1 vsan 10

Add storage wwn as member of FC alias

     member pwwn bb:bb:bb:bb:bb:bb:bb:bb

3.Create server to storage port zone on SAN switch and add server/storage port alias in zone.

To create zone

    zone name ZONE_SERVER01_STORAGE_FA1 vsan 10

    To add server alias as member in newly created zone

    member fcalias SERVER_HBA1

    To add storage alias as member in newly created zone

    member fcalias STORAGE_FA1

4.Check existing active configuration name for required VSAN

   show zoneset active

   Assume existing active switch configuration name is ZS_MDS_VSAN10

5. Add newly created zone in to exiting Active zoneset configuration of SAN Switch.

    zoneset name ZS_MDS_VSAN10 vsan 10

    member ZONE_SERVER01_STORAGE_FA1

6. Update and Save the zoneset configuration by below command

    zoneset activate name ZS_MDS_VSAN10 vsan 10

7. Check difference between existing configuration and new configuration with below command to confirm that you are adding only required zones.

   show zone pending-diff

   If difference reflected in above command is correct then commit the changes with below command.

   zone commit vsan 10

8. Save the configuration to NVRAM .

    copy running to startup

Brocade Switches SAN Zoning for New Servers

Introduction:
This Document explains new zone creation for Server to Storage ports.

Assumptions:
This document assumes you have a detailed knowledge of SAN Infrastructure and knowledge of
Brocade Fabric Operating System commands. This document is for SAN Infrastructure administrators use only.

Server HBA1 wwn: aa:aa:aa:aa:aa:aa:aa:aa
Storage FA1 port wwn: bb:bb:bb:bb:bb:bb:bb:bb

Zoning Steps:

1. Login to Primary SAN Switch and take configuration backup of entire Fabric.

configupload –all –p –ftp

Optionally we can also run supportsave command before the activity.

supportsave

2. Create alias name for Server HBA wwn and Storage Port wwn.
To create alias for Server HBA
alicreate “Server_HBA1”, “aa:aa:aa:aa:aa:aa:aa:aa”

To create alias for Storage FA ports
alicreate “Storage_FA1”, ”bb:bb:bb:bb:bb:bb:bb:bb”

3. Create server to storage port zone on SAN switch and add server/storage port alias in zone.
zonecreate “Zone_Server_HBA1_FA1”, “Server_HBA1; Storage_FA1”

4. Check existing active configuration name of SAN Switch
switchstatusshow |grep z

Or

cfgactiveshow |more

Assume existing active switch configuration name is CFG_DCX_A

5. Add newly created zone in to exiting Active configuration of SAN Switch.

cfgadd “CFG_DCX_A”, “Zone_Server_HBA1_FA1”

6. Update and Save the configuration by below command

cfgsave

7. Enable active configuration

cfgenable CFG_DCX_A

8. Check and confirm that zone is updated in effective configuration

cfgactvshow |grep “Zone_Server_HBA1_FA1”

Welcome Aboard !!!

Posted: November 21, 2011 in Uncategorized

Welcome to DineshPunyani.WordPress.com.

  • WHY THIS BLOG ?
    I wanted to keep my documents to a location which can be easily accessible. So thought of keeping documents on this Blog.
  • WHAT DOCUMENTS ?
    I am a SAN Storage Guy in IT Industry and have multipe documents that i keep for references. Some of these documents are Downloaded from support sites, Some of Documents are given to me by my Superiors and Few of them are self created after self studies.
    .