ISCSI Multipath

From Proxmox VE
Revision as of 16:35, 20 May 2010 by Chrwei (talk | contribs) (fix path to scsi_id binary)
Jump to navigation Jump to search

In order to have multipath working :

  • Add the debian repositories to /etc/apt/sources.list and install the multipath-tools
# aptitude update; aptitude install multipath-tools
  • Modify /etc/iscsi/iscsid.conf to allow automatic login to the targets by uncommenting/commenting the following lines
node.startup = automatic
#node.startup = manual
  • Depending on your SAN system you may have to configure things in /etc/iscsi/iscsid.conf like the following (check your documentation):
# To specify the length of time to wait for session re-establishment
# before failing SCSI commands back to the application when running
# the Linux SCSI Layer error handler, edit the line.
# The value is in seconds and the default is 120 seconds.
node.session.timeo.replacement_timeout = 60
  • You may also need to create a file /etc/multipath.conf to give user-readable names to the connections and to choose the way you want to use the multipath (multibus, failover...). Once again check your SAN documentation. For example with SanMelody :
defaults {
type = ["device-mapper", 1]
filter = ["a\|/dev/disk/by-id.*\|", "r\|.*\|" ]
polling_interval 10
devices {
device {
     vendor            "DataCore"
     product           "SAN*"
     path_checker      tur
#      path_grouping_policy      failover
     path_grouping_policy      multibus
     path_checker      tur
     path_selector     "round-robin 0"
     failback          30
       getuid_callout "/lib/udev/scsi_id -g -u -p 0x80 -s /block/%n"
       }
}
}
  • Add on the GUI the iSCSI targets you need to connect to.
  • Check the multipath is working :
# multipath -l
  • You should see something similar to :
# multipath -l
  SDataCoreSANmelody_Proxmox-Testdm-3 DataCore,SANmelody     
  [size=2.0T][features=0][hwhandler=0]
  \_ round-robin 0 [prio=0][active]
   \_ 4:0:0:0 sdc 8:32  [active][undef]
   \_ 3:0:0:0 sdb 8:16  [active][undef]
  SDataCoreSANmelody_KVM-SRdm-4 DataCore,SANmelody     
  [size=2.0T][features=0][hwhandler=0]
  \_ round-robin 0 [prio=0][active]
   \_ 4:0:0:1 sde 8:64  [active][undef]
   \_ 3:0:0:1 sdd 8:48  [active][undef]