Creating an iSCSI LUN
This process describes how to create an iSCSI LUN on an Amazon FSx for NetApp ONTAP file system using the NetApp ONTAP CLI lun create command.
For more information, see lun create
Note
The iSCSI protocol isn't supported for file systems with more than six HA pairs.
This process assumes you already have a volume created on your file system. For more information, see Creating volumes.
To access the NetApp ONTAP CLI, establish an SSH session on the management port of the Amazon FSx for NetApp ONTAP file system by running the following command. Replace
with the IP address of the file system's management port.management_endpoint_ip
[~]$
ssh fsxadmin@
management_endpoint_ip
For more information, see Managing file systems with the ONTAP CLI.
Create a LUN using the lun create NetApp CLI command, replacing the following values:
-
- The name of the storage virtual machine (SVM) providing the iSCSI target. The host uses this value to reach the LUN.svm_name
-
- The name of the volume hosting the LUN.vol_name
-
- The name you want to assign to the LUN.lun_name
-
- The size, in bytes, of the LUN. The maximum size LUN you can create is 128 TB.size
Note
We recommend that you use a volume at least 5% larger than your LUN size. This margin leaves space for volume snapshots.
-
- The operating system of the host, eitherostype
windows_2008
orlinux
. Usewindows_2008
for all versions of Windows; this ensures the LUN has proper block offset for the operating system and optimizes performance.
Note
We recommend enabling space allocation on your LUN. With space allocation enabled, ONTAP can inform your host when the LUN is out of capacity and can reclaim space as you delete data from the LUN.
For more information, see
lun create
in the NetApp ONTAP CLI documentation. >
lun create -vserversvm_name
-path /vol/vol_name
/lun_name
-sizesize
-ostypeostype
-space-allocation enabledCreated a LUN of size 10g (10737418240)
-
Confirm the LUN is created, online, and mapped.
>
lun showThe system responds with the following output:
Vserver Path State Mapped Type Size --------- ------------------------------- ------- -------- ------------ --------
svm_name
/vol/vol_name
/lun_name
online unmapped windows_2008 10GB
Next steps
Now that you have created an iSCSI LUN, the next step in the process of using an iSCSI LUN
as block storage is to map the LUN to an igroup
. For more information, see
Provisioning iSCSI for Linux or
Provisioning iSCSI for Windows.