Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

第3章 DM-Multipath のセットアップ

この章では、DM-Multipath の設定の為の段階的手順の例を提供しています。 ここには以下のような手順が含まれています:
  • 基本的 DM-Multipath のセットアップ
  • ローカルディスクの無視
  • 設定ファイルへ更なるデバイスの追加

3.1. DM-Multipath のセットアップ

ご使用のシステムに DM-Multipath をセットアップする前に、システムが更新されており device-mapper-multipath が収納されていることを確認して下さい。
基本のフェイルオーバー設定には以下の手順を使用して DM-Multipath を セットアップします。
  1. ファイルの上部で以下の行をコメントアウトすることで、/etc/multipath.conf ファイルを編集します。設定ファイルのこのセクションはその初期状態で全てのデバイスをブラックリスト します。マルチパッシングを有効にするものは、それをコメントアウトする必要があります。
    blacklist {
            devnode "*"
    }
    
    これらの行をコメントアウトした後は、このセクションは次のようになります。
    # blacklist {
    #        devnode "*"
    # }
    
  2. DM-Multipath 用のデフォルト設定はシステムにコンパイルしてあるため、/etc/multipath.conf ファイル内で明示的にセットする必要はありません。
    The default value of path_grouping_policy is set to failover, so in this example you do not need to change the default value. For information on changing the values in the configuration file to something other than the defaults, see 4章DM-Multipath 設定ファイル.
    設定ファイルの初期デフォルトセクションは、マルチパスデバイス名が mpathn の形式になるようご使用のシステムを設定します; この設定がないと、マルチパスデバイス名はそのデバイスの WWID へとエイリアス化されます。
  3. 設定ファイルを保存してエディタを終了します。
  4. 以下のコマンドを実行します:
    modprobe dm-multipath
    service multipathd start
    multipath -v2
    
    multipath -v2 コマンドは、マルチパス化されたデバイスを 示すマルチパス化パス群を表示します。このコマンドが何も表示しない場合、全ての SAN 接続が正しくセットされていること、及びシステムがマルチパス化されていることを 確認します。
    For further information on the multipath command output, see 「Multipath Command Output」.
  5. 以下のコマンドを実行してマルチパスデーモンが確実に起動時にスタートするように します:
    chkconfig multipathd on
    
Since the value of user_friendly_name is set to yes in the configuration file the multipath devices will be created as /dev/mapper/mpathn. For information on setting the name of the device to an alias of your choosing, see 4章DM-Multipath 設定ファイル.