コード例 #1
0
def rescan():
    """
    Forces multipath daemon to rescan the list of available devices and
    refresh the mapping table. New devices can be found under /dev/mapper

    Should only be called from hsm._rescanDevices()
    """

    # First rescan iSCSI and FCP connections
    iscsi.rescan()
    hba.rescan()

    # Now wait until multipathd is ready.
    wait_until_ready()
コード例 #2
0
ファイル: multipath.py プロジェクト: xiaojiongming/vdsm
def rescan():
    """
    Forces multipath daemon to rescan the list of available devices and
    refresh the mapping table. New devices can be found under /dev/mapper

    Should only be called from hsm._rescanDevices()
    """

    # First rescan iSCSI and FCP connections
    iscsi.rescan()
    hba.rescan()

    # Scanning SCSI interconnects starts a storm of udev events. Wait until all
    # events are processed, ensuring detection of new devices and creation or
    # update of multipath devices.
    timeout = config.getint('irs', 'udev_settle_timeout')
    udevadm.settle(timeout)
コード例 #3
0
def rescan():
    """
    Forces multipath daemon to rescan the list of available devices and
    refresh the mapping table. New devices can be found under /dev/mapper

    Should only be called from hsm._rescanDevices()
    """

    # First rescan iSCSI and FCP connections
    iscsi.rescan()
    hba.rescan()

    # Scanning SCSI interconnects starts a storm of udev events. Wait until all
    # events are processed, ensuring detection of new devices and creation or
    # update of multipath devices.
    timeout = config.getint('irs', 'udev_settle_timeout')
    udevadm.settle(timeout)
コード例 #4
0
 def testTimeout(self):
     with self.assertMaxDuration(1.2):
         iscsi.rescan()
コード例 #5
0
 def testWait(self):
     with self.assertMaxDuration(0.3):
         iscsi.rescan()
コード例 #6
0
 def testTimeout(self):
     with self.assertMaxDuration(1.2):
         iscsi.rescan()
コード例 #7
0
 def testWait(self):
     with self.assertMaxDuration(0.3):
         iscsi.rescan()