1.下载HBA卡的驱动,下面以QLOGIC QLE2670为例

去http://www.qlogic.com/pages/default.aspx网站,选择主页上的download,然后查找到QLE2670的驱动,

在驱动下载页面选择Linux Red Hat x64位,然后点击go,进入下一步,

找到Linux SuperInstaller (x86/x64) or FC-FCoE Driver for RHEL 6.2/6.3/6.4 (x86/x64)

其中一个驱动下载网址:

http://driverdownloads.qlogic.com/QLogicDriverDownloads_UI/ShowEula.aspx?resourceid=29215&docid=86282&ProductCategory=39&Product=1178&Os=65

直接下载

http://filedownloads.qlogic.com/Files/TempDownlods/86282/QLogic-REL2013U1-SuperInstaller-20130930-9.tgz

http://filedownloads.qlogic.com/Files/TempDownlods/86040/qla2xxx-src-v8.06.00.10.06.0-k.tar.gz

2460的下载地址

http://driverdownloads.qlogic.com/QLogicDriverDownloads_UI/SearchByProduct.aspx?ProductCategory=39&Product=934&Os=65

 

2.在redhat服务器上安装QLOGIC HBA 卡驱动

文件名称为:qla2xxx-src-v8.06.00.10.06.0-k.tar.gz

上传到服务器上或者直接在服务器上

wget http://filedownloads.qlogic.com/Files/TempDownlods/86040/qla2xxx-src-v8.06.00.10.06.0-k.tar.gz

解压缩并运行qlinstall安装驱动

#tar -xvf qla2xxx-src-v8.06.00.10.06.0-k.tar.gz

#cd qla2xxx-src-v8.06.00.10.06.0-k

#./qlinstall

3.查看HBA的信息,包括WWN

#cd /proc/scsi

#ls -lt

device_info qla2xxx scsi sg

#cd qla2xxx

#ls -lt

0 1

# more 0

QLogic PCI to Fibre Channel Host Adapter for HPAE311A:

Firmware version 4.06.03 [IP] [84XX] , Driver version 8.02.23

......

SCSI Device Information:

scsi-qla0-adapter-node=500110a00016bff5;

scsi-qla0-adapter-port=503310a00016bff4;

......

# more 1

QLogic PCI to Fibre Channel Host Adapter for HPAE311A:

Firmware version 4.06.03 [IP] [84XX] , Driver version 8.02.23

......

SCSI Device Information:

scsi-qla1-adapter-node=500110a000168995;

scsi-qla1-adapter-port=503310a000168994;

......

查看hba卡的wwn

cat /sys/class/fc_host/host0/port_name


4.安装emc powerpath for linux

EMC 的POWERPATH 软件不是免费的,在WWW.EMC.COM网站上无法下载要有帐号,而且这个帐号还不是免费帐号,我是其他地方程序。

驱动程序的名称为EMCPower.LINUX.5.7.SP1.GA.b029.tar.gz,该文件包括了多个操作系统的驱动,解压缩,名称为:EMCPower.LINUX-5.7.1.00.00-029.OL6_UEK2_R2.x86_64.rpm。

#rpm -Uvh EMCPower.LINUX-5.7.1.00.00-029.OL6_UEK2_R2.x86_64.rpm

注:找到自己系统相对应的版本安装

 

5.配置光纤交换机的ZONE

将HBA卡的WWN信息告知光纤交换机管理员,创建该主机访问存储的ZONE.

 

6.配置存储,创建LUN,并做相关的MAPPING操作

存储管理员根据要求,创建LUN,并定义HOST,最后进行MAPPING操作

 

7.重新启动OS,识别到SAN存储的盘,进行LVM管理,创建PV,VG,LV

#reboot

#fdisk -l


Disk /dev/sda: 644.2 GB, 644245094400 bytes

255 heads, 63 sectors/track, 78325 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes


Disk /dev/sdd: 644.2 GB, 644245094400 bytes

255 heads, 63 sectors/track, 78325 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

。。。。。。


Device Boot Start End Blocks Id System

/dev/cciss/c0d0p1 * 1 13 104391 83 Linux

/dev/cciss/c0d0p2 14 17844 143227507+ 8e Linux LVM


Disk /dev/emcpowera: 644.2 GB, 644245094400 bytes

255 heads, 63 sectors/track, 78325 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes


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


因为SAN盘是多路径的,所以/dev/sda,/dev/sdd等 都是一个盘的多个路径,安装了powerpath后,我们可以看到/dev/emcpowera 盘,这个盘是多个路径的集合盘(/dev/sda,/dev/sdd等),使用这个设备来创建PV.


#pvcreate /dev/emcpowera

#vgcreate datavg /dev/emcpowera

#lvcreate -L10g -n lv_oracle datavg

#mke2fs /dev/datavg/lv_oracle

#mkdir /oracle

#mount /dev/datavg/lv_oracle /oracle

 

#vi /etc/rc.local #保证下次系统启动是自动挂载该目录

增加:

mount /dev/datavg/lv_oracle /oracle

额外

1、查看HBA卡的速率:cat /sys/class/fc_host/host0/speed

2、查看HBA卡的类型:cat /sys/class/fc_host/host0/port_type

3、查看HBA卡的状态:cat /sys/class/fc_host/host0/port_state