No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Command Reference 10

OceanStor 5300 V3, 5500 V3, 5600 V3, 5800 V3, and 6800 V3 Storage System V300R003

"Based on the CLI, this document describes how to use various commands classified by functions and how to set the CLI and manage the storage system through these commands. The document that you browse online matches the latest C version of the product. Click Download to download documents of other C versions."
Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
create lun

create lun

Function

The create lun command is used to create logical unit numbers (LUNs). After creating a storage pool, you must divide its storage space into one or multiple LUNs so that resources can be more appropriately allocated to application servers.

Format

create lun name=? [ number=? [ suffix_start_index=? ] | lun_id=? | lun_id_list=? [ suffix_start_index=? ] ] pool_id=? capacity=? [ lun_type=? [ thresholds_switch=? | thresholds_percent=? ] | write_policy=? | prefetch_policy=? [ prefetch_multiple=? ] [ prefetch_value=? ] | relocation_policy=? | allocation_policy=? | owner_controller=? | read_cache_policy=? | write_cache_policy=? | io_priority=? | dif_switch=? | compression_enabled=? | compression_method=? | dedup_enabled=? | intelligent_dedup_enabled=? | bytecomparison_enabled=? | dedup_metadata_sample_ratio=? | grain_size=? | smart_cache_state=? | meta_id=? ]

create lun name=? [ number=? [ suffix_start_index=? ] | lun_id_list=? [ suffix_start_index=? ] ] copy_lun_id=? [ override_capacity=? | override_pool_id=? ] *

create lun name=? remote_lun_wwn_list=? storage_pool_id=? [ write_policy=? ] [ prefetch_policy=? ] [ prefetch_multiple=? ] [ prefetch_value=? ] [ relocation_policy=? ] [ allocation_policy=? ] [ io_priority=? ] [ read_cache_policy=? ] [ write_cache_policy=? ] [ owner_controller=? ] [ lun_id=? ] [ dif_switch=? ]

create lun name=? vvol_type=? [ number=? [ suffix_start_index=? ] ] storage_pool_id=? [ owner_controller=? ] [ lun_id=? ]

Parameters

Parameter

Description

Value

name=? Name of the LUN.
  • The value contains 1 to 32 ASCII characters, including digits, letters, underscores (_), hyphens (-), and periods (.).
  • When creating LUNs in a batch by assigning the number=? parameter, the created LUNs will be auto-named by appending four digits starting from 0000 to each name. For example, if you specify the LUN name as LUN, the created LUNs will be auto-named LUN0000, LUN0001, and so on.
    NOTE:
    When creating LUNs in a batch, the length of name=? cannot exceed 27 characters.
number=? Number of LUNs to be batch created. This parameter cannot be used along with the lun_id=? and lun_id_list=? parameters.

The value must be an integer from 2 to 500.

The default value is "1".

lun_id=? ID of a LUN that you want to create. This parameter cannot be used along with the number=? parameter.

The value must be an integer from 0 to 65535.

The storage system automatically allocates an ID for a newly created LUN if this parameter will not be used.

pool_id=? ID of a storage pool to which a created LUN belongs.

To obtain the value, run "show storage_pool general"

capacity=? Capacity of a newly created LUN.
  • The value is in the format of capacity+unit, where the unit can be KB, MB, GB, TB or Blocks.
  • The value ranges from 512 KB to 256 TB.
  • One blocks equals 512 Bytes.
  • When the unit is GB or TB, a decimal number can be used.
  • "remain"indicates that all the remaining space in a pool is used to create a LUN.
lun_type=? Type of a LUN.

The value can be "thick" or "thin", where:

  • "thick": A thick LUN is always assigned a fixed amount of capacity.
  • "thin": When being created, the capacity of a LUN is automatically allocated by system. When the available capacity of the LUN is insufficient, the capacity is automatically expanded but cannot exceed the maximum value (specified by the capacity parameter).
The default value is "thick".
write_policy=? Cache write policy.

The value can be "write_through" or "write_back", where:

  • "write_through": indicates write through. The system considers that a data write is successful only after data is written to hard disks. Hard disks are accessed in each data write.
  • "write_back": indicates write back. After data is written to the cache of the local controller, the system considers that a data write is successful. In addition, the data will be written to the cache of the peer controller as a mirror. When certain conditions are met, the caches write data to hard disks.
The default value is "write_back".
prefetch_policy=? Cache prefetch policy.

The value can be "none", "constant", "variable", or "intelligent", where:

  • "none": indicates non-prefetch.
  • "constant": indicates constant prefetch.
  • "variable": indicates variable prefetch.
  • "intelligent": indicates intelligent prefetch.
The default value is "intelligent".
prefetch_multiple=? Cache prefetch multiple. This parameter is required when prefetch_policy=? is set to "variable".

The value ranges from 0 to 1024.

prefetch_value=? Cache prefetch size. This parameter is required when prefetch_policy=? is set to "constant".

