Configure FSx for NetApp ONTAP as a block datastore
FSx for ONTAP block storage can be presented to your ESX hosts over iSCSI or NVMe/TCP. Both protocols use the same FSx for ONTAP file system and result in a VMFS datastore. They differ in how you configure the ESXi storage adapter and provision the block device on ONTAP. NVMe/TCP requires a second-generation file system with 6 or fewer HA pairs. Choose one protocol and follow the corresponding sections.
Prerequisites
Before you use Amazon EVS with Amazon FSx for NetApp ONTAP, make sure that the following prerequisite tasks have been completed.
-
An Amazon EVS environment is deployed in your Virtual Private Cloud (VPC). For more information, see Getting started with Amazon Elastic VMware Service.
-
You have access to your vSphere client running on Amazon EVS.
-
You or your storage admin must have necessary permissions to create and manage FSx for ONTAP file systems in your VPC. For more information, see Identity and access management for Amazon FSx for NetApp ONTAP.
Create an FSx for NetApp ONTAP file system
Amazon EVS is a single Availability Zone service, but you can use either a Single-AZ or Multi-AZ FSx for ONTAP file system. If you choose a Multi-AZ file system, all VPC route tables used by your Amazon EVS host subnets must be associated with that file system. For the full file-system creation workflow, see Creating FSx for ONTAP file systems in the Amazon FSx for NetApp ONTAP User Guide.
When you reach the networking and volume configuration pages of the FSx creation wizard, apply the following Amazon EVS-specific settings:
-
Select the Amazon EVS VPC that has connectivity to your Amazon EVS VLAN subnets.
-
Select a security group that permits all required FSx for ONTAP iSCSI or NVMe/TCP traffic to the Amazon EVS host VMkernel management VLAN subnet.
-
Select the Amazon EVS service access subnet that your file system will be deployed in. For more information, see Service access subnet.
-
Within Default volume configuration, set Storage efficiency to Enabled.
Configure a software iSCSI adapter in vSphere for ESX host storage
For each ESX host, you must configure the software iSCSI adapter so that your ESX
hosts can use it to access iSCSI storage.
For instruction to configure the software iSCSI adapter for ESX hosts in vSphere, see Add or Remove the Software iSCSI Adapter
After you configure the software iSCSI adapter, copy the iSCSI Qualified Name (IQN) associated with an iSCSI adapter. These values will be used later.
Configure a software NVMe over TCP adapter in vSphere for ESX host storage
For each ESX host, you must configure the software NVMe over TCP adapter so that your ESX hosts can use it to access NVMe/TCP storage.
For instructions to configure the software NVMe over TCP adapter for ESX hosts in vSphere, see Configuring NVMe over TCP on ESXi
After you configure the software NVMe over TCP adapter, copy the NVMe Qualified Name (NQN) associated with the ESXi host.
You can retrieve the host NQN by running esxcli nvme info get on the ESXi host.
These values will be used later.
Create an iSCSI LUN
FSx for ONTAP allows you to create Logical Unit Numbers (LUNs) that are specifically intended for iSCSI access, providing shared block storage to your ESX hosts. You use the NetApp ONTAP CLI to create a LUN.
The following is a sample command.
Note
It is recommended to configure the LUN size to 90% of the volume size.
lun create -vserver <your_svm_name> \ -path /vol/<your_volume_name>/<lun_name> \ -size <required_datastore_capacity> \ -ostype vmware
For more information, see Creating an iSCSI LUN in the FSx for ONTAP User Guide.
Configure and map an initiator group to the iSCSI LUN
Now that you have created an iSCSI LUN, the next step in the process is to create an initiator group (igroup) to connect the volume to the cluster and map the LUN to the initiator group.
You use the NetApp ONTAP CLI to perform these actions.
-
Configure the initiator group.
The following is a sample command. For
--initiator, use the iSCSI adapter IQNs that you copied in the previous step.igroup create <svm_name> \ -igroup <initiator_group_name> \ -protocol iscsi \ -ostype vmware \ -initiator <esxi_iqn_1>,<esxi_iqn_2>,<esxi_iqn_3>,<esxi_iqn_4> -
Confirm that the
igroupexists.lun igroup show -
Map the LUN to the initiator group. The following is a sample command.
lun mapping create -vserver <svm_name> \ -path /vol/<vol_name>/<lun_name> \ -igroup <initiator_group_name> \ -lun-id <scsi_lun_number_for this_datastore> -
Use the
lun show -pathcommand to confirm that the LUN is created, online, and mapped.lun show -path /vol/<vol_name>/<lun_name> -fields state,mapped,serial-hex
For more information, see Provisioning iSCSI for Linux or Provisioning iSCSI for Windows in the FSx for ONTAP User Guide.
Configure dynamic discovery of the iSCSI LUN in vSphere
To allow the ESX hosts to see the iSCSI LUN, you must configure dynamic discovery for each host in the vSphere client interface.
For the iSCSI server field, enter the (NFS) DNS name that you copied in the previous step.
For more information, see Configure Dynamic or Static Discovery for iSCSI and iSER on ESX
Host
Create an NVMe namespace
FSx for ONTAP allows you to create NVMe namespaces that are specifically intended for NVMe/TCP access, providing shared block storage to your ESX hosts. You use the NetApp ONTAP CLI to create a namespace, create a subsystem, map the namespace to the subsystem, and add your ESXi host NQNs.
The following are sample commands.
vserver nvme namespace create -vserver <your_svm_name> \ -path /vol/<your_volume_name>/<namespace_name> \ -size <required_datastore_capacity> \ -ostype vmware vserver nvme subsystem create -vserver <your_svm_name> \ -subsystem <subsystem_name> \ -ostype vmware vserver nvme subsystem map add -vserver <your_svm_name> \ -subsystem <subsystem_name> \ -path /vol/<your_volume_name>/<namespace_name> vserver nvme subsystem host add -vserver <your_svm_name> \ -subsystem <subsystem_name> \ -host-nqn <esxi_host_nqn>
Repeat the subsystem host add command for each ESXi host NQN that requires access to this namespace.
To verify, run:
vserver nvme namespace show -vserver <your_svm_name>
For more information, see Provisioning NVMe/TCP in the FSx for ONTAP User Guide.
Configure discovery of the NVMe namespace in vSphere
To allow the ESX hosts to see the NVMe namespace, you must add a controller on the NVMe over TCP adapter for each host in the vSphere client interface.
Use the SVM’s iSCSI LIF IP address as the target address when adding the controller; FSx for ONTAP uses the same SVM endpoints for both iSCSI and NVMe/TCP.
You can find this IP address in the Amazon FSx console on the SVM’s Endpoints tab, or by running network interface show -vserver <your_svm_name> -data-protocol nvme-tcp in the ONTAP CLI.
For more information, see Configuring NVMe over TCP on ESXi
Create a VMFS datastore in VMware vSphere
Virtual Machine File System (VMFS) datastores serve as repositories for VMware virtual machines.
Follow the instruction in Create a vSphere VMFS Datastore