- 论坛徽章:
- 0
|
写一下我的大致配置过程吧:
1,设置服务器和存储的网络参数
我的服务器两张网卡,一个连接内网,ip为192.168.10.190,另一个网卡连接存储:172.16.10.10
修改服务器的/etc/hosts,增加一行:
192.168.10.190 hostname (这个192.168.10.190是存储的管理IP可以连接的,如果这项设置不好,后面在存储中会出现“host agent not reachable",这个不影响正常的数据链路)
存储的SPB的那个与服务器连接的iscsi端口ip设置为172.16.10.4(我没有用交换机连接,只是将网线直接连接到存储,这是测试,后面实际应用中肯定要用交换机实行多路。)
2,安装软件:
在服务器上安装下列软件:
iscsi-initiator-utils
naviagent
naviserverutilcli
后面两个软件在emc的core server support 光盘里有
3,discovery target &向存储注册主机
a,启动iscsi服务:/etc/init.d/iscsi start
b,iscsiadm -m discovery -t st -p 172.16.10.4
此时会列出存储上所有的target,根据自己的情况选择连接哪一个
c,向存储注册主机
先停止 host agent :/etc/init.d/naviagent stop
./naviserverutilcli
先选择“1”,可以列出发现在的存储,例如我这里输出如下:
- # ./naviserverutilcli
- Welcome to Navisphere Server Utility - version : 6.28.10.3.11
- Select from one of the following options: or Select '0' to exit the application.
- 1. Update Server Information - Select this option to send information about the server to all connected storage systems.
- 2. Snapshot Tasks (Navisphere Express only) - Select this option to perform Snapshot tasks on the source server or the secondary server.
- 3. Generate high availability report.
- 4. Display help for the application.
- > 1
- Scanning ...
- Connected Storage Systems:
- HBA/NIC Port Storage System SP Port SP IP Address
- -------------------------------------------------------
- 0 CKM00034700077 A 2 192.168.10.229
复制代码
如果你确认“Connected Storage Systems:“中列出的是你所要连接的存储,然后按“u",稍后在Navisphere Manager 中,右键你的存储,
选择:“Connectivity Status“,如果正常的话,在打开的窗口中就能看到"Initiator Name" 为你的服务器的Initiator Name(在/etc/iscsi/initiatorname.iscsi中的那个以iqn开头的)的
主机存在,确认此主机的“Logged In"和“Registered"都为“YES”,如果“Registered"为No,则可再次运行naviserverutilcli进行注册。
5,为主机分配LUN,这个不细说了
6,在服务器上启动host agent ,并重新启动iscsi服务:
/etc/init.d/naviagent start
/etc/init.d/iscsi restart
7,这时候应该就可以看到分配给这个服务器的磁盘了:
fdisk -l
我这里看到的是:
- # fdisk -l
- Disk /dev/sda: 146.1 GB, 146163105792 bytes
- 255 heads, 63 sectors/track, 17769 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Device Boot Start End Blocks Id System
- /dev/sda1 * 1 19 152586 83 Linux
- /dev/sda2 11873 17769 47367652+ 8e Linux LVM
- /dev/sda3 20 3970 31736407+ 8e Linux LVM
- /dev/sda4 3971 11872 63472815 5 Extended
- /dev/sda5 3971 7921 31736376 8e Linux LVM
- /dev/sda6 7922 11872 31736376 8e Linux LVM
- Partition table entries are not in disk order
- Disk /dev/sdb: 1288.4 GB, 1288490188800 bytes
- 255 heads, 63 sectors/track, 156650 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Device Boot Start End Blocks Id System
-
复制代码
正常情况就是上面那样,经过反复尝试,找出了我这次出问题的原因:
分配给server3的这个lun,我把这个lun的Ownership设置是这样:
默认属于SPB,“Auto Assignment Enabled"这个没有选上,但是我把从服务器来的网线连接到SPA的ISCSI端口上,所以出现这样的问题
我把见到插到SPB的ISCSI端口上,就正常了,搞了半天没想到是这里的问题 |
|