iSCSI: Internet Small Computer System Interface
-
Upload
manoj-singh -
Category
Technology
-
view
142 -
download
0
Transcript of iSCSI: Internet Small Computer System Interface
iSCSI
• iSCSI is a TCP/IP based protocol for sendingSCSI commands over IP based networks.
• This allows iSCSI infrastructure to extendbeyond a local LAN, and be used on a WAN oreven over the internet.
Benefits
• Low cost – iSCSI uses the existing networkinfrastructure so there is no need to buyexpensive equipment.
• Easy installation and maintenance of iSCSISANs – commonly used TCP/IP networkprotocols require less IT expertise. Therefore,no special training is required for networkadministrators.
Benefits
• Excellent performance – it is a very good alternative tothe more expensive Fibre Channel technology.
• No distance limitation – using IP networking solves theproblem with data replication to remote sites.
• Interoperability and flexibility – iSCSI uses standardEthernet switches so there is no need to install specialcabling and switches required with Fibre Channel, it canalso run at different Ethernet speed.
Benefits
• Compatibility – It is compatible with manycommonly used standards, respected andrecognized by the Internet Engineering Task Force(IETF).
• Multipathing – iSCSI supports Multipathing toimprove network resiliency.
• Security – iSCSI offers security features such asChallenge Handshake Authentication Protocol (2-way CHAP) and Internet Protocol Security (IPsec).
iSCSI SANs are especially recommended to organizations:
• with limited budget and IT infrastructure,
• spread across several physical locations and willing to consolidate their storage resources,
• requiring remote data replication and disaster recovery,
• needing immediate and fast access to data and backup sets,
iSCSI SANs are especially recommended to organizations:
• working as Application Service Providers (ASPs), Internet Service Providers (ISPs) or Storage Service Providers (SSPs),
• utilizing demanding server Virtualization projects requiring network storage solutions.
Key iSCSI Terms
• IQN: iSCSI Qualified Names are used to identify both targets and initiators.
• Target: Storage resource on an iSCSI server.
• Initiator: A Client is called an initiator.
• Node: A single iSCSI target or initiator.
• Portal: A portal is an IP address on a target or initiator.
Steps: Creating an iSCSI volume
Step 1: Create LVM Drive for LUNs (Logical Unit Number)
Step 2: Create Logical Volumes for LUNs
Step 3: Define LUNs in Target Server
Commands to Create LVM Drive
Check the drive first:
# fdisk -l /dev/vda
Now, Create partition on that drive:
# fdisk -cu /dev/vda
• The option ‘-c‘ switch off the DOS compatible mode.
• The option ‘-u‘ is used to listing partition tables, give sizes in sectors instead of cylinders.
Commands to Create LVM Drive
# fdisk -cu /dev/vda
Choose n to create a New Partition: Command (m for help): n
Choose p to create a Primary partition:Command action
e extended
p primary partition (1-4): p
Commands to Create LVM Drive
Give a Partition number which you need to create:Partition number (1-4): 1
Define the size of that partition, use the default settings to use full size of Drive.
Choose the type of partition:Command (m for help): t
Commands to Create LVM Drive
Choose which partition want to change the type:Selected partition 1
Hex code (type L to list codes): 8e
Changed system type of partition 1 to 8e (Linux LVM)
Check the changes by print (p) option to list the partition tableCommand (m for help): p
Write the changes using w to exit from fdisk
Commands to Create LVM Drive
• Reboot the system and list the Partition table using the following fdisk command.
# fdisk -l /dev/vda
Commands to Create Logical Volumes
• Create Physical volume:# pvcreate /dev/vda1
• Create a Volume group with name of iSCSI to identify the group:
# vgcreate testvg /dev/vda1
• List volume group using vgs or vgdisplay:#vgs testvg
Commands to Create Logical Volumes
• Create one or more Logical volumes:# lvcreate -L 8G -n lv1 testvg
# lvcreate -L 8G -n lv2 testvg
• List the Physical volume, Volume group, logical volumes to confirm:
# pvs && vgs && lvs
# lvs
Commands to Define LUNs in Target Server
• Install the package scsi-target-utils:# yum –y install scsi-target-utils
• Start the service # service tgtd start; chkconfig tgtd on
• Open and edit Target configuration file ‘/etc/tgt/targets.conf’
Commands to Define LUNs in Target Server
• Append the following volume definition in target conf file.
iSCSI qualified name
2 LVs Shared for particular LUN.
Example: <target iqn.2014-07.com.test:tgt1>
backing-store /dev/testvg/lv1
</target>
• Save and close the file
Commands to Define LUNs in Target Server
• Reload the configuration by starting tgd service# /etc/init.d/tgtd reload
• Verify the available LUNs# tgtadm --mode target --op show
Configure an iSCSI Initiator
• Install the package iscsi-initiator-utils:# yum –y install scsi-initiator-utils
• Change the initiator name in the following file: ‘/etc/iscsi/initiatorname.iscsi’
• Start the service # service iscsi start; chkconfig iscsi on
Discover the target
Use the iscsiadm command to start the iSCSIdiscovery:# iscsiadm -m discovery -t st -p 192.168.0.10
To show the Information about target:# iscsiadm -m node
Log in to the target
Use the iscsiadm command to log in to discovered iSCSI target:# iscsiadm -m node –T <IQN name> -p 192.168.0.10 -l
• To stop using target:# iscsiadm -m node –T <IQN name> -p 192.168.0.10 –u
To delete all information about a target:# iscsiadm -m node –T <IQN name> -p 192.168.0.10 –op delete