The value ranges from 0 to 1024, expressed in KB.

relocation_policy=? SmartTier policy.

The value can be none, automatic, lowest_available, or highest_available, where:

  • none:data migration is not performed.
  • automatic:The system automatically determines the data migration direction.
  • lowest_available:Data is migrated to a lower-speed storage tier. For example, data is migrated from the performance tier to the capacity tier.
  • highest-available:Data is migrated to a high-speed tier. For example, data is migrated from the capacity tier to the performance tier.
The default value is none.
allocation_policy=? Initial space allocation policy.

The value can be "automatic", "extreme_performance", "performance", or "capacity", where:

  • "automatic": The storage system will automatically define a storage tier for a LUN.
  • "extreme_performance": Tier 0 will be allocated to a LUN.
  • "performance": Tier 1 will be allocated to a LUN.
  • "capacity": Tier 2 will be allocated to a LUN.
The default value is "automatic".
read_cache_policy=? Read cache policy of a LUN.

The value can be "Resident", "Default", or "Recycle", where:

  • "Resident": indicates the resident priority.
  • "Default": indicates the default priority.
  • "Recycle": indicates the recycle priority.
The default value is "Default".
write_cache_policy=? Write cache policy of a LUN.

The value can be "Resident", "Default", or "Recycle", where:

  • "Resident": indicates the resident priority.
  • "Default": indicates the default priority.
  • "Recycle": indicates the recycle priority.
The default value is "Default".
io_priority=? I/O priority of a LUN.

The value can be "Low", "Middle", or "High", where:

  • "Low": indicates the low priority.
  • "Middle": indicates the medium priority.
  • "High": indicates the high priority.
The default value is "Low".
copy_lun_id=? ID of a source LUN whose attributes to be copied. If this parameter is specified, the attributes of the newly created LUN, excluding the LUN ID and capacity, is the same as the source LUN.

To obtain the value, run "show lun general".

override_capacity=? Capacity of a new LUN which will be created using the attributes of a source LUN.
  • The value is in the format of "capacity + unit", where unit is case-insensitive and can be KB, MB, GB, and TB respectively.
  • The value ranges from 512 KB to 256 TB.
The capacity of a new LUN equals that of a source LUN if this parameter will not be used.
override_pool_id=? ID of the storage pool to which a new LUN belongs. The LUN will be created using the attributes of a source LUN.

To obtain the value, run "show storage_pool".

A new LUN and a source LUN belong to the same storage pool if this parameter will not be used.

owner_controller=? Owning controller of the LUN.

The value is in the format of "XA","XB","XC" or "XD",where the "X" is an integer ranging from 0 to 3.

dif_switch=? Whether to enable the DIF function.

The value can be:

  • "yes": the DIF function will be enabled.
  • "no": the DIF function will not be enabled.
remote_lun_wwn_list=? WWN of a remote LUN.

To obtain the value, run the "show remote_lun general" command.

storage_pool_id=? ID of the storage pool to which a LUN belongs.

To obtain the value, run the "show storage_pool general" command.

compression_enabled=? Whether to enable the compression function. NOTE:OceanStor

Usage Guidelines

None.

V3 does not support this parameter.

The value can be "yes" or "no", where

  • "yes": The deduplication function will be enabled.
  • "no": The deduplication function will not be enabled.
The default value is "no".
meta_id Internal metadata identifier of a LUN.

The value must be an integer from 0 to 65535.

compression_method=? Sets the LUN compression algorithm. NOTE:OceanStor

Usage Guidelines

None.

V3 does not support this parameter.

The value can be "fast" or "deep", where

  • "fast": Speed is the priority.
  • "deep": The compression rate is the priority.
The default value is "fast".
dedup_enabled=? Whether to enable the deduplication function. NOTE:OceanStor

Usage Guidelines

None.

V3 does not support this parameter.

The value can be "yes" or "no", where

  • "yes": The deduplication function will be enabled.
  • "no": The deduplication function will not be enabled.
The default value is "no".
intelligent_dedup_enabled=? Whether to enable the intelligent deduplication function. NOTE: OceanStor

Usage Guidelines

None.

V3 does not support this parameter.

The value can be "yes" or "no", where

  • "yes": The intelligent deduplication function will be enabled.
  • "no": The intelligent deduplication function will not be enabled.
The default value is "yes".
bytecomparison_enabled=? Whether to enable the byte-by-byte comparison function. NOTE: OceanStor

Usage Guidelines

None.

V3 does not support this parameter.

The value can be "yes" or "no", where

  • "yes": The byte_by_byte comparison function will be enabled.
  • "no": The byte_by_byte comparison function will not be enabled.
The default value is "no".
dedup_metadata_sample_ratio=? Deduplication metadata sample ratio. NOTE:OceanStor

Usage Guidelines

None.

V3 does not support this parameter.

The value can be "1", "2", "4", "8", "16", or "32". A larger sample ratio means a smaller impact on performance. However, the ratio of space saved by deduplication may be affected.

