def lvdisplay(lvname=''):
 ret = {}
 cmd = ['lvdisplay', '-c']
 if lvname:
  cmd.append(lvname)
 cmd_ret = __salt__['cmd.run_all'](cmd, python_shell=False)
 if (cmd_ret['retcode'] != 0):
  return {}
 out = cmd_ret['stdout'].splitlines()
 for line in out:
  comps = line.strip().split(':')
  ret[comps[0]] = {'Logical Volume Name': comps[0], 'Volume Group Name': comps[1], 'Logical Volume Access': comps[2], 'Logical Volume Status': comps[3], 'Internal Logical Volume Number': comps[4], 'Open Logical Volumes': comps[5], 'Logical Volume Size': comps[6], 'Current Logical Extents Associated': comps[7], 'Allocated Logical Extents': comps[8], 'Allocation Policy': comps[9], 'Read Ahead Sectors': comps[10], 'Major Device Number': comps[11], 'Minor Device Number': comps[12]}
 return ret

def lvdisplay ( lvname = '' ) : ret = { } cmd = [ 'lvdisplay' , '-c' ] if lvname : cmd . append ( lvname ) cmd_ret = __salt__ [ 'cmd.run_all' ] ( cmd , python_shell = False ) if ( cmd_ret [ 'retcode' ] != 0 ) : return { } out = cmd_ret [ 'stdout' ] . splitlines ( ) for line in out : comps = line . strip ( ) . split ( ':' ) ret [ comps [ 0 ] ] = { 'Logical Volume Name' : comps [ 0 ] , 'Volume Group Name' : comps [ 1 ] , 'Logical Volume Access' : comps [ 2 ] , 'Logical Volume Status' : comps [ 3 ] , 'Internal Logical Volume Number' : comps [ 4 ] , 'Open Logical Volumes' : comps [ 5 ] , 'Logical Volume Size' : comps [ 6 ] , 'Current Logical Extents Associated' : comps [ 7 ] , 'Allocated Logical Extents' : comps [ 8 ] , 'Allocation Policy' : comps [ 9 ] , 'Read Ahead Sectors' : comps [ 10 ] , 'Major Device Number' : comps [ 11 ] , 'Minor Device Number' : comps [ 12 ] } return ret
return information about the logical volume(s) cli examples: .