Target: Space which is being assigned from storage.
Initiator: Client who is connecting to and using Target.
Services: Depending on server role these services should be enabled/disabled.
- svc:/network/iscsi/initiator:default à Initiator Service
- svc:/system/iscsitgt:default àTarget Service
Configuring Target (Server) :
#Show current settings
iscsitadm show admin
* Assuming that a ZFS Volume named “Pool/Vol” is created in this regard.
Change base directory :
- Iscsitadm modify admin –d Pool/Vol
Create a target
- Iscsitadm create target –size X[m/g/t] [TARGET_NAME]
#To get iqn of initiator run on the initiator (Client) :
iscsiadm list initiator-node
- Implementing Security based on ACL:
- Iscsitadm create initiator –iqn [INITIATOR_IQN] [INITIATOR_NAME]
- Iscsitadm modify target –acl [INITIATOR_NAME] [TARGET_NAME]
#To remove an ACL
iscsitadm delete target -l [INITIAOR_NAME] [TARGETNAME]
#To find out the LUN UID
iscsitadm list target –v [TARGET-NAME]
e.g : LUN: 0
#To delete a target
iscsitadm delete target –u [LUN-NUMBER] [TARGET-NAME]
Configuring Initiator (Client) :
- Iscsiadm list discovery
Discovery: Static: disabled Send Targets: disabled iSNS: disabled |
Make Sure Static is enabled
Iscsiadm modify discovery –static enable
- Iscsiadm add discovery-address TARGET_SERVER_IPADDRESS
- Iscsiadm list discovery-address -v
Discovery Address: 192.168.1.191:3260 Target name: iqn.2006-01.com.openfiler:oracle.solaris-zfs Target address: 192.168.1.191:3260, 1 Target name: iqn.2006-01.com.openfiler:oracle.lvm-oracle1 Target address: 192.168.1.191:3260, 1 |
- Choosing a Target from list above, we add the target on initiator:
- Iscsiadm add static-config TARGET_NAME_IQN, IP_ADDRESS
- devfsadm -v -i iscsi
- format