You can use the pvdisplay command to display a list of physical volumes you’ve created if you’d like to see your progress along the way:
# pvdisplay /dev/sdb1 “/dev/sdb1” is a new physical volume of “2.01 GiB” --- NEW Physical volume --- PV Name /dev/sdb1 VG Name PV Size 2.01 GiB Allocatable NO PE Size 0 Total PE 0 Free PE 0 Allocated PE 0 PV UUID 0FIuq2-LBod-IOWt-8VeN-tglm-Q2ik-rGU2w7
The pvdisplay command shows that /dev/sdb1 is now tagged as a PV. Notice, however, that in the output, the VG Name is blank. The PV does not yet belong to a volume group.
The pvdisplay command shows information about the different properties of the physical volume:
- PV Name: The name of the physical volume.
- VG Name: The name of the volume group, if any, that is already using this physical volume.
- PV Size: The size of the physical volume.
- Allocatable: Indicator of whether this physical volume is usable or not.
- PE Size: The size of the physical extents. Physical extents are the building blocks of physical volumes, as blocks are the building blocks on a computer hard drive.
- Total PE: The total number of physical extents that is available.
- Free PE: The number of physical extents that is still unused.
- Allocated PE: The number of physical extents that is already in use.
- PV UUID: A random generated unique ID for the physical volume.
pvdisplay Command Examples
1. To display the physical volume information:
# pvdisplay
2. To only display the size of the physical volumes:
# pvdisplay -s # pvdisplay --short
3. To generate colon separated output:
# pvdisplay -c # pvdisplay --colon
4. To display the mapping of physical extents to logical volumes:
# pvdisplay -m # pvdisplay --maps
5. To Display output in columns, the equivalent of pvs:
# pvcreate -C # pvcreate --columns
6. To display the output in specified units:
# pvdisplay --units hHbBsSkKmMgGtTpPeE
7. To display the information for a particular PV:
# pvdisplay /dev/sda2