예제 #1
0
파일: iscsilib.py 프로젝트: BobBall/sm
def refresh_luns(targetIQN, portal):
    wait_for_devs(targetIQN, portal)
    try:
        path = os.path.join("/dev/iscsi",targetIQN,portal)
        id = scsiutil.getSessionID(path)
        f=open('/sys/class/scsi_host/host%s/scan' % id, 'w')
        f.write('- - -\n')
        f.close()
        time.sleep(2) # FIXME
    except:
        pass
예제 #2
0
def refresh_luns(targetIQN, portal):
    wait_for_devs(targetIQN, portal)
    try:
        path = os.path.join("/dev/iscsi", targetIQN, portal)
        id = scsiutil.getSessionID(path)
        f = open('/sys/class/scsi_host/host%s/scan' % id, 'w')
        f.write('- - -\n')
        f.close()
        time.sleep(2)  # FIXME
    except:
        pass