Connect to the iscsi disk array in CentOS/Linux
Full list of ISCSI disks connected to CentOS/Linux
ISCSI: Internet Small Computer System Interface
System Environment: CentOS 6.5 mini
Disk Array: Lenovo EMC
Iscsi ip: 192.168.100.201
1. Install ISCSI
1: Check whether iscsi is installed.
# Rpm-qa | grep iscsi
2: Install iscsi (if not installed)
# Yum-y install iscsi-initiator *
3. Start the iscsi service.
(The system runs automatically after startup by default)
#/Etc/init. d/iscsi restart
4: Set startup
# Chkconfig iscsid on
2. Connecting the entire disk Column
1: Search for the entire disk Column
# Iscsiadm-m discovery-t sendtargets-p 192.168.100.201: 3260
192.168.100.201: 3260,1 iqn.2009.eisoo.com: volume1
Note: 1: iscsiadm is a command line-based iscsi management tool that provides operations on iscsi nodes, sessions, connections, and discovery records.
2: By default, iscsi uses port 3260, so no 3260 is added to the portal.
2: log on to the node (connect to the disk array)
# Iscsiadm-m node-T iqn.2009.eisoo.com: volume1-p 192.168.100.201: 3260-l
3: Set automatic login upon system startup
# Iscsiadm-m node-T iqn.2009.eisoo.com: volume1-p 192.168.100.201: 3260 -- op update-n node. startup-v automatic IC
4: View All iscsi connections
# Iscsiadm-m session
5. View iscsi Storage
# Fdisk-l
Execute fdisk-l to list all disks, including iscsi storage. In this case, we can use it as a general disk.
Iii. Others
1: Check the iqn Of The iscsi-initiator on the local machine.
Note: Generally, this iqn number must be added to the iscsi disk array (the red part indicates the displayed iqn number)
# Cat/etc/iscsi/initiatorname. iscsi
InitiatorName = iqn.2009.eisoo.com: volume1
2: log out of the node (disconnect the disk array)
# Iscsiadm-m node-T iqn.1997-05.com. test: raid-p 192.168.100.201: 3260-u