Friday, February 05, 2010

Creating and assigning EMC storage via CLI

If your anything like me, you hate doing mind numing work. One of the tasks I have to do regularly is provision storage from our EMC array for VMware. I found the NaviCLI reference doc and identified the commands to provision and present the storage.

Storage configuration:
To balance the need for performance, size, and rebuild time we will be creating multiple RAID5 arrays and metalun between them. For simplicity, we will limit activity into a single physical tray of disks
3* RAID5 (4+1) arrays
Each array will have 7* 150GB LUNs
The 21 LUNs will be combined into 7 metaluns (1 LUN from each array)

STEP 1: Create the Raid Group
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 createrg 60 1_3_0 1_3_1 1_3_2 1_3_3 1_3_4 -raidtype r5
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 createrg 61 1_3_5 1_3_6 1_3_7 1_3_8 1_3_9 -raidtype r5
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 createrg 62 1_3_10 1_3_11 1_3_12 1_3_13 1_3_14 -raidtype r5


STEP 2: Create the LUNs
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 bind r5 601 -rg 60 -cap 150
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 bind r5 602 -rg 60 -cap 150
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 bind r5 603 -rg 60 -cap 150
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 bind r5 604 -rg 60 -cap 150
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 bind r5 605 -rg 60 -cap 150
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 bind r5 606 -rg 60 -cap 150
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 bind r5 607 -rg 60 -cap 150
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 bind r5 611 -rg 61 -cap 150
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 bind r5 612 -rg 61 -cap 150
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 bind r5 613 -rg 61 -cap 150
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 bind r5 614 -rg 61 -cap 150
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 bind r5 615 -rg 61 -cap 150
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 bind r5 616 -rg 61 -cap 150
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 bind r5 617 -rg 61 -cap 150
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 bind r5 621 -rg 62 -cap 150
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 bind r5 622 -rg 62 -cap 150
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 bind r5 623 -rg 62 -cap 150
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 bind r5 624 -rg 62 -cap 150
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 bind r5 625 -rg 62 -cap 150
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 bind r5 626 -rg 62 -cap 150
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 bind r5 627 -rg 62 -cap 150


STEP 3: Create the MetaLUNs
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 metalun -expand -base 601 -lus 611 -lus 621 -autoassign 1 -o
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 metalun -expand -base 602 -lus 612 -lus 622 -autoassign 1 -o
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 metalun -expand -base 603 -lus 613 -lus 623 -autoassign 1 -o
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 metalun -expand -base 604 -lus 614 -lus 624 -autoassign 1 -o
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 metalun -expand -base 605 -lus 615 -lus 625 -autoassign 1 -o
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 metalun -expand -base 606 -lus 616 -lus 626 -autoassign 1 -o
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 metalun -expand -base 607 -lus 617 -lus 627 -autoassign 1 -o



STEP 4: Assign MetaLUNs to Storage Group
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 storagegroup -addhlu -gname VMware -alu 601 -hlu 0
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 storagegroup -addhlu -gname VMware -alu 602 -hlu 1
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 storagegroup -addhlu -gname VMware -alu 603 -hlu 2
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 storagegroup -addhlu -gname VMware -alu 604 -hlu 3
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 storagegroup -addhlu -gname VMware -alu 605 -hlu 4
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 storagegroup -addhlu -gname VMware -alu 606 -hlu 5
naviseccli -user emc -password emc -scope 0 -h tkj2506ds01 storagegroup -addhlu -gname VMware -alu 607 -hlu 6

No comments: