clustermode iscsi and linux

On linux:
yum install iscsi-initiator-utils
cat /etc/iscsi/initiatorname.iscsi
InitiatorName=iqn.1994-05.com.redhat:a13e796d29d7

On cluster:
create a vserver

vserver setup
Step 1. Create a Vserver.
Enter the Vserver name: vs2
Choose the Vserver data protocols to be configured {nfs, cifs, fcp, iscsi}: iscsi
Choose the Vserver client services to be configured {ldap, nis, dns}:
Enter the Vserver's root volume aggregate {aggr1_node1, aggr1_node2, aggr2_node1} [aggr1_node1]: aggr2_node1
Enter the Vserver language setting, or "help" to see all languages [C]:
Enter the Vserver root volume's security style {unix, ntfs, mixed} [unix]:
Vserver creation might take some time to finish....
Vserver vs2 with language set to C created. The permitted protocols are iscsi.
Step 2: Create a data volume
You can type "back", "exit", or "help" at any question.
Do you want to create a data volume? {yes, no} [yes]:
Enter the volume name [vol1]:
Enter the name of the aggregate to contain this volume {aggr1_node1, aggr1_node2, aggr2_node1} [aggr1_node1]: aggr2_node1
Enter the volume size: 300m
Enter the volume junction path [/vol/vol1]:
It can take up to a minute to create a volume...
Volume vol1 of size 300MB created on aggregate aggr2_node1 successfully.
Do you want to create an additional data volume? {yes, no} [no]: no
Step 3: Create a logical interface.
You can type "back", "exit", or "help" at any question.
Do you want to create a logical interface? {yes, no} [yes]:
Enter the LIF name [lif1]:
Which protocols can use this interface [iscsi]:
Enter the home node {cl1-01, cl1-02} [cl1-02]:
Enter the home port {e0c, e0d} [e0c]:
Enter the IP address: 192.168.1.112
Enter the network mask: 255.255.255.0
Enter the default gateway IP address:
LIF lif1 on node cl1-02, on port e0c with IP address 192.168.1.112 was created.
Configuring a SAN interface on all cluster nodes is recommended because it accommodates volume moves without subsequent path re-config, re-zoning, or re-discovery of new
paths on the host MPIO.
Do you want to create an additional LIF now? {yes, no} [no]: yes
Enter the LIF name [lif2]:
Which protocols can use this interface [iscsi]:
Enter the home node {cl1-01, cl1-02} [cl1-02]: cl1-01
Enter the home port {e0c, e0d} [e0c]:
Enter the IP address: 192.168.1.113
Enter the network mask: 255.255.255.0
Enter the default gateway IP address:
LIF lif2 on node cl1-01, on port e0c with IP address 192.168.1.113 was created.
Configuring a SAN interface on all cluster nodes is recommended because it accommodates volume moves without subsequent path re-config, re-zoning, or re-discovery of new
paths on the host MPIO.
Do you want to create an additional LIF now? {yes, no} [no]:
Step 4: Configure iSCSI.
You can type "back", "exit", or "help" at any question.
Do you want to configure iSCSI? {yes, no} [yes]:
Enter the igroup name [ig1]:

Enter the initiator names: iqn.1994-05.com.redhat:a13e796d29d7
(note: in centos 6 with iscsi-initiator-utils, the initiatorid can be found in /etc/iscsi/initiatorname.iscsi)

-Enter the initiator OS {solaris, windows, hpux, aix, linux, netware, vmware, openvms, xen, hyper_v} [vmware]: linux

Enter the LUN name [lun1]:
Enter the name of the volume that you want to use for the LUN [vol1]:
Enter the LUN size: 200m
Creating iSCSI service....
iSCSI for Vserver vs2 was configured.
igroup ig1 was created.
LUN lun1 was created.
LUN map was created.
Vserver vs2 is configured to use the iSCSI protocol.
Created a LUN of size 200m (209715200)
Vserver vs2, with protocol(s) iSCSI has been configured successfully.
cl1::vserver iscsi*> show
Target Target Status
Vserver Name Alias Admin
---------- -------------------------------- ---------------------------- ------
vs2 iqn.1992-08.com.netapp:sn.b51303b963d611e29250123478563412:vs.5
vs2 up

On linux:
chkconfig iscsi on
chkconfig iscsd on
iscsiadm -m discovery -t sendtargets -p 192.168.1.112
192.168.1.112:3260,1030 iqn.1992-08.com.netapp:sn.b51303b963d611e29250123478563412:vs.5
192.168.1.113:3260,1031 iqn.1992-08.com.netapp:sn.b51303b963d611e29250123478563412:vs.5
/etc/init.d/iscsi restart
(initiator is now logged in to target...check on filer with vserver iscsi initiator show)

tail /var/log/messages
Jan 21 15:36:39 centos iscsid: Connection1:0 to [target: iqn.1992-08.com.netapp:sn.b51303b963d611e29250123478563412:vs.5, portal: 192.168.1.112,3260] through [iface: default] is operational now
Jan 21 15:38:13 centos kernel: sde: sde1

fdisk /dev/sde
*create a new partition called sde1*

mkdir /iscsimount
mkfs /dev/sde1
mount /dev/sde1 /iscsimount

*put it in /etc/fstab*

This entry was posted in netapp. Bookmark the permalink.

Comments are closed.