2012/11/02

Published 11月 02, 2012 by

RedHat iscsi initiator Setting

iSCSI initiator configuration in RedHat Enterprise Linux 5(linux認得到Netapp iscsi)



安裝initiator程式

[root@C5CLUSTER2 cluster]# yum install iscsi-initiator-utils



查看本機的iqn-可以看到本機的iqnà加入到netappInitiator Group,讓netapp認的到

[root@C5CLUSTER2 cluster]# cat /etc/iscsi/initiatorname.iscsi

InitiatorName=iqn.1994-05.com.redhat:2551bf29b48



加入target iscsi的連線

[root@C5TCluster1 ~]# iscsiadm -m discovery -t sendtargets -p 10.55.78.63



秀出目前的連線

[root@C5CLUSTER2 iscsi]# iscsiadm -m node

10.55.78.77:3260,2000 iqn.1992-08.com.netapp:sn.142241218

10.55.78.63:3260,2000 iqn.1992-08.com.netapp:sn.142241218



重新啟動iscsi

[root@C5CLUSTER2 iscsi]# service iscsi restart



可以看到Netapp iscsiPartition在裡面

[root@C5CLUSTER2 iscsi]# fdisk –l

Disk /dev/sda: 1073 MB, 1073741824 bytes

34 heads, 61 sectors/track, 1011 cylinders

Units = cylinders of 2074 * 512 = 1061888 bytes

Disk /dev/sda doesn't contain a valid partition table



iscsi重新整理之後,較敏感的ap會自動重開機(如Oracle asm)
A:手動新增disk之後,不重開機的狀況下可看到新disk(兩台都要做)
[root@C5TASM2 ~]# echo "- - -" >/sys/class/scsi_host/host0/scan







參考資料:鳥哥 iscsi 安裝