为运行 Linux 操作系统的主机配置设备映射器多路径 (DMMP) 工具

为连接至系统的主机配置 Linux 操作系统之前,请确保针对将设备映射器多路径工具 (DMMP) 用作多路径驱动程序的 Linux 主机正确安装并配置了适当的 DMMP。 目前,Red Hat Enterprise Linux 5 及更高版本和 SUSE Linux Enterprise Server 11 均支持将 DMMP 作为多路径驱动程序,并将其包含在分发光盘上。

  1. 确保在您的 Linux 主机上安装了 DMMP 程序包:
  2. 在 DMMP 配置文件 /etc/multipath.conf 中,确保缺省设置的值如Linux 主机设置所述。
    Note: Linux 通常会自动启用多路径。但是,在某些情况下(例如,RH 6.3 SAN 引导安装时),没有正确配置多路径。如果发生这种情况,您必须手动编辑 /etc/multipath.conf 文件。 有关 DM 多路径的信息,请参阅由 Linux 供应商针对您的内核提供的 LinuxStorage Administration GuideDM-Multipathing Installation and Configuration Guide。有关 Linux 系统配置的更多信息,请参阅以下 Web 站点:

    http://www.ibm.com/support/knowledgecenter/linuxonibm/liaab/ic-homepage.htm

    Note: 如果您正在使用 RHEL6 或 SUSE Linux Enterprise Server 11 Service Pack 2,请使用 prio "alua" 代替 prio_callout "/sbin/mpath_prio_alua /dev/%n",以禁用 Using deprecated prio_callout 消息。该值仅禁用错误消息,并且不影响操作。 如果 SUSE Linux Enterprise Server 11 Service Pack 2 上设置了 prio_callout "/sbin/mpath_prio_alua /dev/%n",那么使用多路径命令时,会针对所有设备发出 Using deprecated prio_callout 消息。
  3. 要在操作系统引导期间启用 DMMP 自动装入,请作为 root 用户发出以下命令:
    • 针对 Red Hat Enterprise Linux 5 或更高版本,发出以下某个命令:
      • chkconfig multipathd on
      • chkconfig --level 345 multipathd on
        Note: 此命令会在引导时启用 multipathd 服务启动。
    • 对于 SUSE Linux Enterprise Server 11,发出以下某个命令:
      • chkconfig boot.multipath on
      • chkconfig --level 345 boot.multipath on
        Note: 此命令会在引导时启用 boot.multipath 服务启动。
      运行其中一条命令后,请发出以下某个命令:
      • chkconfig multipathd on
      • chkconfig --level 345 multipathd on
        Note: 此命令会在引导时启用 multipathd 服务启动。
  4. 请完成以下步骤以手动启动 DMMP:
    1. Optional: 如果您正在使用 SUSE Linux Enterprise Server,请在启动 DMMP 之前运行 /etc/init.d/boot.multipath start 命令。
    2. 发出 /etc/init.d/multipathd start 命令以启动 DMMP 守护程序。
    3. 运行命令 multipathmultipath -v2 以扫描多路径设备。
    4. 发出 multipath -ll 命令以查看多路径设备的详细信息。该命令具有以下输出:
      mpath1 (36005076801860022900000000000019a)  IBM,2145
      [size=2.0G][features=0][hwhandler=0]
      \_ round-robin 0 [prio=200][ enabled]
      \_ 4:0:0:1 sdd  8:48   [active][ready]
      \_ 5:0:0:1 sdt  65:48  [active][ready]
      \_ round-robin 0 [prio=40][ active]
      \_ 4:0:2:1 sdak 66:64  [active][ready]
      \_ 5:0:2:1 sdal 66:80  [active][ready]
Note: 如果发出 multipath 命令后找不到新设备,那么必须重新装入 HBA 驱动程序或者重新引导服务器,并在 Linux 识别了 SCSI 层中名称类似于 sd* 的新设备之后重新发出 multipath 命令。在 DMMP 可识别新设备并对其进行管理之前,HBA 驱动程序必须识别出新设备。要查看多路径设备的详细状态,请发出 multipath -ll 命令。