1.软件准备
1)scst软件组:scst-1.0.1.1.tar.gz,iscsi-scst-1.0.1.tar.gz,scstadmin-1.0.6.tar.gz
下载地址:
2)mdadm-2.6.9-3.el5.x86_64.rpm
2.安装
1)mdadm: rpm -ivh mdadm-2.6.9-3.el5.x86_64.rpm
2)scst-1.0.1.1: make & make install
3)scstadmin-1.0.6:make & make install
4) iscst-scst-1.0.1:make & make install
备注:直接拷贝到linux下进行编译,mount上去的编译会出现问题。
3.加载
1)加载scst模块:
cd /lib/modules/2.6.18-92.e15/extra
modprobe scst
2)加载scst_vdisk模块
cd /lib/modules/2.6.18-92.e15/extra/Devicehandlers
modprobe scst_vdisk
4.配置文件拷贝
cp iscsi-scst-1.0.1/etc/scst.conf /etc/.
cp iscsi-scst-1.0.1/etc/iscsi-scstd.conf /etc/.
5.使用mdadm建raid
1)建raid0
fdisk /dev/sdx,格式化磁盘sdx,建立1个分区sdx1
mdadm -C /dev/md1 -l0 -n2 /dev/sd[b-c]1,对b,c磁盘的第一分区建立一个raid0
6.使用scstadmin建立lun,和iscsi target
scstadmin -adddev raid0-1 -handler vdisk -path /dev/md1
scstadmin -addgroup host1
scstadmin -adduser iqn.2011-08-17.macrosan.com:md1 -group host1
scstadmin -assigndev raid0-1 -group host1 -lun 0
7.修改iscsi-scstd.conf 将target名字更改为iqn.2011-08-17.macrosan.com:md1
8.启动iscsi-scst:/etc/init.d/iscsi-scsi start
9.在windows iscsi发起程序中填写信息
发起程序名称:iqn.2011-08-17.macrosan.com:md1
目标门户:linux机ip
刷新目标,可以看到iqn.2011-08-17.macrosan.com:md1
备注:若此处不能连接上,请试着关闭linux防火墙:service iptables stop