Easy procedure to assign disks from storage (DS8000/DS6000) to an AIX host

Making an admin's job easier

Assigning disks from storage disks (IBM® System Storage™ DS8000™/DS6000™) to an IBM AIX® host using GUI is easy but time consuming. This article explains a easier and faster way of assigning disks. You can use the this procedure to automate the disk-assigning process.

Manohar Rao Bodke (manoharrao@in.ibm.com), Test Engineer, IBM India Private Ltd.

Manohar Rao has a Bachelor's degree in Electrical and Electronics Engineering from Jawaharlal Nehru Technological University and joined IBM in 2006. He is a test engineer working on HACMP/XD Disaster Recovery. His interests are test automation and implementing tools for testers that makes their jobs easier. Outside of IBM, his hobbies are chess, reading, movies, and friends. You can reach him at manoharrao@in.ibm.com.



17 June 2008

Also available in Chinese

Introduction

There are two ways to communicate with the storage:

  • Storage Manager Graphical User Interface (GUI)
  • DS Command Line Interface

The simplest and best way of assigning disk from storage (for instance, IBM System Storage DS6000/DS8000) to an AIX host is to use the Storage Manger GUI. It is very user friendly. All information is populated automatically to make the user's job easier. But when users access the GUI from the remote site, performance degrades. This article looks at a procedure to assign disks from storage to host using DS Command Line Interface with improved performance.

Please note that information in this article only applies to the storages of type DS8000(2107) and DS6000(1750). You can also assign disks to the host from ESS800 using the ESS command line interface (for instance, esscli, which is beyond the scope of this article).

Before starting the disk-assigning procedure, here are some assumptions that I have made in this article:

  • Assume that the Zone in the switch is configured properly and it has at least two ports, one that is connected to host and the other that is connected to storage. Figure 1 shows a sample Zone setup.
  • DSCLI is installed on your host.
  • The default directory is /opt/ibm/dscli
  • The system administrator knows the IP, username, and password of the Storage/Hardware Management Console (SMC/HMC) and knows which storage image to use. Assume the required values as follows:
    • SMC IP: 198.162.1.2
    • Username: admin
    • password: article123
    • Storage Image ID: IBM.2107-7516231 (Refer Example1 to know how to get the Storage image ID)
Figure 1. Sample Zone setup
Sample Zone setup

The DSCLI command syntax is:

dscli -user <username> -passwd <password> -hmc1 <SMCIP>  <command>

For example:

# /opt/ibm/dscli/dscli -user admin -passwd article123 -hmc1 198.162.1.2 lssi
Date/Time: May 15, 2008 4:50:04 AM CDT IBM DSCLI Version: 5.2.400.426
Name ID               Storage Unit     Model WWNN             State  ESSNet
============================================================================
-    IBM.2107-7516231 IBM.2107-7516230 922   5005076303FFC150 Online Enabled

The second column shows all of the Storage Images managed by the HMC 198.162.1.2. "IBM.2107-7516231" is known as the storage Image ID. Throughout this article, $DSCLIcmd is used instead of the lengthy command.

# $DSCLIcmd <command>

where DSCLIcmd=/opt/ibm/dscli/dscli -user admin -passwd article123 -hmc1 198.162.1.2

There are two possibilities while assigning disks to the host:

  • The first time adding disks to host
  • Adding additional disks to host

The first time adding disks to the host

