redhat之ISCSI 使用詳解

1、在RHEL5中安裝如下的包:iscsi-initiator-utils-6.2.0.868-0.18.el5.i386.rpmperl-Config-General-2.40-1.el5.noarch.rpm(這個包在光盤的cluster storage目錄下)

scsi-target-utils-0.0-5.20080917snap.el5.i386.rpm (這個包在光盤的cluster storage目錄下)

2、通過linux中的命令生成IQN編號
#iscsi-iname
iqn.1994-05.com.redhat:e5ab84c569a8
3、編輯配置文件
#vi /etc/tgt/targets.conf
在文件中加入
<target iqn.1994-05.com.redhat:e5ab84c569a8>
backing-store  /dev/sdb
</target>
4、啓動服務
service tgtd start
chkconfig tgtd on 
5、查看配置信息
# tgtadm --lld iscsi --op show --mode target


Target 1: iqn.1994-05.com.redhat:e5ab84c569a8
System information:
Driver: iscsi
State: ready
I_T nexus information:
LUN information:
LUN: 0
Type: controller
SCSI ID: deadbeaf1:0
SCSI SN: beaf10
Size: 0 MB
Online: Yes
Removable media: No
Backing store: No backing store
LUN: 1
Type: disk
SCSI ID: deadbeaf1:1
SCSI SN: beaf11
Size: 1000205 MB
Online: Yes
Removable media: No
Backing store: /dev/hdb
LUN: 2
Type: disk
SCSI ID: deadbeaf1:2
SCSI SN: beaf12
Size: 1000205 MB
Online: Yes
Removable media: No
Backing store: /dev/hdc
Account information:
ACL information:
ALL

fdi

客戶端

root@localhost Server]# rpm -qa |grep iscsi-initiator-utils-6.2.0.871-0.10.el5.i386.rpm
已經安裝了,所有就不用在安裝!!!
2、使用iSCSI存儲  兩個節點都要做這個操作。
客戶端要打開服務
/etc/init.d/iscsid start
# rm -rf /var/lib/iscsi/nodes/*
# rm -rf /var/lib/iscsi/send_targets/*
# iscsiadm -m discovery -t st -p 192.168.2.10 (發現)
192.168.2.10:3260,1 iqn.1994-05.com.redhat:1fad858d2494
# iscsiadm -m node -T iqn.1994-05.com.redhat:1fad858d2494 -p 192.168.2.10 -l (登錄)
 在RHEL5系統中, 確保如下服務開啓:iscsid network iscsi netfs
 3 在RAC1 RAC2上使用fdisk –l 會看到相同共享磁盤sdb 
Disk /dev/sdb: 107.3 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章