def stripe_hanashared_vol()

in scripts/build_storage.py [0:0]


def stripe_hanashared_vol(drives):
    ##9.Created a new logical volume called lvhanaback with 2 stripes (Master Only)
    print('Creating logical volumes for HANA Shared ')
    size = 0
    for d in drives:
        # d['size'] = 488G etc
        size = size + int(d['size'].replace('G',''))
    buffer  = 1
    size = size - buffer
    sizeG = str(size) + 'G'
    if os.path.isfile(nvme_device_id):
        device = open(nvme_device_id, 'r').read().rstrip()
    else:
        device = drives[0]['device'].replace('/dev/s','/dev/xv')
    cmd = ' mkfs.xfs -f ' + device + ' -L HANA_SHARE '
    #cmd = 'lvcreate -n lvhanashared  '
    #cmd = cmd + ' -i ' + str(len(drives))
    #cmd = cmd + ' -I 256 ' + ' -L ' + sizeG + ' vghanashared'
    exe_cmd(cmd)
    print(cmd)