Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1676086
  • 博文数量: 391
  • 博客积分: 8464
  • 博客等级: 中将
  • 技术积分: 4589
  • 用 户 组: 普通用户
  • 注册时间: 2008-12-13 15:12
个人简介

狮子的雄心,骆驼的耐力,孩子的执著!

文章分类

全部博文(391)

文章存档

2023年(4)

2018年(9)

2017年(13)

2016年(18)

2014年(7)

2013年(29)

2012年(61)

2011年(49)

2010年(84)

2009年(95)

2008年(22)

分类:

2011-04-20 13:06:11

在redhat下查看wwn是件麻烦事,使用的是HP的QLogic QMH2562 8Gb Fibre Channel HBA for c-Class BladeSystem。RHEL4.X下可以看/proc/scsi/下的某个目录文件,RHEL5.X/sys/class/fc_host/目录下。
 
一、先安装官方的驱动:

32bit:

 

64bit:


查看WWN号,工具systool也可以实现:

[ tmp]# systool -c fc_host -v
Class = "fc_host"

  Class Device = "host13"
  Class Device path = "/sys/class/fc_host/host13"
    fabric_name         = "0xxxxxxxxxxxxx"
    issue_lip           =
    node_name           = "0xxxxxxxxxxx"
    port_id             = "0x331400"
    port_name           = "0xxxxxxxxxxx"
    port_state          = "Online"
    port_type           = "NPort (fabric via point-to-point)"
    speed               = "4 Gbit"
    supported_classes   = "Class 3"
    supported_speeds    = "1 Gbit, 2 Gbit, 4 Gbit"
    symbolic_name       = "QLE2460 FW:v4.04.09 DVR:v8.03.01.04.05.05-k"
    system_hostname     = ""
    tgtid_bind_type     = "wwpn (World Wide Port Name)"
    uevent              =

    Device = "host13"
    Device path = "/sys/devices/pci0000:00/0000:00:0a.0/0000:02:00.0/host13"
      ct                  =
      els                 =
      fw_dump             =
      nvram               = "ISP "
      optrom_ctl          =
      optrom              =
      reset               =
      sfp                 = ""
      uevent              =
      vpd                 = "?0"


  Class Device = "host14"
  Class Device path = "/sys/class/fc_host/host14"
    fabric_name         = "0xxxxxxxxxxx"
    issue_lip           =
    node_name           = "0xxxxxxxxxxx"
    port_id             = "0x331400"
    port_name           = "0xxxxxxxxxxx"
    port_state          = "Online"
    port_type           = "NPort (fabric via point-to-point)"
    speed               = "4 Gbit"
    supported_classes   = "Class 3"
    supported_speeds    = "1 Gbit, 2 Gbit, 4 Gbit"
    symbolic_name       = "QLE2460 FW:v4.04.09 DVR:v8.03.01.04.05.05-k"
    system_hostname     = ""
    tgtid_bind_type     = "wwpn (World Wide Port Name)"
    uevent              =

    Device = "host14"
    Device path = "/sys/devices/pci0000:80/0000:80:0b.0/0000:81:00.0/host14"
      ct                  =
      els                 =
      fw_dump             =
      nvram               = "ISP "
      optrom_ctl          =
      optrom              =
      reset               =
      sfp                 = ""
      uevent              =
      vpd                 = "?0"
     

可以看出os把两个hba识别为host13和host14(嗯~~风格和solaris很不一样)。一般情况下,一个卡
的node_name和port_name 就是指该HBA卡的wwn,他们的值是一样的。速度啊什么的该列的参数都给你列出来了。

还有一个借助systool能看到你的hba卡和哪些设备连接(或者说能看到哪些存储)。


[tmp]# systool -c fc_remote_ports -v|more
Class = "fc_remote_ports"

  Class Device = "0-0"
  Class Device path = "/sys/class/fc_remote_ports/rport-13:0-0"
    dev_loss_tmo        = "60"
    fast_io_fail_tmo    = "off"
    node_name           = "0xxxxxxxxxxxx"
    port_id             = "0x330400"
    port_name           = "0xxxxxxxxxxx"
    port_state          = "Online"
    roles               = "FCP Initiator"
    scsi_target_id      = "-1"
    supported_classes   = "Class 3"
    uevent              =
....

二、redhat  多路径软件:device-mapper-multipath.

多路径配置文件:/etc/multipath.conf

1.编辑注释掉以下几行:

blacklist {

             devnode "*"

}

默认将所有设备加入黑名单。

2.执行命令

modprobe dm-multipath  //加载多路径模块

lsmod |grep dm-multipath //查看是否加载多路径模块

/etc/init.d/multipathd restart // 重新启动多路径服务,监视路径,当路径损坏时进行路径切换。

chkconfig multipathd on //随机启动

multipath -v2 或 multipath -ll  //输出多路径的设备的路径。如果没有出现路径,可以使用multipath -F 刷新

备注:kpartx command:为设备中的分区生成设备映射器设备。这个命令对于DM-MP分区DOS是很有用的。device-mapper-multipath需要它。

multipath -k 进入互动模式,对于故障排除很有帮助

3.HBA卡信息查询

/sys/class/fc_host/hostx/port_name 或node_name  HBA卡的WWN号。

symbolic_name  HBA卡型号

speed HBA卡速度

port_state HBA卡状态

spupported_speed HBA卡支持的速度

在/sys/class/fc_host/目录下可以得到很过有关HBA卡的信息。

4.iscsi设备配置文件

 /etc/iscsi         initiatorname.iscsi     iscsid.conf   

/sys/class/iscsi_host

阅读(6352) | 评论(0) | 转发(0) |
0

上一篇:Nginx返回411错误

下一篇:vsftpd 最简单配置

给主人留下些什么吧!~~