1 iSCSI Introduction
There are three main solutions for networked storage servers-- The main difference between Das Direct-attached storage, SAN area network storage, NAS network-attached storage, SAN and NAS is that the NAS shares a file system, and the San shares a block device.
iSCSI is a TCP/IP-based protocol used to establish and manage the connectivity between IP storage devices, hosts and clients, and to create Storage Area Network (SAN). SAN makes it possible for the SCSI protocol to be applied to high-speed data transmission networks, which are performed across multiple data storage networks at block level (block-level). The SCSI architecture is based on the C/S mode, and the typical application environment is that the devices are close to each other and the devices are connected by a SCSI bus. She is a ip-san technique.
the main function of ISCSI is between host systems (initiator initiator) and storage devices (target targets) on a TCP/IP network A large amount of data encapsulation and reliable transmission process.
2 examples
Deploy iSCSI first to install Scsi-target-utils
The LUN is the storage device identity, and IQN is the name of the iSCSI, in the format iqn.yyyy-mm.< the >:identifier of the write-down domain name, for example:
Iqn.2016-12.com.example.www:disk1
[Email protected]~]# yum install-y scsi-target-utils #安装target软件
[Email protected]~]# fdisk-l |grep/dev/sdb #查看磁盘信息sdb1 sdb2 sdb3
[[Email protected]~]# vim/etc/tgt/targets.conf
Default-driver iSCSI
<target iqn.2016-12.com.example.www:disk1> #定义标准名称
BACKING-STORE/DEV/SDB1 #指定设备路径
</target>
<target iqn.2016-12.com.example.www:disk2>
Backing-store/dev/sdb2
LUN 10
VENDOR_ID SSD Inc. #手动修改设备厂家信息
Incominguser Tom 123456 #设置用户Tom, and password 123456
</target>
<target iqn.2016-12.com.example.www:disk3>
Backing-store/dev/sdb3
LUN 20
Initiator-address 192.168.1.5 #指定可以访问该target的主机
Incominguser Tom 123456
</target>
[[Email protected]~]#/etc/init.d/tgtd Start
[[Email protected]~]# chkconfig TGTD on
[[Email protected]~]# iptables-i input-p TCP--dport 3260-j ACCEPT
[[Email protected]~]# service Iptables Save
[[Email protected]~]# tgtadm--lld iSCSI--op show--mode targer #查看设置好的target
Client Access 192.168.1.5
[email protected]~]# yum install-y scsi-target-utils #安装target软件
[[Email protected]~]# iscsiadm--mode discoverydb--type sendtargets--portal 192.168.1.6--discover #查看服务端的iqn信息
192.168.1.6:3260,1 Iqn.2016-12.com.example.www:disk1
192.168.1.6:3260,1 Iqn.2016-12.com.example.www:disk2
192.168.1.6:3260,1 Iqn.2016-12.com.example.www:disk3
[Email protected]~]# iscsiadm--mode node--targetname iqn.2016-12.com.example.www:disk1--portal 192.168.1.6:3260-login #挂载disk1设备
[Email protected]~]# fdisk-l |grep/dev/sd #查看磁盘挂载后的信息
This article is from the "Practical Linux knowledge and Skills sharing" blog, please be sure to keep this source http://superleedo.blog.51cto.com/12164670/1889012
iSCSI Networked Storage Technology-example interpretation