ISCSI配置(虚拟机装ASM时需要)
[backcolor=inherit]1. [backcolor=inherit]Iscsi配置[backcolor=inherit]1.1. 安装[backcolor=inherit]iscsi rpm包[backcolor=inherit][font=undefined, sans-serif]Iscsi rpm包在Redhat光盘server目录中,复制到系统目录中
[backcolor=inherit][font=undefined, sans-serif] 使用root用户登录,输入命令:[table=98%,inherit]
[tr=inherit][td=533][backcolor=inherit]#rpm –ivh iscsi-initiator-utils-6.2.0.871-0.10.el5.i386.rpm
[backcolor=inherit][font=undefined, sans-serif] 安装成功后,会生成一个目录/etc/iscsi,该目录下有两个文件:[backcolor=inherit][font=undefined, sans-serif]Initiatorname.iscsi和iscsid.conf[backcolor=inherit]1.2. 启动[backcolor=inherit]ISCSI服务[backcolor=inherit][font=undefined, sans-serif]安装完iscsi服务默认是关闭的,需要手工启动[table=98%,inherit]
[tr=inherit][td=533][backcolor=inherit]#service iscsi start
[backcolor=inherit]1.3. 搜寻盘阵[backcolor=inherit][font=undefined, sans-serif]运行以下命令搜寻target,即目标端:7612i存储[table=98%,inherit]
[tr=inherit][td=533][backcolor=inherit]#iscsiadm --mode discovery --type sendtargets --portal 192.168.0.9[backcolor=inherit]192.168.0.9:3260,-1 iqn.2008-08.com.starwindsoftware:waitforsunny-virdisk
[backcolor=inherit][font=undefined, sans-serif]注意:[backcolor=inherit][font=undefined, sans-serif]上面IP地址是虚拟盘阵所在主机[backcolor=inherit][font=undefined, sans-serif]3260是虚拟盘阵所在主机端口[backcolor=inherit][font=undefined, sans-serif]iqn.2008-08.com.starwindsoftware:waitforsunny-virdisk是盘阵名称,依据盘阵设置命名,现场环境一定不是这个。[backcolor=inherit]1.4. 显示盘阵[backcolor=inherit][font=undefined, sans-serif]显示存储端target name[table=98%,inherit]
[tr=inherit][td=533][backcolor=inherit]#iscsiadm --mode node[backcolor=inherit]192.168.0.9:3260,-1 iqn.2008-08.com.starwindsoftware:waitforsunny-virdisk
[backcolor=inherit][font=undefined, sans-serif]注意:显示结果与在上一节名字相同[backcolor=inherit]1.5. 登陆盘阵[backcolor=inherit][font=undefined, sans-serif]target登陆[table=98%,inherit]
[tr=inherit][td=540][backcolor=inherit]# iscsiadm --mode node --targetname iqn.2008-08.com.starwindsoftware:waitforsunny-virdisk --portal 盘阵IP:3260 --login
[backcolor=inherit]1.6. 设置自动启动盘阵服务[backcolor=inherit][font=undefined, sans-serif]经过以上几步,fdisk –l就可以看到所挂接分区了,为确保重启后也能看到,再修改一下/etc/iscsi/iscsid.conf,将第5步的命令iscsiadm --mode node --targetname targetname --portal 盘阵IP:3260 –login[table=98%,inherit]
[tr=inherit][td=568][backcolor=inherit]# vi /etc/iscsi/iscsid.conf[backcolor=inherit] [backcolor=inherit]添加到该文件中的开始部分[backcolor=inherit]*****************[backcolor=inherit]# Startup settings[backcolor=inherit]#***************** 这个栏下面即可。[backcolor=inherit]iscsiadm --mode node --targetname iqn.2008-08.com.starwindsoftware:waitforsunny-virdisk --portal盘阵IP:3260 --login
[backcolor=inherit][font=undefined, sans-serif]注意:替换盘阵名称及IP