Kapitel 3. DM-Multipath einrichten
Dieses Kapitel liefert eine Schritt-für-Schritt Vorgehensweise als Beispiel zur Konfiguration von DM-Multipath. Es umfasst die folgenden Arbeitsschritte:
- Grundlegende DM-Multipath Einrichtung
- Lokale Platten ignorieren
- Mehr Geräte zu der Konfigurationsdatei hinzufügen
3.1. DM-Multipath einrichten Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
Stellen Sie vor der Einrichtung von DM-Multipath auf Ihrem System sicher, dass Ihr System aktualisiert wurde und das Paket
device-mapper-multipath beinhaltet.
Verwenden Sie die folgende Vorgehensweise, um DM-Multipath für eine grundlegende Failover-Konfiguration einzurichten.
- Bearbeiten Sie die Datei
/etc/multipath.conf, indem Sie die folgenden Zeilen am oberen Ende der Datei auskommentieren. Dieser Abschnitt der Konfigurationsdatei setzt in seinem ursprünglichen Status alle Geräte auf die Blacklist. Sie müssen ihn auskommentieren, um Multipathing zu aktivieren.blacklist { devnode "*" }blacklist { devnode "*" }Copy to Clipboard Copied! Toggle word wrap Toggle overflow Nach dem Auskommentieren dieser Zeilen sollte dieser Abschnitt wie folgt erscheinen.blacklist { devnode "*" }# blacklist { # devnode "*" # }Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Die Standardeinstellungen für DM-Multipath sind im System einkompiliert und müssen nicht explizit in der Datei
/etc/multipath.confgesetzt werden.The default value ofpath_grouping_policyis set tofailover, 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 Kapitel 4, Die DM-Multipath Konfigurationsdatei.The initial defaults section of the configuration file configures your system that the names of the multipath devices are of the formmpathn; without this setting, the names of the multipath devices would be aliased to the WWID of the device. - Speichern Sie die Konfigurationsdatei und beenden Sie den Editor.
- Führen Sie die folgenden Befehle aus:
modprobe dm-multipath service multipathd start multipath -v2
modprobe dm-multipath service multipathd start multipath -v2Copy to Clipboard Copied! Toggle word wrap Toggle overflow Der Befehlmultipath -v2gibt multipathed-Pfade aus, die zeigen, welche Geräte multipath nutzen. Falls der Befehl nichts ausgibt, stellen Sie sicher, dass alle SAN-Verbindungen ordnungsgemäß eingerichtet sind und das System multipath nutzt.For further information on themultipathcommand output, see Abschnitt 5.4, »Multipath Command Output«. - Führen Sie den folgenden Befehl aus, um sicherzustellen, dass der multipath-Daemon zum Zeitpunkt des Bootens startet:
chkconfig multipathd on
chkconfig multipathd onCopy to Clipboard Copied! Toggle word wrap Toggle overflow
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 Kapitel 4, Die DM-Multipath Konfigurationsdatei.