dell_storagecenter_driver/iscsi_utils.py
def _get_multipath_device(sd_device):
    """Get the multipath device for a volume.

    Output from multipath -l should be something like:
    36000d31000fa9e0000000000000002f2 dm-5 COMPELNT,Compellent Vol
    size=1.0G features='1 queue_if_no_path' hwhandler='0' wp=rw
    `-+- policy='queue-length 0' prio=-1 status=active
      |- 8:0:0:2  sdx 65:112 active undef running
      |- 12:0:0:2 sdv 65:80  active undef running
      |- 14:0:0:2 sdw 65:96  active undef running
      `- 10:0:0:2 sdy 65:128 active undef running

    :param sd_device: The SCSI device to look for.
    :return: The /dev/mapper/ multipath device if one exists.
    """
    result = None
    try:
        output = _exec('multipath -l %s' % sd_device)
        if output:
            lines = output.split('\n')
            for line in lines:
                if 'COMPELNT' not in line:
                    continue
                name = line.split(' ')[0]
                result = '/dev/mapper/%s' % name
                break
    except Exception:
        # Oh well, we tried
        pass

    return result
Get the multipath device for a volume.

    Output from multipath -l should be something like:
    36000d31000fa9e0000000000000002f2 dm-5 COMPELNT,Compellent Vol
    size=1.0G features='1 queue_if_no_path' hwhandler='0' wp=rw
    `-+- policy='queue-length 0' prio=-1 status=active
      |- 8:0:0:2  sdx 65:112 active undef running
      |- 12:0:0:2 sdv 65:80  active undef running
      |- 14:0:0:2 sdw 65:96  active undef running
      `- 10:0:0:2 sdy 65:128 active undef running

    :param sd_device: The SCSI device to look for.
    :return: The /dev/mapper/ multipath device if one exists.
    
Get the multipath device for a volume.
Get the multipath device for a volume .
def _get_multipath_device(sd_device):
    result = None
    try:
        output = _exec('multipath -l %s' % sd_device)
        if output:
            lines = output.split('\n')
            for line in lines:
                if 'COMPELNT' not in line:
                    continue
                name = line.split(' ')[0]
                result = '/dev/mapper/%s' % name
                break
    except Exception:
        pass
    return result
def _get_multipath_device ( sd_device ) : result = None try : output = _exec ( 'multipath -l %s' % sd_device ) if output : lines = output . split ( '\n' ) for line in lines : if 'COMPELNT' not in line : continue name = line . split ( ' ' ) [ 0 ] result = '/dev/mapper/%s' % name break except Exception : pass return result
Get the multipath device for a volume.
Get the multipath device for a volume .
"""Get the multipath device for a volume.

    Output from multipath -l should be something like:
    36000d31000fa9e0000000000000002f2 dm-5 COMPELNT,Compellent Vol
    size=1.0G features='1 queue_if_no_path' hwhandler='0' wp=rw
    `-+- policy='queue-length 0' prio=-1 status=active
      |- 8:0:0:2  sdx 65:112 active undef running
      |- 12:0:0:2 sdv 65:80  active undef running
      |- 14:0:0:2 sdw 65:96  active undef running
      `- 10:0:0:2 sdy 65:128 active undef running

    :param sd_device: The SCSI device to look for.
    :return: The /dev/mapper/ multipath device if one exists.
    """ # Oh well, we tried
The /dev/mapper/ multipath device if one exists.
The / dev / mapper / multipath device if one exists .
sd_device
The SCSI device to look for.
The SCSI device to look for .