Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install and deploy iSCSI client on CentOS system

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "how to install and deploy the iSCSI client on the CentOS system". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to install and deploy the iSCSI client on the CentOS system".

What is iSCSI?

ISCSI uses TCP/IP 's port 860 and 3260 as channels of communication. Through the exchange of SCSI commands between the two computers using the iSCSI protocol, the computer can simulate the SAN as a local storage device through a high-speed LAN hub.

ISCSI uses the TCP/IP protocol (typically TCP ports 860 and 3260). In essence, iSCSI allows two hosts to negotiate with each other over the IP network and then exchange SCSI commands. In this way, iSCSI uses the wide area network to simulate a commonly used high-performance local storage bus, thus creating a storage local area network (SAN). Unlike some SAN protocols, iSCSI does not require dedicated cables; it can run on existing switching and IP infrastructure. However, if you do not use a dedicated network or subnet (LAN or VLAN), the performance of the iSCSI SAN deployment can be severely degraded. As a result, iSCSI is often considered a low-cost alternative to fibre Channel (Fiber Channel), which requires a dedicated infrastructure. However, fibre Channel over Ethernet (FCoE) does not require a dedicated infrastructure.

Although iSCSI can communicate with any type of SCSI device, system administrators almost always use it to connect server computers (for example, database servers) and storage arrays on disk volumes. ISCSI SAN is usually used for two purposes:

(1) Storage integration: companies want to move different storage resources from servers scattered on the network to a unified location (often a data center); this makes the allocation of storage more efficient. Servers in a SAN environment can get newly assigned disk volumes without any changes to hardware or cable connections.

(2) disaster recovery: the company wants to mirror storage resources from one data center to another remote data center, which can be used as a hot backup in the event of a prolonged power outage. In particular, iSCSI SAN allows us to migrate an entire disk array on WAN with minimal configuration changes, essentially making storage "routable", just like normal network traffic.

Deploy iSCSI

Install scsi-target-utils

The code is as follows:

# yum install scsi-target-utils

# / etc/init.d/tgtd start

Create an iscsi target with an id of 1

The code is as follows:

# tgtadm-lld iscsi-op new-mode target-tid 1-T iqn.2013-12-13.target.sdb

-lld iscsi specifies the driver type

-op new New

-mode target target mode

-tid 1 assigns an id number to the following iscsi representation

-T iqn.2013-12-13.target.sdb

Create an identity of an iscsi shared disk, iqn is a format of identity, 2013-12-13 is a description of the creation time can be any string, target is the host name of the iscsi server can be any string, and sdb is the description of the shared device name can be any string

Add a logical volume to the iscsi target created in the previous step

The code is as follows:

# tgtadm-lld iscsi-op new-mode logicalunit-tid 1-lun 1-b / dev/sdb

-mode logicalunit mode is logical volume

-tid 1 assigns the logical volume to the iscsi target with id 1

-lun 1 sets the lun number to 1

-b / dev/sdb specifies the physical device used by the logical volume

Set the access policy of the iscsi target to allow everyone to access

The code is as follows:

Tgtadm-lld iscsi-op bind-mode target-tid 1-I ALL

View lun information

The code is as follows:

Tgtadm-lld iscsi-op show-mode target

Iscsi client installation

The code is as follows:

# yum install iscsi-initiator-utils

Discover iscsi target

The code is as follows:

# iscsiadm-m discovery-type sendtargets-portal 192.168.216.20 or

# iscsiadm-m discovery-t st-p 192.168.216.20

View iscsi Discovery name

The code is as follows:

Iscsiadm-m node

Log in to iscsi

The code is as follows:

Iscsiadm-m node-T iqn.2013-12-13.target.sdb-p 192.168.216.20-login

Or

The code is as follows:

Iscsiadm-m node-T iqn.2013-12-13.target.sdb-p 192.168.216.20-login

Or

The code is as follows:

Iscsiadm-m node-T iqn.2013-12-13.target.sdb-p 192.168.216.20-l

Port iscsi connection

The code is as follows:

# iscsiadm-m node-T iqn.2013-12-13.target.sdb-p 192.168.216.20-u

Delete iscsi Discovery

The code is as follows:

# iscsiadm-m node-o delete-T iqn.2013-12-13.target.sdb-p 192.168.216.20

Thank you for your reading, the above is the content of "how to install and deploy iSCSI client on CentOS system". After the study of this article, I believe you have a deeper understanding of how to install and deploy iSCSI client on CentOS system. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report