These are the simple steps to assign disks to the new host for the first time.

  1. Identify the Fibrechannel Adapters WWNN (worldwide Network Number) or the AIX host.

    A) Search for the FC adapters available in the host using the lsdev command:

    # lsdev -Cc adapter | grep fc
    fcs0    Available 1Z-08    FC Adapter

    The FC adapter device name starts with fcs. Here only one FC adapter is available. Your host may have many FC adapters.

    B) Use the lscfg command to get the WWNN for the fcs0 adapter:

    # lscfg -vl fcs0 | grep -w "Network Address"
            Network Address.............10000000C9427D30
  2. Create the host connection:

    A) Use the mkhostconnect dscli command to add the host definition to the storage image.

    # $DSCLIcmd mkhostconnect -dev  IBM.2107-7516231  -wwname 10000000C9427D30 
                                  -profile \"IBM pSeries - AIX\"   Node1
    Date/Time: May 13, 2008 1:23:14 AM CDT IBM DSCLI Version: 5.2.400.426 DS: 
             IBM.2107-7516231
    CMUC00012I mkhostconnect: Host connection 0060 successfully created.

    B) Using the lshostconnect command, you can see the list of connected hosts.

    To verify after adding the host definition, run the following dscli command.

    # $DSCLIcmd  lshostconnect -dev IBM.2107-7516231 | grep Node1
    Node1      0060 10000000C9427D30 -    IBM pSeries - AIX      0 -     all

    Record the hostid for future reference, which is 0060 in this case.

  3. Use the mkvolgrp dscli command to create a volume group:
    # $DSCLIcmd mkvolgrp -dev  IBM.2107-7516231 Node1_vg
    Date/Time: May 13, 2008 1:40:12 AM CDT IBM DSCLI Version: 5.2.400.426 DS: 
             IBM.2107-7516231
    CMUC00030I mkvolgrp: Volume group V77 successfully created.

    Record Volume Group ID V77 in this example for future reference.

  4. Create volumes:

    A) Identify Logical Sub System (LSS):

    Before creating volumes, select the LSS from which you want to create volumes. The lslss dscli command lists the available LSSs in the storage image.

    # $DSCLIcmd lslss -dev IBM.2107-7516231
    Date/Time: May 13, 2008 1:43:50 AM CDT IBM DSCLI Version: 5.2.400.426 DS: 
              IBM.2107-7516231
    ID Group addrgrp stgtype confgvols
    ==================================
    08     0       0 fb              2
    09     1       0 fb             33
    0A     0       0 fb             20
    0D     1       0 fb              8
    10     0       1 fb             51
    11     1       1 fb            189

    Select one LSS from the list. Assume that you have selected LSS 05.

    B) Identify maximum volume ID:

    Use the lsfbvol command to get the list of volumes belongs to the LSS 05 and identify the highest volume ID.

    # $DSCLIcmd lsfbvol -dev IBM.2107-7516231 -lss 05
    Date/Time: May 13, 2008 1:46:23 AM CDT IBM DSCLI Version: 5.2.400.426 DS:
            IBM.2107-7516231
    Name  D   accstate datastate configstate deviceMTM datatype extpool cap (2^30B) 
    cap (10^9B) cap (blocks)
    =============================================================================
    PPRC0003  050D Online   Normal  Normal   2107-900  FB 512   P1  - 1.0  1953152
    PPRC0004  050E Online   Normal   Normal   2107-900  FB 512   P1  - 1.0  1953152
    PPRC0005  050F Online   Normal   Normal   2107-900  FB 512   P1  - 1.0  1953152
    PPRC0006  0510 Online   Normal   Normal   2107-900  FB 512   P1  - 1.0  1953152
    PPRC0007  0511 Online   Normal   Normal   2107-900  FB 512   P1  - 1.0  1953152
    PPRC0008  0512 Online   Normal   Normal   2107-900  FB 512   P1  - 1.0  1953152
    PPRC0009  0513 Online   Normal   Normal   2107-900  FB 512   P1  - 1.0  1953152

    Record the highest volume ID (second column), for instance 0513, and the Extentpool (eighth column) it belongs to; in this case, LSS 05 belongs to extentpool P1.

    C) Create a new volume:

    Use the mkfbvol dscli command to create new volumes. This command creates one disk of 10GB size from the LSS 10.

    # $DSCLIcmd mkfbvol -dev IBM.2107-7516231 -extpool  P1 -type ds -cap  10 0514
    Date/Time: May 13, 2008 1:59:24 AM CDT IBM DSCLI Version: 5.2.400.426 DS: 
          IBM.2107-7516231
    CMUC00025I mkfbvol: FB volume 0514 successfully created.

    The type attribute could be "DS" or "ESS." If you want to use these disks for PPRC, then the type attributes depends on the type of target disk. If the target disk type is either 2107 or 1750, the "-type" attribute here should be "DS." If the target disk type is 2105 then the "-type" attribute should be "ESS."

    The previous command can create only one volume. You can specify the range to create multiple volumes. This is illustrated as follows:

    # $DSCLIcmd mkfbvol -dev IBM.2107-7516231 -extpool P1 -type ds -cap 10 0515-0518
    Date/Time: May 13, 2008 2:10:55 AM CDT IBM DSCLI Version: 5.2.400.426 DS: 
         IBM.2107-7516231
    CMUC00025I mkfbvol: FB volume 0515 successfully created.
    CMUC00025I mkfbvol: FB volume 0516 successfully created.
    CMUC00025I mkfbvol: FB volume 0517 successfully created.
    CMUC00025I mkfbvol: FB volume 0518 successfully created.

    Record the range or volume IDs created that you need to use in the future.

    The volume IDs should be in Hex-Decimal format.

  5. Add the created volumes to a volume group, so that the host can access all volumes in VG. This can be done using the chvolgrp command:
    chvolgrp
    #  $DSCLIcmd chvolgrp -action add -volume 0515-0520 IBM.2107-7516231/V77
    Date/Time: May 13, 2008 2:44:08 AM CDT IBM DSCLI Version: 5.2.400.426
    CMUC00031I chvolgrp: Volume group V77 successfully modified.
  6. Use the chhostconnect dscli command to add the created volume group to the new host.
    # $DSCLIcmd chhostconnect -dev IBM.2107-7516231 -volgrp  V77 0060
    Date/Time: May 13, 2008 2:46:35 AM CDT IBM DSCLI Version: 5.2.400.426 DS: 
         IBM.2107-7516231
    CMUC00013I chhostconnect: Host connection 0060 successfully modified.
  7. Run the cfgmgr command on the host to configure the added disks from storage. Run the following command to view the disks:
    # lsdev -Cc disk | grep -e 2107 -e 1750
    hdisk2  Available 1Z-08-02     IBM MPIO FC 2107
    hdisk3  Available 1Z-08-02     IBM MPIO FC 2107
    hdisk4  Available 1Z-08-02     IBM MPIO FC 2107
    hdisk5  Available 1Z-08-02     IBM MPIO FC 2107

    2107 here indicates that the disks belong to DS8000 and 1750 indicates that the disks belong to the DS6000 type.


