centos连接磁盘柜

在centos 7上连接磁盘柜:

 

首先挂载

# mount /dev/cdrom /mnt/cdrom

mount: /dev/sr0 is write-protected,mounting read-only

 

安装iscsi

# cd /mnt/cdrom/Packages/

 

# ls iscsi*

iscsi-initiator-utils-6.2.0.873-21.el7.x86_64.rpm

iscsi-initiator-utils-iscsiuio-6.2.0.873-21.el7.x86_64.rpm

 

# rpm -Uvhiscsi-initiator-utils-6.2.0.873-21.el7.x86_64.rpm

iscsi-initiator-utils-iscsiuio-6.2.0.873-21.el7.x86_64.rpm

warning: iscsi-initiator-utils-6.2.0.873-21.el7.x86_64.rpm:Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY

Preparing...                         ################################# [100%]

Updating / installing...

  1:iscsi-initiator-utils-iscsiuio-6.################################# [50%]

  2:iscsi-initiator-utils-6.2.0.873-2#################################[100%]

 

安装成功,修改客户端名字

# more /etc/iscsi/initiatorname.iscsi

InitiatorName=iqn.1994-05.com.wanyi:9e424108f4f


重启iscsi服务

# systemctl start  iscsi.service

 

console上添加一个客户端192.168.188.13

wKiom1PvJlvx_0TJAAB3kNwK2C8644.gif


选择不进行身份验证

wKioL1PvJ_OzN-i_AAFE-EdWVGE748.jpg


设置客户机名称

wKiom1PvJu2zhJLYAAGXM0lwgQA217.jpg


SELF客户机添加逻辑资源

wKiom1PvJxmz-0gbAAEZV0Cfj44917.jpg

 

centos上查找Target

 

# iscsiadm -m discovery -t st -p192.168.188.128

192.168.188.128:3260,0iqn.2000-03.com.falconstor-ipstor.FalconStor-CDPVA.SELF-0

# iscsiadm -mnode

192.168.188.128:3260,0 iqn.2000-03.com.falconstor-ipstor.FalconStor-CDPVA.SELF-0

 

 

# iscsiadm -m node -Tiqn.2000-03.com.falconstor-ipstor.FalconStor-CDPVA.SELF-0 -p192.168.188.128:3260 -l

 

Logging in to [iface: default, target:iqn.2000-03.com.falconstor-ipstor.FalconStor-CDPVA.SELF-0, portal:192.168.188.128,3260] (multiple)

Login to [iface: default, target:iqn.2000-03.com.falconstor-ipstor.FalconStor-CDPVA.SELF-0, portal:192.168.188.128,3260] successful.

 

操作成功之后,fdisk -l可查看到新增加了一块盘

 

Disk /dev/sdb:10.7 GB, 10737418240 bytes, 20971520 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes /512 bytes

I/O size (minimum/optimal): 512 bytes / 512bytes

 

 


你可能感兴趣的:(linux,连接磁盘柜)