subscribe iconSubscribe to this information
POWER7 information

lu command

Purpose

Lists and displays information that is related to the logical units in a shared storage pool.

Syntax

To create a logical unit in a shared storage pool:

lu -create [-clustername ClusterName] [-sp StoragePool] -lu LuName -size LuSize [-vadapter vAdapterName [-vtd TargetDeviceName ]] [-thick]

To list logical units in a shared storage pool:

lu -list [-clustername ClusterName] [-sp StoragePool] [-attr Attribute=Value] [-verbose | -field FieldName ...] [-fmt Delimiter [-header]]

To map an existing logical unit to a virtual host server adapter:

lu -map [-clustername ClusterName] [-sp StoragePool] {-lu LuName | -luudid LuUDID} -vadapter vAdapterName [-vtd TargetDeviceName]

To remove a logical unit from a shared storage pool:

lu -remove [-clustername ClusterName] [-sp StoragePool] {-lu LuName | -luudid LuUDID | -all}

To unmap a logical unit:

lu -unmap {[-clustername ClusterName] [-sp StoragePool] {-lu LuName | -luudid LuUDID} | -vtd TargetDeviceName}

Description

The lu command is used to manage the logical units within a shared storage pool (SSP). By using the lu command, various operations such as create, map, unmap, remove, and list can be performed on logical units in an SSP. A new logical unit can be created by using the -create flag. By default a thin-provisioned logical unit is created, use the thick option to create a thick-provisioned logical unit. Use -map flag to map an existing logical unit to a virtual SCSI adapter. You can also map a logical unit when you create a logical unit by using the vadapter option. You can remove the logical units from the shared storage pool by using the remove flag. To remove all the logical units, use the all option with -remove flag. To display information about the logical units in the shared storage pool, use the -list flag and use the verbose option to display the detailed information about logical units. Use the attr option to filter the output of the -list flag to print name, udid, size, provision_type, and move_status attributes.

Flags

Flag name Description
-all Specifies all the logical units.
-attr Specifies the logical unit attribute and value of the logical unit.

Supports the following attributes: name, udid, size, provision_type, and move_status.

-clustername Specifies the name of the cluster.
-create Creates a logical unit in the shared storage pool.
-field Specifies a list of fields to be displayed.
Supports the following attributes if the -list flag is specified:
pool_name, tier_name, lu_name,
tier_relation, additional_tiers, udid, size, used_percent, used_space,
unused, provision_type, udid_derived_from, move_status, snapshots 
-fmt Separates the output by using a user-specified delimiter character.
-header Displays the field names in the formatted listing output.
-list Lists the logical units in a shared storage pool.
-lu Specifies the name of the logical unit.
-luudid Specifies the UDID of the logical unit.
-map Creates a virtual target device (VTD).
-remove Removes one or more logical units from a shared storage pool.
-size Specifies the size of the logical unit in MB (megabytes) or GB (gigabytes).
-sp Specifies the name of the shared storage pool.
-thick Creates a thick-provisioned logical unit in the shared storage pool. By default, a thin-provisioned logical unit is created.
-unmap Removes the mapping of a logical unit to the virtual server SCSI adapter in a shared storage pool.
-vadapter Specifies the virtual SCSI (vSCSI) adapter of the server.
-verbose Displays the detailed information about the logical unit.
-vtd Specifies the name of the virtual target device.