Adding additional disks to host

This is the second case when the host definition already exists in storage image and the user wants to add more disks to host from storage then the procedure assigning disks slightly varies and it is very simple.

  1. Identify the Fibrechannel Adapters WWNN (worldwide Network Number) address. Search for the FC adapters available in the host using the lsdev command.
    # lsdev -Cc adapter | grep fc
    fcs0    Available 1Z-08    FC Adapter

    The FC adapter device name starts with "fcs." Here only one FC adapter is available. Your host may have many FC adapters.

    Use the lscfg command to get the WWNN for the fcs0 adapter.

    lscfg
    # lscfg -vl fcs0 | grep -w "Network Address"
            Network Address.............10000000C9427D30
  2. Search for the host and Identify Volume Group.

    Use the the lshostconnect dscli command to verify whether the host is already defined to a storage image.

    # $DSCLIcmd  lshostconnect -dev IBM.2107-7516231 $Delim  | grep -w 10000000C9427D30
    Node1:0060:10000000C9427D30:-:IBM pSeries - AIX:0:V77:all

    If host WWNN exists, the lshostconnect lists the host definition as shown above. The seventh field shows the Volumegroup ID assigned to this host. So, in this case the VGID is V77.

    If the host is not defined already, the output is null. So, the user needs to follow the First time adding disks to host procedure.

    As we identified the host and VG recorded these values and followed the steps in the First time adding disks to host procedure starting with Step 4. Create volumes.

    The following example shows all of the commands together:

    # DSCLIcmd=/opt/ibm/dscli/dscli -user admin -passwd article123 -hmc1 198.162.1.2 
    # Delim="-fmt delim -delim ":" -bnr off -hdr off"
    
    # $DSCLIcmd mkhostconnect -dev  IBM.2107-7516231  -wwname 10000000C9427D30 \
                                           -profile \"IBM pSeries - AIX\"   Node1
    Date/Time: May 13, 2008 1:23:14 AM CDT IBM DSCLI Version: 5.2.400.426 DS: 
          IBM.2107-7516231
    CMUC00012I mkhostconnect: Host connection 0060 successfully created.
    
    # $DSCLIcmd  lshostconnect -dev IBM.2107-7516231 | grep Node1
    Node1     0060 10000000C9427D30 -     IBM pSeries - AIX         0 -      all
    
    # $DSCLIcmd mkvolgrp -dev  IBM.2107-7516231 Node1_vg
    Date/Time: May 13, 2008 1:40:12 AM CDT IBM DSCLI Version: 5.2.400.426 DS: 
         IBM.2107-7516231
    CMUC00030I mkvolgrp: Volume group V77 successfully created.
    
    # $DSCLIcmd lslss -dev IBM.2107-7516231
    Date/Time: May 13, 2008 1:43:50 AM CDT IBM DSCLI Version: 5.2.400.426 DS: 
         IBM.2107-7516231
    ID Group addrgrp stgtype confgvols
    ==================================
    08     0       0 fb              2
    09     1       0 fb             33
    0A     0       0 fb             20
    0D     1       0 fb              8
    10     0       1 fb             51
    11     1       1 fb            189
    13     1       1 fb             31
    
    # $DSCLIcmd lsfbvol -dev IBM.2107-7516231 -lss 05 $Delim \
    		| awk  ' FS=":" { print $2" "$8 }' | sort -rn | head -1
    0513 P1
    
    Note: In the above output 0520 is the MAX volumeid and P1 is the extentpool 
    to which the lss 05 belongs to.
    
    # $DSCLIcmd mkfbvol -dev IBM.2107-7516231 -extpool  P1 -type ds -cap  10 0514
    Date/Time: May 13, 2008 1:59:24 AM CDT IBM DSCLI Version: 5.2.400.426 DS: 
          IBM.2107-7516231
    CMUC00025I mkfbvol: FB volume 0514 successfully created.
    
    # $DSCLIcmd mkfbvol -dev IBM.2107-7516231 -extpool  P1 -type ds -cap  10 0514-0518
    Date/Time: May 13, 2008 2:10:55 AM CDT IBM DSCLI Version: 5.2.400.426 DS: 
         IBM.2107-7516231
    CMUC00025I mkfbvol: FB volume 0514 successfully created.
    CMUC00025I mkfbvol: FB volume 0515 successfully created.
    CMUC00025I mkfbvol: FB volume 0516 successfully created.
    CMUC00025I mkfbvol: FB volume 0517 successfully created.
    CMUC00025I mkfbvol: FB volume 0518 successfully created.
    
    
    #  $DSCLIcmd chvolgrp -action add -volume 0515-0520 IBM.2107-7516231/V77
    Date/Time: May 13, 2008 2:44:08 AM CDT IBM DSCLI Version: 5.2.400.426
    CMUC00031I chvolgrp: Volume group V77 successfully modified.
    
    # $DSCLIcmd chhostconnect -dev IBM.2107-7516231 -volgrp  V77 0060
    Date/Time: May 13, 2008 2:46:35 AM CDT IBM DSCLI Version: 5.2.400.426 DS: 
         IBM.2107-7516231
    CMUC00013I chhostconnect: Host connection 0060 successfully modified.
    
    #cfgmgr
    
    # lsdev -Cc disk | grep -e 2107 -e 1750
    hdisk2  Available 1Z-08-02     IBM MPIO FC 2107
    hdisk3  Available 1Z-08-02     IBM MPIO FC 2107
    hdisk4  Available 1Z-08-02     IBM MPIO FC 2107
    hdisk5  Available 1Z-08-02     IBM MPIO FC 2107
    hdisk6  Available 1Z-08-02     IBM MPIO FC 2107

Summary

You can achieve high performance using the dscli command. Simple commands to create volumes and adding to AIX host. One thing that the system administrator has to take care is that some commands need arguments that can be found from the preceding commands. For example, to create volumes, the mkfbvol dscli command needs LSS and EXTENTPOOL, which can be taken from the lsfbvol command. You can combine all commands and write a script that can automate the entire disk-assigning process.

Resources

Get products and technologies

Discuss

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into AIX and Unix on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=AIX and UNIX
ArticleID=314417
ArticleTitle=Easy procedure to assign disks from storage (DS8000/DS6000) to an AIX host
publish-date=06172008