转载请联系:郭晋兵 guojb@cloudbin.cn
目的:配置Storwize存储iSCSI服务,并在window和Linux客户端连接
- 配合网口IP地址,最多可以配置4个
![](http://www.cloudbin.cn/wp-content/uploads/2018/12/图片20-1024x452.png)
- 在iSCSI主机上设置iQN,以win2012为例
![](http://www.cloudbin.cn/wp-content/uploads/2018/12/图片21-1024x419.png)
![](http://www.cloudbin.cn/wp-content/uploads/2018/12/图片22.png)
- 在v5000上用iqn创建主机
![](http://www.cloudbin.cn/wp-content/uploads/2018/12/图片23-1024x458.png)
![](http://www.cloudbin.cn/wp-content/uploads/2018/12/图片24.png)
- 在v5000上LUN映射到ISCSI主机在v5000上LUN映射到ISCSI主机
![](http://www.cloudbin.cn/wp-content/uploads/2018/12/图片25-1024x487.png)
- 在iSCSI主机上安装MPIO多路径软件,以win2012为例
![](http://www.cloudbin.cn/wp-content/uploads/2018/12/图片26-1024x435.png)
![](http://www.cloudbin.cn/wp-content/uploads/2018/12/图片27-1024x631.png)
- 配置MPIO
![](http://www.cloudbin.cn/wp-content/uploads/2018/12/图片28-1024x473.png)
![](http://www.cloudbin.cn/wp-content/uploads/2018/12/图片29.png)
- 添加存储iSCSI连接
![](http://www.cloudbin.cn/wp-content/uploads/2018/12/图片30.png)
- 扫描iSCSI磁盘
![](http://www.cloudbin.cn/wp-content/uploads/2018/12/图片31-1024x415.png)
linux下的iscsi initiate配置
配置iscsi
[root@client ~]# yum -y install iscsi-initiator-utils //安装客户端工具
查找自己的iqn名字
[root@localhost ~]# cat /etc/iscsi/initiatorname.iscsi
InitiatorName=iqn.1994-05.com.redhat:848dcaf11552
- 在v5000上添加主机,并做1T的盘映射
![](http://www.cloudbin.cn/wp-content/uploads/2018/12/图片32-1024x464.png)
![](http://www.cloudbin.cn/wp-content/uploads/2018/12/图片33-1024x418.png)
![](http://www.cloudbin.cn/wp-content/uploads/2018/12/图片34-1024x494.png)
- 在linux主机上启动iscsi服务,并扫描iscsi LUN
![](http://www.cloudbin.cn/wp-content/uploads/2018/12/图片35.png)
[root@localhost ~]# iscsiadm -m session -o show
tcp: [1] 192.168.1.40:3260,1 iqn.1986-03.com.ibm:2145.v5000.node1 (non-flash)
tcp: [2] 192.168.1.41:3260,2 iqn.1986-03.com.ibm:2145.v5000.node2 (non-flash)
[root@localhost ~]# iscsiadm -m node –login
Logging in to [iface: default, target: iqn.1986-03.com.ibm:2145.v5000.node1, portal: 192.168.1.40,3260] (multiple)
Logging in to [iface: default, target: iqn.1986-03.com.ibm:2145.v5000.node2, portal: 192.168.1.41,3260] (multiple)
Login to [iface: default, target: iqn.1986-03.com.ibm:2145.v5000.node1, portal: 192.168.1.40,3260] successful.
Login to [iface: default, target: iqn.1986-03.com.ibm:2145.v5000.node2, portal: 192.168.1.41,3260] successful.
![](http://www.cloudbin.cn/wp-content/uploads/2018/12/图片36.png)
[root@localhost ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 1T 0 disk
sdb 8:16 0 1T 0 disk
vda 252:0 0 100G 0 disk
├─vda1 252:1 0 1G 0 part /boot
├─vda2 252:2 0 19G 0 part
│ ├─centos-root 253:0 0 96G 0 lvm /
│ └─centos-swap 253:1 0 2G 0 lvm [SWAP]
└─vda3 252:3 0 80G 0 part
└─centos-root 253:0 0 96G 0 lvm /
安装多路径软件
安装
yum install device-mapper-multipath
设置开机启动
systemctl enable multipathd.service
添加配置文件
[root@localhost ~]# vi /etc/multipath.conf
blacklist {
devnode “^vda”
}
defaults {
user_friendly_names yes
path_grouping_policy multibus
failback immediate
no_path_retry fail
}
- 启动服务
systemctl start multipathd.service
查看多路径
![](http://www.cloudbin.cn/wp-content/uploads/2018/12/图片37.png)
- 查看挂载的1T硬盘
![](http://www.cloudbin.cn/wp-content/uploads/2018/12/图片38.png)
- 完。2018.12.10