Return information about the physical volume(s)

    pvname
        physical device name

    real
        dereference any symlinks and report the real device

        .. versionadded:: 2015.8.7

    quiet
        if the physical volume is not present, do not show any error


    CLI Examples:

    .. code-block:: bash

        salt '*' lvm.pvdisplay
        salt '*' lvm.pvdisplay /dev/md0

def pvdisplay(pvname='', real=False, quiet=False):
    '''
    Return information about the physical volume(s)

    pvname
        physical device name

    real
        dereference any symlinks and report the real device

        .. versionadded:: 2015.8.7

    quiet
        if the physical volume is not present, do not show any error


    CLI Examples:

    .. code-block:: bash

        salt '*' lvm.pvdisplay
        salt '*' lvm.pvdisplay /dev/md0
    '''
    ret = {}
    cmd = ['pvdisplay', '-c']
    if pvname:
        cmd.append(pvname)
    cmd_ret = __salt__['cmd.run_all'](cmd, python_shell=False,
                                      ignore_retcode=quiet)

    if cmd_ret['retcode'] != 0:
        return {}

    out = cmd_ret['stdout'].splitlines()
    for line in out:
        if 'is a new physical volume' not in line:
            comps = line.strip().split(':')
            if real:
                device = os.path.realpath(comps[0])
            else:
                device = comps[0]
            ret[device] = {
                'Physical Volume Device': comps[0],
                'Volume Group Name': comps[1],
                'Physical Volume Size (kB)': comps[2],
                'Internal Physical Volume Number': comps[3],
                'Physical Volume Status': comps[4],
                'Physical Volume (not) Allocatable': comps[5],
                'Current Logical Volumes Here': comps[6],
                'Physical Extent Size (kB)': comps[7],
                'Total Physical Extents': comps[8],
                'Free Physical Extents': comps[9],
                'Allocated Physical Extents': comps[10],
                }
            if real:
                ret[device]['Real Physical Volume Device'] = device
    return ret