Tuesday, February 27, 2018

Inserting Colon ":" for Host WWPN/Storage UID

Hope you are having trouble all the time manually adding Colon ":" in between the Host WWPN and Storage UID provided.

Don't Worry, use the below simple excel formula to Add for the respective String. With few minutes of time and formula you can convert any string easily.

Note:- String needs to be modified based on your excel cell where the actual value resides.
Ex: A1,B2 or H10


  • Formula to Add ":" between Host WWPN.
=REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(string,3,0,":"),6,0,":"),9,0,":"),12,0,":"),15,0,":"),18,0,":"),21,0,":")

Ex: Below, case I had placed my String in A1 and the respective formula in B1 pointing the string in Cell A1.


  • Formula to Add ":" between Lun UID.
=REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(string,3,0,":"),6,0,":"),9,0,":"),12,0,":"),15,0,":"),18,0,":"),21,0,":"),24,0,":"),27,0,":"),30,0,":"),33,0,":"),36,0,":"),39,0,":"),42,0,":"),45,0,":")

Ex: Below, case I had placed my String in E10 and the respective formula in A10 pointing the string in Cell E10.


Please drop your Comments if you have any queries.


Tuesday, May 16, 2017

Excel Vlookup for Multiple Parameters

Hope most of you have came across this issue. Where you failed to find the solution to find multiple values using Excel Vlookup for Multiple Parameters. Hope you are aware of the Excel Vlookup which we use to find the things in a table or a range by row. Hear the limitation is you will get only the first thing found in the table.What if you have to Multiple Values in the same row matching your search criteria. Do not Worry hear is the solution use the below macro which will help you simplify you query.

Copy the below Macro in Bold into the Macro Tab where you can find in either Developer Tab --> Macro or View Tab --> Macro just give some name and copy it into the sheet.

Option Explicit
Function Multilookup(lookupValue As Variant, lookupRange As Range, resultsRange As Range) As String

    Dim s As String 'Results placeholder
    Dim sTmp As String  'Cell value placeholder
    Dim r As Long   'Row
    Dim c As Long   'Column
    Const strDelimiter = "|||"  'Makes InStr more robust

    s = strDelimiter
    For r = 1 To lookupRange.Rows.Count
        For c = 1 To lookupRange.Columns.Count
            If lookupRange.Cells(r, c).Value = lookupValue Then
                'I know it's weird to use offset but it works even if the two ranges
                'are of different sizes and it's the same way that SUMIF works
                sTmp = resultsRange.Offset(r - 1, c - 1).Cells(1, 1).Value
                If InStr(1, s, strDelimiter & sTmp & strDelimiter) = 0 Then
                    s = s & sTmp & strDelimiter
                End If
            End If
        Next
    Next

    'Now make it look like CSV
    s = Replace(s, strDelimiter, ",")
    If Left(s, 1) = "," Then s = Mid(s, 2)
    If Right(s, 1) = "," Then s = Left(s, Len(s) - 1)

    Multilookup= s 'Return the function


End Function

Screen Shot:
a. Select the Macro Tab.


b. Give the name as shown in the screenshot and click create.


c. Copy the macro give above.

4. As shown below where i am finding the lookup value of AAAA & ACDA.
    Formula Explained as per the below Output:
     1st Value (D1) - Value you wanted to lookup (AAAA)
     2nd Value (A1:B11) - Range values where to lookup
     3rd Value (B1:B11) - Range of Return values that you need.
     Hit Enter.


5. Hear you can see it found the all possible values of AAAA and each value is seperated by Comma - ",".

You can use copy and paste special as value function to get rid of the formula and just have values and later separate them using text to columns, separated to comma to get the values in different cells. Below output where I had spread my data into multiple cells.


Please post your comments if you have any question.

Sunday, February 5, 2017

IBM SVC Vdisk Expansion

Below are the list of Pre-check, Implementation & Back out commands, which will help you to complete the Lun Expansion easy and without any effort. Do follow the procedure and feel free to post your comments in case of any queries or suggestions.

Pre-check Commands:

1. Command to check the Vdisk information in detailed, which shows the individual disk IOGrp, MdiskGrp & Other information.

svcinfo lsvdisk <Vdisk name/id>


2. Command to check the capacity of the mdiskgrp since we need free space in the mdiskgrp to move further with the expansion.

svcinfo lsmdiskgrp

Implementation Commands:

1. Command to expand the vdisk.

svctask expandvdisksize -size <size> -unit gb <vdisk name>

Note: We need to mention the capacity to be added to the existing disk for example if you want to expand a 1024 GB disk to 1524 then you need to mention 500 GB in place of size.


Post-check Commands:

1. Use the below command to check the new capacity of the disk.

svcinfo lsvdisk <Vdisk name/id>


Back out Plan:

We cannot revert the change so we need to be careful before executing the change the only process to revert is to allocate a new disk and get the data migrated.

Monday, January 30, 2017

IBM SVC Storage Lun Allocation Procedure

Below are the list of Pre-check, Implementation & Back out commands, which will help you to complete the Lun allocation easy and without any effort. Do follow the procedure and feel free to post your comments in case of any queries or suggestions.

Pre-check Commands:

1. Command to check the Mdisk Group Capacity.

svcinfo lsmdiskgrp

2. Command to check number of Vdisk associated per IOGrp.

svcinfo lsiogrp

3. Command to check the IOGrp associated for a host in case, you are assigning a lun to an existing host.

svcinfo lshostiogrp <Host ID/Name>

Note:- Below commands to get the Vdisk information of existing host.

4. Command to check the luns assigned to a host incase of naming convention.

svcinfo lshostvdiskmap <Host ID/Name>

5. Command to check the Vdisk information in detailed, which shows the individual disk IOGrp, MdiskGrp & Other information.

svcinfo lsvdisk <Vdisk name/id>


Implementation Commands:

1. Command to create a Vdisk.

svctask mkvdisk -mdiskgrp <mdisk group Name/ID> -iogrp <IOGrp Name/ID> -size <Vdisk Capacity> -unit <gb/mb/tb> -name <Vdisk Name> 

2. Command to map the Vdisk to a Host.

svctask mkvdiskhostmap -host <Host Name/ID> <Vdisk Name/ID>

3. Command to map the same lun to multiple host.

svctask mkvdiskhostmap -force -host <Host Name/ID> <Vdisk Name/ID>

Back out Plan:

1. Command to unmap the same lun to multiple host.

svctask rmvdiskhostmap -host <Host Name/ID> <Vdisk Name/ID>

2. Command to delete the disk.

svctask rmvdisk <Vdisk Name/ID>

Friday, January 27, 2017

IBM SVC(SAN Volume Controller) Commands Book

Most of you have been facing trouble in preparing the regular allocation and general commands multiple times. Losing time in validating the command that was it correct or not Don't worry let me make your daily thing easy. Just click on download to get the excel spreadsheet which helps completing your tasks easy and save your time. Just place your requirements and you will get the commands where you can copy and execute. Come on give it a shot which will decrease your time.

Basic idea of Excel will make your understand the things easier the spredsheet was prepared for 10 consecutive commands if you need more add more rows and copy the command to the below line it should work as expected.

Any queries feel free to post your comments.


OR