Você está na página 1de 4

Symmetrix LUN Allocation

September 17, 2010


Hi All, I hope you guys and gals had wonderful festive days (Both Ramazon and Ganesha Chaturthi). It was long time since I wrote here. In todays article, I will write about Symmetrix LUN allocation from A-Z. I hope this blog would help you all to understand the complete allocation steps.

THIS BLOG IS DEDICATED TO MY TEACHER, MENTOR AND BEST PAL MOHAN SIR(KMB.MOHAN@GMAIL.COM)
If you want to learn SAN. Go ahead and start troubling him to teach you(Dont say that I told to do so)

MINIMUM REQUIREMENTS:
1. 2. Knowledge on Basic Symmetrix Architecture Operating systems knowledge

3.

and a test Symmetrix, hosts to try

So, my style of writing (of-course I learnt it from Mohan Sir) will be in terms of steps. Because I believe that writing in steps will help us to remember and understand quickly. I will be using Symmetrix Command Line (SymCLI) to allocate LUNs. Let me stop the blah blah and start the blog!

SYMMETRIX ALLOCATION STEPS


STEP 1: CREATE SYMMETRIX DEVICES FROM THE FREE SPACE.
To create a symmetrix device, first we need to know what type of device we need to create. For example, RAID-5, RAID-1 etc Im going to write both the commands. To start with, we need to create a simple text file and add the below line to the file. filename: raid1.txt

CREATE DEV COUNT=XX, SIZE=17480, EMULATION=FBA, CONFIG=2-WAY-MIR, DISK_GROUP=X;


Command Explanation: dev count=xx (replace xx with the number of devices we need to create) emulation=FBA (FBA > Fixed Block Architecture used for Open Systems which are Solaris, HP-UC and Window$) config=2-way-mir (Configure the devices as RAID-1, one of the oldest configuration available in all symmetrix models) disk_group=x (disk groups are created to differentiate the tiers, performance and capacity. Based on the requirements, we can select the desired disk group number to create the new symmetrix devices) Once you add the above line in the text file, save it and check the syntax. To make any configuration changes in the symmetrix we need to run the below mentioned commands. Ensure that the raid1.txt file in your current working directory.

SYMCONFIGURE -SID XXXX -F RAID1.TXT PREVIEW -V SYMCONFIGURE -SID XXXX -F RAID1.TXT PREPARE -V SYMCONFIGURE -SID XXXX -F RAID1.TXT COMMIT -V
Command Explanation: symconfigure (This command used to manage major configuration changes, display capacity of symmetrix and manage dynamic (hot) spares and device reservations) -sid (Symmetrix ID, always prefix with hyphen (-) ) -f (filename, mention the file name to which well use. In this example it is raid1.txt) preview (The preview argument verifies the syntax and correctness of each individual change defined, and then terminates the session without change execution.) prepare (The prepare argument performs the preview checks and also verifies the appropriateness of the resulting configuration definition against the current state of the Symmetrix array) commit (The commit argument completes all stages and executes the changes in the specified Symmetrix array.) -V (Yes, youre right, its verbose mode)

Thats it! After running the above the commands the new devices are created. It was to create symmetrix devices from the symcli right. Let us assume that the devices IDs are 001 through 00A (devices created with hexadecimal numbers)

STEP 2: SEARCH FOR FREE LUN ID ON THE FA (FIBRE ADAPTERS)


After creating the devices, we need to map the devices to the Fibre Adapters. In legacy symmetrix, it will be SCSI Adapters (SA). IF we need to do it from ECC (EMC Control Center now called as IONIX, we need to a. Right click on the device b. Go to Configure c. Select and Click SDR Device Mapping and follow the wizard. Here Ill be writing the commands to do the same.

SYMCFG -SID XXXX LIST -AVAILABLE -ADDRESS -FA XY -P N |MORE


Command Explanation: symcfg (Discovers or displays Symmetrix configuration information) list (Lists brief or detailed information about your Symmetrix configuration.) -available -address (Requests the next available Vbus, TID, or LUN address be appended to the output list. Used with the -address option.) -fa (Confines the action to a Fibre Adapter (FA) director number) xy (x is the director number eg. 8 and y is the processor number eg. a or b) -p n (p is the port and n is the number eg. 0 or 1) Up to DMX-4 we follow the RULE-17. So repeat the command for another FA in this e.g. 9.

STEP 3: MAPPING A DEVICE TO THE FA


Now, lets assume that the LUN IDs 52 onwards are free to use on both the FAs 8a and 9a. Also, the file map.txt contains the below commands. After saving the file, we have run the symconfigure commands as shown above in Step 1. The below command will map the device 0001 to the FAs 8a:0 and 9a:0 which will have the LUN IDs 52 on the FAs.

MAP DEV 0001 TO DIR 8A:0 TARGET=0,LUN=52; MAP DEV 0001 TO DIR 9A:0 TARGET=0,LUN=52;
Command Explanation: map (map a device to fa) dev (symmetrix device ID) dir 8a (FA:port no#) target (The SCSI target ID (hex value) lun (Specifies the LUN addresses to be used for each device that is to be added for the host HBA.)

STEP 4: LUN MASKING A DEVICE TO THE FA


The last but one step is to do the LUN masking. It performs control and monitoring operations on a device masking environment. After running the below command, provides RW accessibility to the server having 2 port HBAs for the device 0001.

SYMMASK -SID XXXX -WWN 10000000C130880A -DIR 8A -P 0 ADD DEV 0001 SYMMASK -SID XXXX -WWN 10000000C131084A -DIR 9A -P 0 ADD DEV 0001
Command Explanation: symmask (Sets up or modifies Symmetrix device masking functionality.) -wwn (World Wide Name of the Host Bus Adapter (HBA) zoned with the FA) add (Adds devices to the device masking record in the database with the matching WWN)

STEP 5: UPDATE AND REFRESH THE SYMMETRIX DATABASE VCMDB (VOLUME CONTROL MANAGER DATABASE) STEPS TO PERFORM FROM THE HP-UX SERVER
The below command looks pretty simple but very important command to append all changes to the VCMDB. This will ensure and update the DB which protects the changes made the symmetrix.

SYMMASK -SID XXXX REFRESH


refresh (updates and refreshes the VCMDB) To confirm the symmetrix allocation done properly are not we can run the symcfg command as shown above in the Step 2. The output should show the LUN ID 52 being occupied by the Symmetrix device ID 0001. Hurray!! This completes the symmetrix allocation steps.

STEPS TO PERFORM FROM HP-UX SERVER


Once we finish the task from the EMC end, we need to scan for the new LUN from the operating system. First well deal with HP-UX server. The following commands needs to be executed in the same order from the server to start using the new device.

#IOSCAN -FNC DISK


The ioscan command displays a list of system disks with identifying information, location, and size.

#INSF -E
The insf command installs special files in the devices directory, normally /dev. If required, insf creates any subdirectories that are defined for the resulting special file. After running this command the new devices will be added to the /dev directory as special device file.

#POWERMT CONFIG
Configure logical devices as PowerPath devices. It will search for the EMC devices and adds it as a power path devices.

#POWERMT DISPLAY DEV=ALL


Displays configured powerpath devices. If the previous command ran successfully then we should see the new device in the output list.

#POWERMT SAVE
Save a custom PowerPath configuration. Once we see the new device in the previous command output, then we can save the power path configuation database. After the successful completion of the above steps we can use the devices. Further by using the volume managers we can add them to the existing volume group or the new volume group.

TO ALLOCATE LUNS IN V-MAX ARRAY, FOLLOWING STEPS HAS TO BE PERFORMED. (COURTESY: SANJEEV TANWAR)
1. Create a storage groups (Containing symm devices) 2. Create a port group (one or more director /port combinations) 3. Create an intitors group (one or more host wwns) 4. Creating a masking view containg the storage groups,port groups, and inititors group. When a masking view is created,the devices are automatically masked and mapped.

CREATING STORAGE GROUP #SYMACCESS CREATE -SID XXX -NAME SG1 -TYPE STORAGE DEVS 01C,03C CREATING PORT GROUP
#SYMACCESS CREATE -SID XXX -NAME PG1 -TYPE PORT -DIRPORT 6D:0,7E:1

CREATING INITITOR GROUP


txt1 conatins wwn:21000000008b090 www:21000000008c090

#SYMACCESS CREATE -SID XXX -NAME IG1 -TYPE INITITORS -FILE TXT1

CREATING A MASKING VIEW


#SYMACCESS CREATE VIEW -NAME TEST_VIEW -SG SG1 -PG PG1 -IG IG1

Você também pode gostar