def setSize(path, size, confirm): sizeMB = size / (1024 * 1024) cmd = [CMD_LVRESIZE, "-L", str(sizeMB), path] if confirm: util.pread3(cmd, "y\n") else: util.pread(cmd)
def getuniqueserial(path): dev = getdev(path) try: cmd = ["md5sum"] txt = util.pread3(cmd, getSCSIid(path)) return txt.split(' ')[0] except: return ''
def getuniqueserial(path): dev = getdev(path) output = gen_rdmfile() try: cmd = ["md5sum"] txt = util.pread3(cmd, getSCSIid(path)) return txt.split(' ')[0] except: return ''
def getuniqueserial(path): dev = getdev(path) output = gen_rdmfile() try: cmd = ["scsi_id", "-g", "-s", "/block/%s" % dev] text = util.pread2(cmd) cmd = ["md5sum"] txt = util.pread3(cmd, text) return txt.split(' ')[0] except: return ''