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

OceanStor 2200 V3 and 2600 V3 Storage System V300R005 Command Reference 06

"Based on the CLI provided by the DeviceManager, this document describes how to use variouscommands classified by functions and how to set the CLI and manage the storage system throughthese commands."
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=? | lun_id=? | lun_id_list=? ] 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=? ]

create lun name=? [ number=? | lun_id_list=? ] 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=? ] storage_pool_id=? [ owner_controller=? ] [ lun_id=? ]

Parameters

Parameter

Description

Value

name=? Name of a LUN that you want to create.
  • 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 that are created in a batch. This parameter cannot be used along with the lun_id=? and lun_id_list=? parameter.

The value ranges 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 is an integer ranging 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 for storage tiering.

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=? An 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=? Cache read 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=? Cache write 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 that you want to copy. Using this parameter synchronizes the attributes of a source LUN, excluding the LUN ID and capacity, with the newly created 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=? An owning controller.

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 or not 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=? Indicates whether the compression function is enabled. NOTE:OceanStor 2200 V3 storage system do 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 is "no".
compression_method=? Sets the LUN compression algorithm. NOTE:OceanStor 2200 V3 storage system do not support this parameter.

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

  • "fast": Speed is the priority.
  • "deep": Compression rate is the priority.
The default is "fast".
dedup_enabled=? Indicates whether the deduplication function is enabled. NOTE:OceanStor 2200 V3 storage system do 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 is "no".
intelligent_dedup_enabled=? Indicates whether the intelligent deduplication function is enabled. NOTE:OceanStor 2200 V3 storage system do 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 is "yes".
bytecomparison_enabled=? Indicates whether the byte_by_byte comparison function is enabled. NOTE:OceanStor 2200 V3 storage system do 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 is "no".
dedup_metadata_sample_ratio=? Indicates the deduplication metadata sample ratio. NOTE:OceanStor 2200 V3 storage system do 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=? Indicates the grain size of a Thin LUN. NOTE:OceanStor 2200 V3 storage system do not support this parameter.

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

  • 4 KB: The grain size of the Thin LUN is 4 KB.
  • 8 KB: The grain size of the Thin LUN is 8 KB.
  • 16 KB: The grain size of the Thin LUN is 16 KB.
  • 32 KB: The grain size of the Thin LUN is 32 KB.
  • 64: KB: The grain size of the Thin LUN is 64 KB.
The default value is 64 KB. 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 the function that triggers an alarm when the threshold of a thin LUN is reached.

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=? Threshold that will trigger an alarm in 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 is an integer ranging from 0 to 65535. LUN IDs separated by commas(,), or LUN ID range separated by hyphens(-), such as: 0,5-8.

smart_cache_state=? Whether SmartCache is enabled.

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.

Level

Administrator

Usage Guidelines

  • You can create LUNs in either of the following ways:
    • To manually assign the parameters for a LUN to be created.create lun name=? [ number=? | lun_id=? | lun_id_list=? ] 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=? ] *
    • To create a LUN by copying the attributes of a source LUN.create lun name=? [ number=? | lun_id_list=? ] 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

  • Create a LUN and set 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.
  • Create two LUNs and set 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.
  • Create a Thin LUN with the compression function and set 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
    WARNING: You are about to create a thin LUN with the deduplication or compression function.This operation will cause the LUN to fail to support the following features: snapshot, clone, remote replication, LUN copy, LUN migration, heterogeneous virtualization, LUN destruction, and dynamic migration.
    Suggestion: Determine whether the operation is performed based on service requirements.
    Have you read warning message carefully?(y/n)y
    Are you sure you really want to perform the operation?(y/n)y
    Command executed successfully.

System Response

None

Translation
Download
Updated: 2019-07-22

Document ID: EDOC1000106139

Views: 317483

Downloads: 210

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