grain_size=? Capacity allocation unit of a thin LUN. NOTE: OceanStor

Usage Guidelines

None.

V3 does not support this parameter.

The value can be 4 KB, 8 KB, 16 KB, 32 KB, or 64 KB, where,

  • 4 KB: The capacity allocation unit of the thin LUN is 4 KB.
  • 8 KB: The capacity allocation unit of the thin LUN is 8 KB.
  • 16 KB: The capacity allocation unit of the thin LUN is 16 KB.
  • 32 KB: The capacity allocation unit of the thin LUN is 32 KB.
  • 64: KB: The capacity allocation unit of the thin LUN is 64 KB.
If the storage pool where the LUN resides only has the SSD layer, the default value is "8KB". Otherwise, the default value is "64KB." The LUN with small grain size will take up a lot of system resources, please ensure that the LUN is used in VDI scene and the system does not have file systems running at the same time.
thresholds_switch=? Switch of thin LUN threshold alarms.

The value can be "off" or "on", where:

  • "off": to disable the alarm function.
  • "on": to enable the alarm function.
The default value is "off".
thresholds_percent=? Alarm threshold of a thin LUN.

The value ranges from 50 to 99, expressed in %.

The default value is 90.

lun_id_list=? LUN ID list. This parameter cannot be used along with the lun_id=? or number=? parameter.

The value must be an integer from 0 to 65535. LUN IDs are separated by commas(,). The value can be a LUN ID range separated by hyphens(-), such as: 0,5-8.

smart_cache_state=? Whether to enable the SmartCache function.

The value can be on or off, where:

  • "off": SmartCache is disabled.
  • "on": SmartCache is enabled.
The default value is off.
vvol_type=? VVOl type of a LUN.

The value must be "PE_LUN". "PE_LUN" indicates that the LUN is a PE LUN.

suffix_start_index=? Suffix start index of name.

The value must be an integer from 0 to 9998.

Level

Administrator

Usage Guidelines

  • You can create LUNs in either of the following ways:
    • Manually specify the parameters for the LUN to be created.create lun name=? [ number=? [suffix_start_index=?] | lun_id=? | lun_id_list=? [suffix_start_index=?] ] pool_id=? capacity=? [ lun_type=? [ thresholds_switch=? | thresholds_percent=? ] | write_policy=? | prefetch_policy=? [ prefetch_multiple=? ] [ prefetch_value=? ] | relocation_policy=? | allocation_policy=? | owner_controller=? | read_cache_policy=? | write_cache_policy=? | io_priority=? | dif_switch=? | compression_enabled=? | compression_method=? | dedup_enabled=? | intelligent_dedup_enabled=? | bytecomparison_enabled=? | dedup_metadata_sample_ratio=? | grain_size=? | smart_cache_state=? | meta_id=? ] *
    • Create a LUN by copying the attributes of a source LUN.create lun name=? [ number=? [suffix_start_index=?] | lun_id_list=? [suffix_start_index=?] ] copy_lun_id=? [ override_capacity=? | override_pool_id=? ] *
  • The size of a newly created LUN cannot be greater than the remaining capacity of the storage pool to which the LUN will be added.
  • You can schedule data relocation policies to relocate data among tiers 0, 1, and 2 for storage optimization. For example, you can schedule a policy to relocate cold data to tier 2 and to relocate hot data to tier 0. This enables you to fully utilize different types of hard disks for the balance among system performance, capacity, and cost.
  • When LUNs are batched created with "capacity" set to "remain", because the calcuated average capacity of a LUN will be rounded up after being divided by the extent, capacity of the last LUN may be different from that of the other LUNs, or some LUNs may fail to be created due to insufficient space. In this case, manually create the LUNs that failed to be created according to your requirements.

Example

  • Creating a LUN and setting its parameters as follows:
    • Name: newlun
    • ID of storage pool: 1
    • LUN capacity: 100 MB.
    admin:/>create lun name=newlun pool_id=1 capacity=100MB
    Command executed successfully.
  • Creating two LUNs and setting their parameters as follows:
    • LUN name prefix: newlun-clone
    • Source LUN ID for copying attributes: 2
    • LUN capacity: 200 MB.
    admin:/>create lun name=newlun-clone copy_lun_id=2 override_capacity=200MB number=2
    Create LUN newlun-clone0000 successfully.
    Create LUN newlun-clone0001 successfully.
  • Creating a thin LUN with the compression function and setting its parameters as follows:
    • Name: asdf
    • ID of storage pool: 0
    • LUN capacity: 2GB
    • LUN type: thin
    • Compression function switch: yes.
    admin:/>create lun name=asdf pool_id=0 capacity=2GB lun_type=thin compression_enabled=yes
    Command executed successfully.

System Response

None

Translation
Download
Updated: 2019-04-04

Document ID: EDOC1000084195

Views: 276852

Downloads: 1559

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next