Configuring iSCSI on an existing SVM
You can configure iSCSI on an existing storage virtual machine (SVM) and create a LUN and its containing volume. The iSCSI protocol must already be enabled but not configured on the SVM. This information is intended for SVMs for which you are configuring multiple protocols, but have not yet configured iSCSI.
- Connect IP-address-of-cluster-management-LIF in an ssh session and log in using your cluster administrator credential.
- Check the iSCSI service status. If the iSCSI service is not running, run the iscsi modify command to start the iSCSI service.
The following example makes the iSCSI service on SVM vs0 up.
DM-cluster::> vserver iscsi modify -vserver vs0 -status-admin up - Run the volume create command to create a volume on the SVM and storage aggregate.
The following example creates a new volume named vol0 on an SVM named vs0 and a storage aggregate named aggr0. Upon its creation, the volume is placed in the online state. The volume is 50 GB in size and the create operation runs in the background.
DM-cluster::> volume create -vserver vs0 -volume vol0 -aggregate aggr0 -size 50G -state online - Run the lun create command to create a new LUN of a specific size. When you create a LUN, you must specify the LUN OS type.
The following example creates a new LUN named lun0 with a size of 20 GB and OS type of Windows.
DM-cluster::> lun create -vserver vs0 -volume vol0 -lun lun0 -size 20GB -ostype windows - Run the igroup create command to create an initiator group (igroup). You can use igroups to control which hosts can access specific LUNs.
The following example creates an iSCSI igroup called igroup0 that contains the node name of the Windows host associated with that node name.
DM-cluster::> igroup create -vserver vs0 -igroup igroup0 -protocol iscsi -ostype windows -initiator iqn.1991-05.com.microsoft:eng1 - Run the network interface create command to create network logical interfaces (LIFs) for the SVM. An SVM serves data to clients through one or more LIFs. You must create LIFs on the ports you want to use to access data.
The following example creates an IPv4 LIF named vs0_data_iscsi_lif_11 on an SVM named vs0. Their home node is DM-cluster-01 and home port is e0c.
DM-cluster::> network interface create -vserver vs0 -lif vs0_data_iscsi_lif_11 -role data -data-protocol iscsi -home-node DM-cluster-01 -home-port e0c -address 192.168.88.188 -netmask 255.255.255.0NoteYou should create at least one LIF for each node in all SVMs serving data with iSCSI protocol. - Run the lun map command to map your LUNs to the igroups.
The following example maps LUN lun0 on SVM vs0 to igroup igroup0.
DM-cluster::> lun map -vserver vs0 -volume vol0 -lun lun0 -igroup igroup0You can run the lun show command to display the LUN setting.