First, iSCSI brief
Basic process
– 1. iscsi technical overview
– 2. The origin of iscsi
– 3. iscsi-HBA card
Iscsi technology
Iscsi technology: realizes the combination of physical hard disk device and TCP/IP network protocol, so that users can conveniently access the shared storage resources provided by the remote IDC through the Internet.
Common hard disk interface types are mainly IDE, SCSI and SATA:
IDE: is a stable, old-style parallel transmission interface. Common in old mechanical hard drives
SCSI: It is a general-purpose standard for system-level interfaces between computers and hard disks, optical drives, etc. It has the advantages of low system resource occupancy, fast speed, and high transmission speed.
SATA: A serial transmission interface with faster transfer speed and more complete data verification.
2. The origin of iscsi
IBM started research and development, a new network storage technology based on TCP/IP network protocol and SCSI interface protocol. This is the Internet Small Computer System Interface (iSCSI) that we are currently seeing. It is a kind of SCSI interface. New network storage technology combined with Ethernet technology.
The main purpose:
> Commands and data for transferring SCSI interfaces in the network;
> Achieve cross-regional storage resource sharing;
> Expand storage capacity without downtime;
Disadvantages:
> subject to network speed
> The traditional hard disk directly transmits data through the bus of the main board. Now it is necessary to make the Internet serve as the transmission carrier and channel of the data. Therefore, the transmission rate and stability of the network are the bottleneck of the iscsi technology.
3. iscsi-HBA card
The purpose is to solve the bottleneck problem of iscsi technology.
The difference between an ISCSI-HBA card and a general network card:
General NIC: Connect the network bus and memory for the computer to use.
iscsi-HBA card: Connects SCSI interface or FC (Fibre Channel) bus and memory, which is used to exchange storage data between hosts. The protocol used is also different from the general network card.
The working process of the iscsi-HBA card: the server running the Linux system will package the hard disk device commands and data into standard TCP/IP packets based on the iSCSI protocol, and then transmit them to the target storage device through the Ethernet. When the target storage device receives these After the data packet, the TCP/IP data packet is decompressed into hard disk device commands and data based on the iSCSI protocol.
First, iSCSI brief
Basic process
– 1. iscsi technical overview
– 2. The origin of iscsi
– 3. iscsi-HBA card
Iscsi technology
Iscsi technology: realizes the combination of physical hard disk device and TCP/IP network protocol, so that users can conveniently access the shared storage resources provided by the remote IDC through the Internet.
Common hard disk interface types are mainly IDE, SCSI and SATA:
IDE: is a stable, old-style parallel transmission interface. Common in old mechanical hard drives
SCSI: It is a general-purpose standard for system-level interfaces between computers and hard disks, optical drives, etc. It has the advantages of low system resource occupancy, fast speed, and high transmission speed.
SATA: A serial transmission interface with faster transfer speed and more complete data verification.
2. The origin of iscsi
IBM started research and development, a new network storage technology based on TCP/IP network protocol and SCSI interface protocol. This is the Internet Small Computer System Interface (iSCSI) that we are currently seeing. It is a kind of SCSI interface. New network storage technology combined with Ethernet technology.
The main purpose:
> Commands and data for transferring SCSI interfaces in the network;
> Achieve cross-regional storage resource sharing;
> Expand storage capacity without downtime;
Disadvantages:
> subject to network speed
> The traditional hard disk directly transmits data through the bus of the main board. Now it is necessary to make the Internet serve as the transmission carrier and channel of the data. Therefore, the transmission rate and stability of the network are the bottleneck of the iscsi technology.
3. iscsi-HBA card
The purpose is to solve the bottleneck problem of iscsi technology.
The difference between an ISCSI-HBA card and a general network card:
General NIC: Connect the network bus and memory for the computer to use.
iscsi-HBA card: Connects SCSI interface or FC (Fibre Channel) bus and memory, which is used to exchange storage data between hosts. The protocol used is also different from the general network card.
The working process of the iscsi-HBA card: the server running the Linux system will package the hard disk device commands and data into standard TCP/IP packets based on the iSCSI protocol, and then transmit them to the target storage device through the Ethernet. When the target storage device receives these After the data packet, the TCP/IP data packet is decompressed into hard disk device commands and data based on the iSCSI protocol.
Second, Freenas iSCSI service
Before configuring the iSCSI service, you should be familiar with the following iSCSI terminology:
CHAP: an authentication method which uses a shared secret and three-way authentication to determine if a system is authorized to access the storage device and to periodically confirm that the session has not been hijacked by another system. In iSCSI, the initiator (client) Perform the CHAP authentication.
Mutual CHAP: a superset of CHAP in that both ends of the communication authenticate to each other.
Initiator: a client which has authorized access to the storage data on the FreeNAS® system. The client requires initiator software in order to initiate the connection to the iSCSI share.
Target: a storage resource on the FreeNAS® system. Every target has a unique name known as an iSCSI Qualified Name (IQN).
Internet Storage Name Service (iSNS): protocol for the automated discovery of iSCSI devices on a TCP/IP network.
Extent: the storage unit to be shared. It can either be a file or a device.
Portal: indicates which IP(s) and port(s) to listen on for connection requests.
INI: stands for Logical Unit Number and represents a logical SCSI device. An initiator negotiates with a target to establish connectivity to a LUN; the result is an iSCSI connection that emulates a connection to a SCSI hard disk. Initiators treat iSCSI LUNs the same way As they would a raw SCSI or IDE hard drive; rather than installing remote directories, initiators format and directly manage filesystems on iSCSI LUNs. When configuring multiple iSCSI LUNs, create a new target for each LUN. Since iSCSI multiplexes a target with multiple LUNs over The same TCP connection, you will experience contention from TCP if there is more than one target per LUN.
Beginning with FreeNAS® 9.3, iSCSI is built into the kernel. This version of iSCSI supports Microsoft Offloaded Data Transfer (ODX), meaning that file copies happen locally, rather than over the network. It also supports the following VAAI (vStorage APIs for Array Integration) primitives, where VAAI is VMware’s API framework that enables certain storage tasks, such as large data moves, to be offloaded from the virtualization hardware to the storage array.
Unmap: tells ZFS that the space occupied by deleted files should be freed. Without unmap, ZFS is unaware of freed space made when the initiator deletes files. For this feature to work, the initiator must support the unmap command.
Atomic test and set: allows multiple initiators to synchronize LUN access in a fine-grained manner rather than locking the whole LUN, which would prevent other hosts from accessing the same LUN simultaneous.
Write same: when allocating virtual machines with thick provisioning, the necessary write of zeroes is done locally, rather than over the network, so virtual machine creation is much quicker.
Xcopy: similar to Microsoft ODX, copies happen locally rather than over the network.
Stun: if a volume runs out of space, this feature pauses any running virtual machines so that the space issue can be fixed, instead of reporting write errors.
Threshold warning: the system reports a warning when a configurable capacity is reached. In FreeNAS, this threshold can be configured at the pool level when using zvols (see Table 10.5a) or at the extent level (see Table 10.5f) for both file – and device-based extents. Typically, the warning is set at the pool level, unless file extents are used, in which case it must be set at the extent level.
LUN reporting: the LUN reports that it is thin provisioned.
To take advantage of these VAAI primitives, create a zvol using the instructions in Create zvol and use it to create a device extent, as described in Extents.
In order to configure iSCSI:
Review the target global configuration parameters.
Create at least one portal.
Determine which hosts are allowed to connect using iSCSI and create an initiator.
Decide if you will use authentication, and if so, whether it will be CHAP or mutual CHAP. If using authentication, create an authorized access.
Third Client setting
For Centos Linux Client
discover target
iscsiadm -m discovery -t sendtargets -p 10.1.1.51
connect target
iscsiadm -m node -d 1 -T iqn.1994-05.com.redhat:b55ade122187
-p 10.1.1.51:3260 -l
For Windows Client
use windows disk management connect the target