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

OceanStor 18000 V3 Series V300R006

This document is applicable to OceanStor 18500 V3 and 18800 V3. Based on the CLI provided by DeviceManager, 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).

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=? | cow_grain_size=? | capacity_alarm_threshold=? ] [ description=? ]

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=? | cow_grain_size=? | capacity_alarm_threshold=? ] [ description=? ]

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

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=? | cow_grain_size=? ] [ description=? ] [ support_thinlun=? ]

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

Parameters

Parameter

Description

Value

name=?

LUN name.

  • The value contains 1 to 31 ASCII characters, including digits, letters, underscores (_), hyphens (-), and periods (.).
  • When LUNs are created in a batch by assigning the number=? or lun_id_list=? 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 you create LUNs in a batch, the length of name=? cannot exceed 27 characters.

number=?

Number of LUNs to be created in a batch. This parameter cannot be used along with the lun_id=? and lun_id_list=? parameters.

The value ranges from 2 to 500.

The default value is "1".

copy_lun_id=?

ID of the source LUN whose properties need to be copied. If this parameter is specified, the properties of the newly created LUN are the same as those of the source LUN, except for properties such as the LUN ID, LUN name, and LUN capacity.

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

pool_id=?

ID of a storage pool to which a created LUN belongs.

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

remote_lun_wwn_list=?

WWN of a remote LUN.

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

vvol_type=?

VVol type.

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

override_capacity=?

Capacity of a new LUN which will be created using the properties of a source LUN.

  • The value is in the format of "capacity+unit", where the unit can be KB, MB, GB, or TB.
  • The value ranges from 512 KB to 256 TB.

The capacity of a new LUN equals that of a source LUN if this parameter is not 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".

The new LUN and source LUN belong to the same storage pool if this parameter is not used.

capacity=?

LUN capacity.

  • 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 block equals 512 bytes.
  • When the unit is GB or TB, a decimal number can be used.
  • The value of "remain" indicates that all the remaining space in a pool is used to create a LUN.

lun_type=?

LUN type.

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

  • "thick": A thick LUN is always assigned a fixed amount of capacity.
  • "thin": During creation, the capacity of a thin LUN is automatically allocated by the 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".

storage_pool_id=?

ID of the storage pool to which a LUN belongs.

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

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 value. When the value of "prefetch_policy=?" is "constant", this parameter is mandatory. When the value is "intelligent", this parameter is optional.

When the value of "prefetch_policy=?" is "constant", this parameter ranges from 0 to 1024 and is expressed in KB. When the value is "intelligent", this parameter ranges from 1024 to 8192 and is 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-performance storage tier. For example, data is migrated from the high-performance tier to the performance tier.
  • "highest_available": Data is migrated to a higher-performance tier. For example, data is migrated from the performance tier to the high-performance tier.

The default value is "none".

allocation_policy=?

Initial capacity allocation policy.

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

  • "automatic": The system automatically allocates the available capacity of storage tiers to a LUN.
  • "extreme_performance": The capacity of the high performance tier is preferentially allocated.
  • "performance": The capacity of the performance tier is preferentially allocated.
  • "capacity": The capacity of the capacity tier is preferentially allocated.

The default value is "automatic".

io_priority=?

I/O priority of a LUN.

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

  • "Low": low priority.
  • "Middle": medium priority.
  • "High": high priority.

The default value is "Low".

read_cache_policy=?

Cache read policy of a LUN.

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

  • "Resident": resident policy.
  • "Default": default policy.
  • "Recycle": recycling policy.

The default value is "Default".

write_cache_policy=?

Cache write policy of a LUN.

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

  • "Resident": resident policy.
  • "Default": default policy.
  • "Recycle": recycling policy.

The default value is "Default".

mirror_policy=?

Cache mirror policy of a LUN.

The value can be "Disable" or "Enable", where:

  • "Disable": disables the policy.
  • "Enable": enables the policy.

The default value is "Enable".

owner_controller=?

Owning controller of a LUN.

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

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 to a newly created LUN if this parameter is not specified.

dif_switch=?

Whether to enable the DIF function.

The value can be:

  • "yes": enables the DIF function.
  • "no": disables the DIF function.

grain_size=?

Grain size of a thin LUN.

NOTE:

OceanStor 2200 V3 does not support this parameter.

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

  • 4KB: The grain size of the thin LUN is 4 KB.
  • 8KB: The grain size of the thin LUN is 8 KB.
  • 16KB: The grain size of the thin LUN is 16 KB.
  • 32KB: The grain size of the thin LUN is 32 KB.
  • 64KB: The grain size of the thin LUN is 64 KB.

The default value of the storage pool is "16KB".

smart_cache_state=?

Whether SmartCache is enabled.

The value can be on or off, where:

  • "off": disables SmartCache.
  • "on": enables SmartCache.

The default value is off.

thresholds_switch=?

Threshold alarm switch of a thin LUN.

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

  • "off": disables the alarm function.
  • "on": enables 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.

compression_enabled=?

Whether the compression function is enabled.

NOTE:

OceanStor 2200 V3 does not support this parameter.

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

  • "yes": enables the deduplication function.
  • "no": disables the deduplication function.

The default is "no".

compression_method=?

LUN compression algorithm.

