Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments

Creating LUNs and igroups using individual commands

How to use individual commands  Top

The commands in the following table occur in a logical sequence for creating LUNs and igroups for the first time. However, you can use the commands in any order, or you can skip a command if you already have the information that a particular command displays.

For more information about all of the options for these commands, see the online man pages. For information about how to view man pages, see Command-line administration.

To do this...

Use this command...

Display the WWPNs of the initiators that are available to create igroups

fcp show initiator

Sample result

Initiators connected on adapter 4a:
Portname                   Group
10:00:00:00c:2b:cc:92
10:00:00:00c:2b:cc:35
10:00:00:00c:2b:4d:f6
10:00:00:00c:2b:6b:38

Determine which hosts are associated with the WWPNs

For information about how to determine which WWPN is associated with a host, see Host.

Create an igroup

igroup create -f -t ostype initiator_group [node]

-f indicates that the igroup contains Fibre Channel WWPNs

-t ostype indicates the operating system type of the initiator. The values are: default, solaris, windows, hpux, aix, or linux.

For information about specifying the ostype of an igroup, see About igroups.

initiator_group is the name you specify as the name of the igroup.

node is a WWPN, which is the 64-bit address of the initiator's port name

Example

igroup create -f -t solaris solaris-igroup3 10:00:00:00c:2b:cc:92

Create a LUN

lun create -s size -t ostype lun_path 

-s indicates the size of the LUN to be created, in bytes by default. For information about LUN size, see The size of the LUN.

-t ostype indicates the operating system type that determines the geometry used to store data on the LUN. For information about specifying the ostype of the LUN, see The host operating system type.

lun_path is the LUN's path name that includes the volume and qtree.

Example

lun create -s 4g -t solaris /vol/vol1/qtree1/lun3

Result

A 4-GB LUN called /vol/vol1/qtree1/lun3 is accessible by a Solaris host.

Map the LUN to an igroup

lun map lun_path initiator_group [lun_id]

lun_path is the path name of the LUN you created.

initiator_group is the name of the igroup you created.

lun_id is the identification number that you specify the initiator should use when the LUN is mapped to it. If you do not enter a number, Data ONAP generates the next available LUN ID number.

Example 1

lun map /vol/vol1/qtree1/lun3 solaris-igroup3 0

Result

Data ONTAP maps /vol/vol1/qtree1/lun3 to the igroup solaris-igroup3 at LUN ID 0.

Example 2

lun map /vol/vol1/lun0 solaris-igroup0

Result

Data ONTAP assigns the next lowest valid LUN ID to map the LUN to the igroup.

After entering the command in this example, Data ONTAP displays the following message:

lun map: auto-assigned solaris-igroup0=0

Display the LUNs you created

lun show -v

-v provides additional information, such as the comment string, serial number, and LUN mapping.

Example

lun show -v

Sample result

/vol/vol1/qtree1/lun3    4g (4294967296)   (r/w, online, mapped)
        Serial#: 0dCfh3bgaBTU
        Share: none
        Space Reservation: enabled
        Multiprotocol Type: solaris
        Maps: solaris-igroup0=0

Display the LUN ID mapping

lun show -m

-m provides mapping information in a tabular format.

Sample result


 
LUN path                 Mapped to               LUN ID
----------------------------------------------------
/vol/vol1/lun0           solaris-igroup0          0
/vol/vol1/lun1           solaris-igroup1          0
/vol/vol1/qtree1/lun2    solaris-igroup2          0
/vol/vol1/qtree1/lun3    solaris-igroup3          0

In this example, each LUN is mapped to a different igroup, which was named to reflect the host whose WWPN was used when creating the igroup. Note that the LUN ID mapping begins with 0 for each igroup. If a second LUN is mapped to the same igroup, the LUN ID automatically increments by one.

 Top

Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments