1 您需要了解

  • 存储版本:OceanStor Dorado 6000 V6 6.1.2 ,您可参考相关文章 G007/G008 完成存储搭建及配置
  • OS 版本:Oracle Enterprise Linux 8.2.0,您可参考相关文章 G004 完成 Linux 系统安装
  • 存储业务 IP:192.168.100.200
  • OS IP:192.168.100.88

2 Linux 发起连接

2.1 查看 iSCSI 号

[root@cloudcs ~]# cat /etc/iscsi/initiatorname.iscsi 
InitiatorName=iqn.1988-12.com.oracle:99c3ba5af9ec

2.2 客户端发起连接

  • 测试网络连通性
[root@cloudcs ~]# ping 192.168.100.200
PING 192.168.100.200 (192.168.100.200) 56(84) bytes of data.
64 bytes from 192.168.100.200: icmp_seq=1 ttl=64 time=0.426 ms
64 bytes from 192.168.100.200: icmp_seq=2 ttl=64 time=0.424 ms
64 bytes from 192.168.100.200: icmp_seq=3 ttl=64 time=0.381 ms
^C
--- 192.168.100.200 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 7ms
rtt min/avg/max/mdev = 0.381/0.410/0.426/0.026 ms
  • 向存储发起连接
[root@cloudcs ~]# iscsiadm --mode discovery --type st --portal 192.168.100.200
192.168.100.200:3260,513 iqn.2014-08.com.example::2100020000040506::20200:192.168.100.200

[root@cloudcs ~]# iscsiadm --mode node --login
Logging in to [iface: default, target: iqn.2014-08.com.example::2100020000040506::20200:192.168.100.200, portal: 192.168.100.200,3260]
Login to [iface: default, target: iqn.2014-08.com.example::2100020000040506::20200:192.168.100.200, portal: 192.168.100.200,3260] successful.

3 存储添加启动器

  • 服务-主机组

Snipaste_20220423_163314.png

  • 启动器-iSCSI

Snipaste_20220423_163651.png

  • 关联主机

Snipaste_20220423_163831.png

Snipaste_20220423_163840.png

4 Linux 发现 LUN

[root@cloudcs ~]# iscsiadm --mode node --logout
[root@cloudcs ~]# iscsiadm --mode node --login

[root@cloudcs ~]# fdisk -l
Disk /dev/nvme0n1: 50 GiB, 53687091200 bytes, 104857600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x645b5c9a

Device         Boot    Start       End  Sectors  Size Id Type
/dev/nvme0n1p1 *        2048   1026047  1024000  500M 83 Linux
/dev/nvme0n1p2       1026048  17803263 16777216    8G 82 Linux swap / Solaris
/dev/nvme0n1p3      17803264 104857599 87054336 41.5G 83 Linux


Disk /dev/sda: 5 GiB, 5368709120 bytes, 10485760 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

该磁盘 /dev/sda 为存储映射过来的 LUN


  • END