Note: The version here is 9.16.1 since that is what my customer is running, but things won't change much in older/newer ONTAP versions.
Carrying on from the previous post - Creating an iSCSI SVM and LUN in NetApp ONTAP System Manager 9.16.1 - where we created a LUN in ONTAP System Manager (which created a volume for the LUN and also mapped the LUN to an igroup). Now we create the 1) volume, 2) volume settings, 3) LUN mapping using the ONTAP CLI.
1) Volume Creates
For my 30TB LUN:
- I create a volume 10% bigger = 33TB
- Max-autosize is 50% bigger = 45TB
Volume create:
volume create
-vserver VSERVER~NAME
-volume VOLUME~NAME
-aggregate AGGREGATE~NAME
-size 33TB
-security-style UNIX
-max-autosize 45TB
-autosize-mode grow
-space-guarantee none
-percent-snapshot-space 0
-snapshot-policy SNAPSHOT~POLICY
-snapshot-locking-enabled true
-is-large-sie-enabled true
2) LUN Creates
LUN create:
lun create
-vserver VSERVER~NAME
-volume VOLUME~NAME
-lun LUN~NAME
-size 30TB
-t windows
-space-reserve disabled
-space-allocation true
lun create -vserver VSERVER~NAME -volume VOLUME~NAME -lun LUN~NAME -size 30TB -t windows -space-reserve disabled -space-allocation true
Note: See note in the Appendix below for space-reserve disabled (my customers system in an ASA but not ASA r2). Also added a note for space-allocation in there too.
3) LUN Mapping Creates
LUN mapping create:
lun mapping create
-vserver VSERVER~NAME
-volume VOLUME~NAME
-lun LUN~NAME
-igroup IGROUP~NAME
-lun-id LUN~ID
lun mapping create -vserver VSERVER~NAME -volume VOLUME~NAME -lun LUN~NAME -igroup IGROUP~NAME -lun-id LUN~ID
Using Excel to Build the Commands
It is straight forward to use Excel to build the commands. You just input you selection into the speadsheet and the command is generated for you.
- For volume create:
- Columns:
- Base Command, vserver, volume, aggregate, size, security-style, max-autosize, autosize-mode, space-guarantee, percent-snapshot-space, snapshot-policy, snapshot-locking-enabled, is-large-size-enabled
- Excel formula:
- =A2&" -vserver "&B2&" -volume "&C2& " -aggregate "&D2&" -size "&E2&" -security-style "&F2&" -max-autosize "&G2&" -autosize-mode "&H2&" -space-guarantee "&I2&" -percent-snapshot-space "&J2&" -snapshot-policy "&K2&" -snapshot-locking-enabled "&L2&" -is-large-size-enabled "&M2
- For lun create:
- Columns:
- Base Command, vserver, volume, lun, size, t, space-reserve, space-allocation, command
- Excel formula:
- =A2&" -vserver "&B2&" -volume "&C2&" -lun "&D2&" -size "&E2&" -t "&F2&" -space-reserve "&G2&" -space-allocation "&H2
- For lun mapping create:
- Columns:
- Base Command, vserver, volume, lun, igroup, lun-id, full command
- Excel formula:
- ="lun mapping create -vserver "&B2&" -volume "&C2&" -lun "&D2&" -igroup "&E2&" -lun-id "&F2
APPENDICES
Note: In the Appendix below I've had to replace < and > with { and }.
APPENDIX 1) ::> volume create ?
cluster1::} volume create -?
[ -vserver {vserver name} ] Vserver Name (default: vs_iscsi)
[-volume] {volume name} Volume Name
{ [[-aggregate] {aggregate name}] Aggregate Name
| [ -aggr-list {aggregate name}, ... ] List of Aggregates for FlexGroup
Constituents
[ -aggr-list-multiplier {1..1000} ] Aggregate List Repeat Count
[ -optimize-aggr-list {true|false} ] Have the System Optimize the Order of the
Aggregate List
| [ -auto-provision-as {FlexGroup} ] Automatically Provision as Volume of Type
[ -support-tiering {true|false} ] Automatically Provision FlexGroup on
FabricPools
[ -use-mirrored-aggregates {true|false} ] Automatically Provision FlexGroup on
Mirrored Aggregates
[ -encryption-type {none|volume|aggregate|mixed} ] Encryption Type
[ -nodes {nodename}, ... ] } List of Nodes Hosting the Volume
[ -size {{integer}[KB|MB|GB|TB|PB]} ] Volume Size
[ -state {online|restricted|offline|force-online|force-offline|mixed} ]
Volume State (default: online)
[ -policy {text} ] Export Policy (default: default)
[ -user {user name} ] User ID
[ -group {group name} ] Group ID
[ -security-style {security style} ] Security Style
[ -unix-permissions {unix perm} ] UNIX Permissions (default: ---rwxr-xr-x)
[ -junction-path {junction path} ] Junction Path
[ -comment {text (size 0..1023)} ] Comment
{ [ -max-autosize {{integer}[KB|MB|GB|TB|PB]} ] Maximum Autosize
[ -min-autosize {{integer}[KB|MB|GB|TB|PB]} ] Minimum Autosize
[ -autosize-grow-threshold-percent {percent} ] Autosize Grow Threshold Percentage
[ -autosize-shrink-threshold-percent {percent} ] Autosize Shrink Threshold Percentage
[ -autosize-mode {off|grow|grow_shrink} ] Autosize Mode
{ [ -space-slo {none|thick|semi-thick} ] Space SLO
| [ -space-guarantee|-s {none|volume} ] Space Guarantee Style
[ -type {RW|DP} ] } Volume Type (default: RW)
[ -snapdir-access {true|false} ] Snapshot Directory Access Enabled
(default: true)
[ -percent-snapshot-space {percent} ] Space Reserved for Snapshot Copies
[ -snapshot-policy {snapshot policy} ] Snapshot Policy (default: default)
[ -language {language_code} ] Language
[ -foreground {true|false} ] Foreground Process (default: true)
[ -nvfail {on|off} ] NVFAIL Option
[ -constituent-role {Constituent Roles} ] Constituent Volume Role
{ [ -qos-policy-group {text} ] QoS Policy Group Name
| [ -qos-adaptive-policy-group {text} ] } QoS Adaptive Policy Group Name
[ -caching-policy {text} ] Caching Policy Name
[ -snaplock-type {non-snaplock|compliance|enterprise} ] SnapLock Type
[ -vserver-dr-protection {protected|unprotected} ] Vserver DR Protection
[ -encrypt {true|false} ] Enable or Disable Encryption
[ -is-space-reporting-logical {true|false} ] Logical Space Reporting
[ -is-space-enforcement-logical {true|false} ] Logical Space Enforcement
[ -tiering-policy {Tiering Policy} ] Volume Tiering Policy (default: none)
[ -tiering-object-tags {text}, ... ] Tags to be Associated with Objects Stored
on a FabricPool
[ -storage-efficiency-mode {default|efficient} ] Storage Efficiency Mode
[ -analytics-state {Analytics State} ] File System Analytics State (default:
off)
[ -activity-tracking-state {Activity Tracking State} ] Activity Tracking State (default: off)
[ -key-manager-attribute {text} ] Key Manager Attribute
[ -anti-ransomware-state {disabled|enabled|dry-run|paused|dry-run-paused|enable-paused|disable-in-progress} ]
Anti-ransomware State (default: disabled)
[ -granular-data {disabled|basic|advanced} ] Granular data (default: disabled)
[ -snapshot-locking-enabled {true|false} ] Enable Snapshot Copy Locking (default:
false)
[ -is-large-size-enabled {true|false} ] Are Large Size Volumes and Files Enabled
[ -in-consistency-group {true|false} ] If this Volume is part of a Consistency
Group
APPENDIX 2) ::> lun create ?
cluster1::} lun create ?
[ -vserver {vserver name} ] Vserver Name (default: vs_iscsi)
{ [-path] {path} LUN Path
| -volume {volume name} Volume Name
[ -qtree {qtree name} ] Qtree Name (default: "")
[-lun] {text (size 1..255)} } LUN Name
{ [-size|-s] {san_size} LUN Size
| [ -file-path|-f {text (size 1..255)} ] File Path
[-ostype|-t] {LUN Operating System Format} OS Type
[ -space-reserve {enabled|disabled} ] Space Reservation (default: enabled)
[ -comment {text (size 0..254)} ] Comment
[ -space-allocation {enabled|disabled} ] Space Allocation (default: enabled)
[ -class {regular|protocol-endpoint|vvol} ] Class (default: regular)
{ [ -qos-policy-group {text} ] QoS Policy Group
| [ -qos-adaptive-policy-group {text} ] } QoS Adaptive Policy Group
[ -caching-policy {text} ] Caching Policy Name
[ -foreground {true|false} ] Foreground
[ -igroup-name {text (size 1..96)} ] Igroup
[ -initiators {text}, ... ] Igroup Initiators
APPENDIX 3) ::> lun mapping create ?
cluster1::} lun mapping create ? [ -vserver {vserver name} ] Vserver Name (default: vs_iscsi) { [-path] {path} LUN Path | -volume {volume name} Volume Name [ -qtree {qtree name} ] Qtree Name (default: "") [-lun] {text} } LUN Name [-igroup|-g] {text (size 1..96)} Igroup Name [[-lun-id] {0..4095}] LUN IDAPPENDIX 4) ::> Warning Vol or Autosize > 16TB / or setting large-size-enabledWarning: Either the specified volume size or maximum autosize is larger than 16 TB or you are setting is-large-size-enabled flag to true. This will result in the volume supporting larger size limits. The new limit on the size of the volume will be 300TB. The limit on the size of a file or LUN will be 128TB. If this volume will become the source of a SnapMirror relationship, creation of SnapMirror or FlexCache relationships is only supported with volumes that reside in clusters with an effective cluster version of 9.12.1 or later, because of incompatible size limits. Revert of the cluster to an earlier version is not supported when a volume supports larger size limits. All volumes must be 16 TB or less, have all files be 16TB or less, and have larger size limit support disabled prior to revert.Do you want to continue? {y|n}: yAPPENDIX 5) space-reserve and space-allocation from MAN pages[-space-reserve {enabled|disabled}] - Space ReservationSpecifies whether the space reservation setting is enabled or disabledfor the new LUN. If you set the parameter to enabled, the LUN is space-reserved. If you set the parameter to disabled, the LUN is non-space reserved. The default is for unified platforms is enabled.The default for ASA r2 platforms is disabled and cannot be changed.[-space-allocation {enabled|disabled}] - Space AllocationSpecifies the value for the space allocation attribute of the LUN. The space allocation attribute determines if the LUN supports the SCSI Thin Provisioning features defined in the Logical Block Provisioning section of the SCSI SBC-3 standard.- Specifying enabled for this parameter enables support for the SCSI Thin Provisioning features.- Specifying disabled for this parameter disables support for the SCSI Thin Provisioning features.- Hosts and file systems that do not support SCSI Thin Provisioning should not enable space allocation.- The default is enabled. On ASA r2 platforms, this default can not be changed.

Comments
Post a Comment