- 論壇徽章:
- 0
|
寫一下我的大致配置過程吧:
1,設(shè)置服務(wù)器和存儲(chǔ)的網(wǎng)絡(luò)參數(shù)
我的服務(wù)器兩張網(wǎng)卡,一個(gè)連接內(nèi)網(wǎng),ip為192.168.10.190,另一個(gè)網(wǎng)卡連接存儲(chǔ):172.16.10.10
修改服務(wù)器的/etc/hosts,增加一行:
192.168.10.190 hostname (這個(gè)192.168.10.190是存儲(chǔ)的管理IP可以連接的,如果這項(xiàng)設(shè)置不好,后面在存儲(chǔ)中會(huì)出現(xiàn)“host agent not reachable",這個(gè)不影響正常的數(shù)據(jù)鏈路)
存儲(chǔ)的SPB的那個(gè)與服務(wù)器連接的iscsi端口ip設(shè)置為172.16.10.4(我沒有用交換機(jī)連接,只是將網(wǎng)線直接連接到存儲(chǔ),這是測(cè)試,后面實(shí)際應(yīng)用中肯定要用交換機(jī)實(shí)行多路。)
2,安裝軟件:
在服務(wù)器上安裝下列軟件:
iscsi-initiator-utils
naviagent
naviserverutilcli
后面兩個(gè)軟件在emc的core server support 光盤里有
3,discovery target &向存儲(chǔ)注冊(cè)主機(jī)
a,啟動(dòng)iscsi服務(wù):/etc/init.d/iscsi start
b,iscsiadm -m discovery -t st -p 172.16.10.4
此時(shí)會(huì)列出存儲(chǔ)上所有的target,根據(jù)自己的情況選擇連接哪一個(gè)
c,向存儲(chǔ)注冊(cè)主機(jī)
先停止 host agent :/etc/init.d/naviagent stop
./naviserverutilcli
先選擇“1”,可以列出發(fā)現(xiàn)在的存儲(chǔ),例如我這里輸出如下:
- # ./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
復(fù)制代碼
如果你確認(rèn)“Connected Storage Systems:“中列出的是你所要連接的存儲(chǔ),然后按“u",稍后在Navisphere Manager 中,右鍵你的存儲(chǔ),
選擇:“Connectivity Status“,如果正常的話,在打開的窗口中就能看到"Initiator Name" 為你的服務(wù)器的Initiator Name(在/etc/iscsi/initiatorname.iscsi中的那個(gè)以iqn開頭的)的
主機(jī)存在,確認(rèn)此主機(jī)的“Logged In"和“Registered"都為“YES”,如果“Registered"為No,則可再次運(yùn)行naviserverutilcli進(jìn)行注冊(cè)。
5,為主機(jī)分配LUN,這個(gè)不細(xì)說了
6,在服務(wù)器上啟動(dòng)host agent ,并重新啟動(dòng)iscsi服務(wù):
/etc/init.d/naviagent start
/etc/init.d/iscsi restart
7,這時(shí)候應(yīng)該就可以看到分配給這個(gè)服務(wù)器的磁盤了:
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
-
復(fù)制代碼
正常情況就是上面那樣,經(jīng)過反復(fù)嘗試,找出了我這次出問題的原因:
分配給server3的這個(gè)lun,我把這個(gè)lun的Ownership設(shè)置是這樣:
默認(rèn)屬于SPB,“Auto Assignment Enabled"這個(gè)沒有選上,但是我把從服務(wù)器來的網(wǎng)線連接到SPA的ISCSI端口上,所以出現(xiàn)這樣的問題
我把見到插到SPB的ISCSI端口上,就正常了,搞了半天沒想到是這里的問題 |
|