Examples

  1. To create a logical unit of 10 GB size in a shared storage pool by using the default cluster name and pool name, type the following command:
    lu -create -lu vdisk1 -size 10G

    The system displays the following output:

    Lu Name:vdisk1
    Lu Udid:294d48f01b34b3a74ccece4e9eb7425a
  2. To create a logical unit of 20 GB size in a shared storage pool and to map it to a vSCSI adapter by using the optional cluster name and pool name, type the following command:
    lu –create –clustername mycluster –sp mysp –lu vdisk2 –size 20G –vadapter vhost1

    The system displays the following output:

    Lu Name:vdisk2
    Lu Udid:8f0801cd037c3c244d581ae3d41960b5
    Assigning logical unit "vdisk2" as a backing device.
    VTD:vtscsi0
  3. To create a logical unit of 10 GB size in a shared storage pool and to map it to a vSCSI adapter by using a virtual target device, type the following command:
    lu –create –lu vdisk3 –size 10G –vadapter vhost1 –vtd vdisk3_vtd

    The system displays the following output:

    Lu Name:vdisk3
    Lu Udid:5274e5619ccf3cec615a7e931ec0e05c
    Assigning logical unit 'vdisk3' as a backing device.
    VTD:vdisk3_vtd
  4. To map an existing logical unit in a shared storage pool to a specific virtual SCSI adapter by using a default virtual target device, type the following command:
    lu –map –lu vdisk1 –vadapter vhost1

    The system displays the following output:

    Assigning logical unit 'vdisk1' as a backing device.
    VTD:vtscsi1
  5. To map an existing logical unit in a shared storage pool to a specific virtual server SCSI adapter and to assign a virtual target device, type the following command:
    lu –map –lu vdisk2 –vadapter vhost2 –vtd vdisk2_vtd

    The system displays the following output:

    Assigning logical unit 'vdisk2' as a backing device.
    VTD:vdisk2_vtd
  6. To map an existing logical unit in a shared storage pool to a specific virtual server SCSI adapter by using an UDID, type the following command:
    lu –map –luudid 5274e5619ccf3cec615a7e931ec0e05c –vadapter vhost3

    The system displays the following output:

    Assigning logical unit with LUUDID '5274e5619ccf3cec615a7e931ec0e05c' as a backing device.
    VTD:vtscsi8
  7. To remove a logical unit from a shared storage pool, type the following command:
    lu –remove –lu vdisk1

    The system displays the following output:

    Logical unit vdisk1 with udid "294d48f01b34b3a74ccece4e9eb7425a" is removed.
  8. To remove a logical unit from a mapped shared storage pool, type the following command:
    lu –remove –lu vdisk2

    The system displays the following output:

    vtscsi10 deleted
    Logical unit vdisk2 with udid "8f0801cd037c3c244d581ae3d41960b5" is removed.
  9. To remove all logical units from a shared storage pool, type the following command:
    Warning: This command completely empties the storage pool and it cannot be recovered.
    lu –remove –clustername mycluster –sp mysp –all

    The system displays the following output:

    All Logical Units from the storage pool "mysp" have been removed.
  10. To list the logical units in the storage pool, type the following command:
    lu –list

    The system displays the following output:

    POOL_NAME: testsp
    TIER_NAME: SYSTEM
    LU_NAME   SIZE(MB) UNUSED(MB)  	UDID
    vdisk1    10240    0            294d48f01b34b3a74ccece4e9eb7425a
    vdisk2    20480    20480        8f0801cd037c3c244d581ae3d41960b5
    vdisk3    10240    10240        5274e5619ccf3cec615a7e931ec0e05c
    
    LU_SNAPSHOT
    vdisk3snap1
    vdisk3snap2
    
    vdisk4    20480    20480        4f0c4ce9898f40b7c1046ef4811ab6ff
  11. To list the detailed information about the logical units in the shared storage pool, type the following command:
    lu –list –verbose

    The system displays the following output:

    POOL_NAME: testsp
    TIER_NAME: SYSTEM
    TIER_RELATION: PRIMARY
    ADDITIONAL_TIERS: N/A
    LU_NAME: vdisk1
    LU_UDID: 294d48f01b34b3a74ccece4e9eb7425a
    LU_SIZE: 10240
    LU_USED_PERCENT: 100
    LU_USED_SPACE: 10240
    LU_UNUSED_SPACE: 0
    LU_PROVISION_TYPE: THICK
    LU_UDID_DERIVED_FROM: N/A
    LU_MOVE_STATUS: N/A
    LU_SNAPSHOTS: N/A
    
    POOL_NAME: testsp
    TIER_NAME: SYSTEM
    TIER_RELATION: PRIMARY
    ADDITIONAL_TIERS: N/A
    LU_NAME: vdisk2
    LU_UDID: 8f0801cd037c3c244d581ae3d41960b5
    LU_SIZE: 20480
    LU_USED_PERCENT: 0
    LU_USED_SPACE: 0
    LU_UNUSED_SPACE: 20480
    LU_PROVISION_TYPE: THIN
    LU_UDID_DERIVED_FROM: N/A
    LU_MOVE_STATUS: N/A
    LU_SNAPSHOTS: N/A
    
    POOL_NAME: testsp
    TIER_NAME: SYSTEM
    TIER_RELATION: PRIMARY
    ADDITIONAL_TIERS: N/A
    LU_NAME: vdisk3
    LU_UDID: 5274e5619ccf3cec615a7e931ec0e05c
    LU_SIZE: 10240
    LU_USED_PERCENT: 0
    LU_USED_SPACE: 0
    LU_UNUSED_SPACE: 10240
    LU_PROVISION_TYPE: THIN
    LU_UDID_DERIVED_FROM: N/A
    LU_MOVE_STATUS: N/A
    LU_SNAPSHOTS: vdisk3snap1 vdisk3snap2
  12. To list the logical units in a formatted output with comma (,) as the delimiter, type the following command:
    lu –list –fmt ,

    The system displays the following output:

    testsp,SYSTEM,vdisk1,10240,0,294d48f01b34b3a74ccece4e9eb7425a
    testsp,SYSTEM,vdisk2,20480,20480,8f0801cd037c3c244d581ae3d41960b5
    testsp,SYSTEM,vdisk3,10240,10240,5274e5619ccf3cec615a7e931ec0e05c
    testsp,SYSTEM,vdisk4,20480,20480,4f0c4ce9898f40b7c1046ef4811ab6ff
  13. To list the detailed information about the logical units in a storage pool, type the following command:
    lu –list –verbose –fmt , -header

    The system displays the following output:

    POOL_NAME,TIER_NAME,TIER_RELATION,ADDITIONAL_TIERS,LU_NAME,LU_UDID,LU_SIZE,
    LU_USED_PERCENT,LU_USED_SPACE,LU_UNUSED_SPACE,LU_PROVISION_TYPE,LU_UDID_DERIVED_FROM,
    LU_MOVE_STATUS,LU_SNAPSHOTS
    
    testsp,SYSTEM,PRIMARY,N/A,vdisk1,294d48f01b34b3a74ccece4e9eb7425a,10240,100,10240,0,THICK,N/A,N/A,N/A
    testsp,SYSTEM,PRIMARY,N/A,vdisk2,8f0801cd037c3c244d581ae3d41960b5,20480,0,0,20480,THIN,N/A,N/A,N/A
    testsp,SYSTEM,PRIMARY,N/A,vdisk3,5274e5619ccf3cec615a7e931ec0e05c,10240,0,0,10240,THIN,N/A,N/A,vdisk3snap1 vdisk3snap2
    testsp,SYSTEM,PRIMARY,N/A,vdisk4,4f0c4ce9898f40b7c1046ef4811ab6ff,20480,0,0,20480,THIN,4f0c4ce9898f40b7c1046ef4811ab6ff,N/A,N/A


Send feedback Rate this page

Last updated: Wed, June 03, 2015