lu command
Purpose
Manages logical units in a shared storage pool.
Syntax
To create a logical unit in a shared storage pool:
lu -create [-clustername ClusterName] [-sp StoragePool] [-tier tierName] -lu luName -size luSize [-vadapter vAdapterName [-vtd TargetDeviceName]] [-thick]
To list logical units in a shared storage pool:
lu -list [-clustername ClusterName] [-sp StoragePool] [-tier tierName] [-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 move a logical unit to another tier:
lu -move [-clustername ClusterName] [-sp StoragePool] {-lu LuName | -luudid LuUDID } -dsttier DestinationTierName [-nonrecursive]
To remove a logical unit from a shared storage pool:
lu -remove [-clustername ClusterName] [-sp StoragePool] {-lu LuName | -luudid LuUDID | [-tier tierName] -all}
To resize an existing logical unit:
lu -resize [-clustername ClusterName] [-sp StoragePool] {-lu LuName | -luudid LuUDID} -size NewLuSize
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, resize, move, 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 flag 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 flag.
You can move a logical unit from one tier to another tier by using the -move flag. Use the -dsttier flag to specify to which tier the logical unit must be moved. By default, all its descendants are also moved to the destination tier. Use the -nonrecursive flag along with the -move flag, to move only the spcified logical unit to the destination tier. You can increase the size of an existing logical unit, by using the -resize flag.
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 flag with -remove flag. To display information about the logical units in the shared storage pool, use the -list flag and use the verbose flag to display the detailed information about logical units. Use the -attr flag to filter the output of the -list flag based on name, udid, size, provision_type, and move_status attributes, or to list and verify whether the logical units are mapped to the virtual host (VHOST) adapter.
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 a tier. You must specify the particular tier, in a multi-tiered environment. |
-dsttier | Specifies the name of the destination tier for a logical unit. |
-field | Specifies a list of fields to be displayed. Supports
the following attributes if the -list flag
is specified:
|
-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). |
-move | Moves a logical unit to another tier. By default, all its descendants are also moved to the destination tier. |
-nonrecursive | Moves only the specified logical unit to the destination tier, when used with the –move flag. |
-remove | Removes one or more logical units. |
-resize | Changes the size of a logical unit. |
-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. |
-tier | Specifies the name of the tier. |
-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
- 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
- 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 the 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
- 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
- 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
- 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
- To map an existing logical unit in a shared storage pool to a
specific virtual server SCSI adapter by using a Unique Device Identifier
(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
- 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.
- 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.
- 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.
- 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 vdisk4 20480 20480 4f0c4ce9898f40b7c1046ef4811ab6ff
- 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
- 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
- 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
- To list the information of a logical unit vdisk1 by using
the -attr flag, type the following command:
lu -list -attr name=vdisk1
The system displays the following output:
POOL_NAME: pool TIER_NAME: SYSTEM LU_NAME SIZE(MB) UNUSED(MB) UDID vdisk1 1024 1024 f95286aaa173f86ac5b9f5e52e841288
- To list the information of a logical unit with a particular UDID,
by using the -attr flag, type the following command:
lu -list -attr udid=f95286aaa173f86ac5b9f5e52e841288
The system displays the following output:
POOL_NAME: pool TIER_NAME: SYSTEM LU_NAME SIZE(MB) UNUSED(MB) UDID vdisk1 1024 1024 f95286aaa173f86ac5b9f5e52e841288
- To list the information of a logical unit with a particular provision
type, by using the -attr flag, type the following command:
lu -list -attr provision_type=thin
The system displays the following output:
POOL_NAME: pool TIER_NAME: SYSTEM LU_NAME SIZE(MB) UNUSED(MB) UDID vdisk1 1024 1024 f95286aaa173f86ac5b9f5e52e841288
- To list the information of a logical unit that has a particular
size, by using the -attr flag, type the following command:
lu -list -attr size=1G
The system displays the following output:
POOL_NAME: pool TIER_NAME: SYSTEM LU_NAME SIZE(MB) UNUSED(MB) UDID vdisk1 1024 1024 f95286aaa173f86ac5b9f5e52e841288
- To list the detailed information of a logical unit vdik1,
by using the -attr flag, type the following command:
lu -list -attr name=vdisk1 -verbose
The system displays the following output:
POOL_NAME:pool TIER_NAME:SYSTEM TIER_RELATION:PRIMARY ADDITIONAL_TIERS:N/A LU_NAME:vdisk1 LU_UDID:f95286aaa173f86ac5b9f5e52e841288 LU_SIZE(MB):1024 LU_USED_PERCENT:0 LU_USED_SPACE(MB):0 LU_UNUSED_SPACE(MB):1024 LU_PROVISION_TYPE:THIN LU_UDID_DERIVED_FROM:N/A LU_MOVE_STATUS:N/A LU_SNAPSHOTS:N/A
- To list the information about a logical unit that is mapped to a virtual host adapter (vhost),
by using the -attr flag, type the following
command:
lu -list -attr provisioned=true
The system displays the following output:
POOL_NAME: sp TIER_NAME: NEW_TIER LU_NAME SIZE(MB) UNUSED(MB) UDID vdisk1 1024 0 d0e04cfda39e8bd561d71f6284090d3a vdisk2 1024 0 31c7d148e24c52965f57641f25cc2698 POOL_NAME: sp TIER_NAME: SYSTEM LU_NAME SIZE(MB) UNUSED(MB) UDID vdisk3 1024 0 967794636e7b17b7e5fc4228d3925549 vdisk4 1024 0 c7f43055d86fd7fc481aa0740596e18b
- To list the information about a logical unit that is not mapped to a virtual host adapter
(vhost), by using the -attr flag, type the following
command:
lu -list -attr provisioned=false
The system displays the following output:
POOL_NAME: sp TIER_NAME: NEW_TIER LU_NAME SIZE(MB) UNUSED(MB) UDID lu_tier1_1 1024 0 d0e04cfda39e8bd561d71f6284090d3a lu_tier1_2 1024 0 31c7d148e24c52965f57641f25cc2698 POOL_NAME: sp TIER_NAME: SYSTEM LU_NAME SIZE(MB) UNUSED(MB) UDID lu_system_1 1024 0 11c594ae71901f99ce086cefe0d59c30 lu_system_2 1024 0 41aa8735f7dc08957202053bf8d83e4f
- To move a logical unit vdisk1 that is unique in the pool
and where the destination tier is prod_tier, type the following
command:
lu –move –lu vdisk1 -desttier prod_tier
The system displays the following output:
Current request action progress: % 5 Current request action progress: % 100 Logical unit vdisk1 with udid '1d4c2dae8f731d377c43e2e30784808d' has been moved successfully.
- To move a logical unit with UDID in a shared storage pool and
where the destination tier is prod_tier, type the following
command:
lu –move –luudid 33a87a7e33a350d82e53bad3057fefb8 -desttier prod_tier
The system displays the following output:
Current request action progress: % 5 Current request action progress: % 100 Logical unit with udid '33a87a7e33a350d82e53bad3057fefb8' has been moved successfully.
- To resize the logical unit vdisk4 to 20 GB, type the following
command:
lu –resize –lu vdisk4 -size 20G
The system displays the following output:
Logical unit vdisk4 with udid '1d4c2dae8f731d377c43e2e30784808d' has been successfully changed.