NOTE:

OceanStor 2200 V3 does not support this parameter.

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

  • "fast": The speed is the priority.
  • "deep": The compression rate is the priority.

The default is "fast".

dedup_enabled=?

Whether the deduplication function is enabled.

NOTE:

OceanStor 2200 V3 does not support this parameter.

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

  • "yes": enables the deduplication function.
  • "no": disables the deduplication function.

The default is "no".

bytecomparison_enabled=?

Whether the byte-by-byte comparison function is enabled.

NOTE:

OceanStor 2200 V3 does not support this parameter.

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

  • "yes": enables the byte-by-byte comparison function.
  • "no": disables the byte-by-byte comparison function.

The default value is "no".

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 are separated by commas (,), and LUN ID ranges are separated by hyphens (-), such as: 0,5-8.

intelligent_dedup_enabled=?

Whether the intelligent deduplication function is enabled.

NOTE:

OceanStor 2200 V3 does not support this parameter.

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

  • "yes": enables the intelligent deduplication function.
  • "no": disables the intelligent deduplication function.

The default value is "yes".

dedup_metadata_sample_ratio=?

Deduplication metadata sampling ratio.

NOTE:

OceanStor 2200 V3 does not support this parameter.

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

suffix_start_index=?

Suffix start index of the "name" parameter.

The value is an integer between 0 and 9998.

description=?

LUN description.

The value contains 1 to 255 characters.

capacity_alarm_threshold

Capacity alarm threshold.

The value is an integer between 1 and 95.

support_thinlun=?

Whether to support thin LUNs.

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

  • "yes": Thin LUNs are supported.
  • "no": Thin LUNs are not supported. If you select this value, a thick LUN is created by default.

The default value is "yes".

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=? | mirror_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=? | cow_grain_size=? | capacity_alarm_threshold=?] *
    • Copy the properties of a source LUN to create a LUN.create lun name=? [ number=? [suffix_start_index=?] | lun_id_list=? [suffix_start_index=?] ] copy_lun_id=? [ override_capacity=? | override_pool_id=? ] *
  • 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.
  • The capacity of a new LUN cannot be larger than the free capacity of the storage pool.
  • The scheduled migration policy automatically migrates data among tier 0, tier 1, and tier 2 at the specified time. For example, the policy migrates seldom accessed data to the low-performance and large-capacity storage tier 2 and migrates the frequently accessed data to the highest performance storage tier 0. This way of data migration strikes a balance between performance, capacity, and costs by taking full advantage of different types of physical disks.
  • When you batch create LUNs and set parameter "capacity" to "remain", the capacity of the last created LUN may be different from that of the other LUNs or some LUNs cannot be created due to insufficient space because of the extent size alignment in LUN capacity allocation. Determine whether to use the remaining space to create LUNs based on the site requirements.

Example

  • Create a LUN and set its parameters as follows:
    • Name: newlun
    • ID of the owning storage pool: 1
    • LUN capacity: 100MB.
      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: 200MB.
      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 the owning 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.
  • Create a LUN and set its parameters as follows:
    • Name: newlun
    • ID of the owning storage pool: 0
    • LUN capacity: 100MB
    • LUN type: thin
    • Capacity alarm threshold: 90.
      admin:/>create lun name=newlun pool_id=0 capacity=100MB lun_type=thin capacity_alarm_threshold=90 
      WARNING: You are about to create thin LUNs. The performance of thin LUNs is lower than that of thick LUNs. 
      Suggestion: Create thick LUNs for video surveillance scenarios. 
      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.
  • Create a LUN and set its parameters as follows:
    • Name: newlun
    • ID of the owning storage pool: 1
    • LUN capacity: 1GB
    • SmartTier policy: automatic.
      admin:/>create lun name=newlun pool_id=0 capacity=1GB relocation_policy=automatic 
      WARNING: The current SmartTier policy is automatic relocation. The policy takes effect only after the I/O monitoring function is enabled. 
      Suggestion: Check whether the I/O monitoring function is enabled. 
      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.
  • Create a LUN and set its parameters as follows:
    • Name: newlun
    • ID of the owning storage pool: 1
    • LUN capacity: 1GB
    • SmartTier policy: lowest_available.
      admin:/>create lun name=newlun pool_id=0 capacity=1GB relocation_policy=lowest_available 
      WARNING: The current SmartTier policy is relocation to the low-performance tier. If the amount of data to be relocated is too large, the low-performance tier may be used up. As a result, data cannot be relocated to the low-performance tier. 
      Suggestion:  Ensure that the capacity configured for the low-performance tier can meet subsequent 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.
  • Create a LUN and set its parameters as follows:
    • Name: newlun
    • ID of the owning storage pool: 1
    • LUN capacity: 1GB
    • SmartTier policy: highest_available.
      admin:/>create lun name=newlun pool_id=0 capacity=1GB relocation_policy=highest_available 
      WARNING: The current SmartTier policy is relocation to the high-performance tier. If the amount of data to be relocated is too large, the high-performance tier may be used up. As a result, data cannot be relocated to the high-performance tier. 
      Suggestion:  Ensure that the capacity configured for the high-performance tier can meet subsequent 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-12

Document ID: EDOC1000138390

Views: 236569

Downloads: 150

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