pvs
Display Volume Group's Physical Volumes information
TLDR
Display information about physical volumes
Display non-physical volumes
Change default display to show more details
Display only specific fields
Append field to default display
Suppress heading line
Use separator to separate fields
SYNOPSIS
pvs [OPTIONS] [PhysicalVolumePath|VolumeGroupName|LogicalVolumeName...]
PARAMETERS
-o field[,field...], --options field[,field...]
Specifies which information fields to display. Common fields include pv_name, vg_name, pv_size, pv_free, pv_attr, etc.
-a, --all
Displays information about all physical volumes, including those that are not yet assigned to a volume group.
-v, --verbose
Provides more detailed output regarding the physical volumes.
--noheadings
Suppresses the display of column headings in the output, useful for scripting.
--units unit
Specifies the units for displayed sizes. Examples include b (bytes), k (kilobytes), m (megabytes), g (gigabytes), etc.
--separator string
Uses a custom string as a field separator for easier parsing, especially when used with -o.
DESCRIPTION
The pvs command is a fundamental utility within the Linux Logical Volume Manager (LVM) framework. It is used to display comprehensive information about physical volumes (PVs). A physical volume represents a disk or disk partition that has been initialized for use by LVM.
pvs provides crucial details such as the PV's device path (e.g., /dev/sdb1), its unique identifier (UUID), the volume group (VG) it belongs to (if any), its total capacity (size), the amount of free space remaining on it, and its current status (e.g., allocatable or missing). This command is indispensable for system administrators to monitor the health and allocation status of their storage infrastructure, assist in troubleshooting LVM-related issues, and plan for storage expansion or modifications. It supports various options for filtering, sorting, and customizing the output format.
CAVEATS
To ensure accurate and complete information, pvs typically requires root privileges. It specifically focuses on disks or partitions that have been initialized as LVM physical volumes and will not display information for uninitialized raw disk partitions or filesystems not managed by LVM.
While powerful, interpreting extensive output without specific options like -o or --noheadings can sometimes be challenging, especially for scripting purposes.
OUTPUT FIELDS
pvs can display a wide range of information about physical volumes. When using the -o option, you can select specific fields such as pv_uuid, pv_attr (attributes like allocatable/exported), pv_size, pv_used, pv_free, pv_alloc_le (allocated extents), and pe_start (physical extent start).
FILTERING OUTPUT
By providing specific PhysicalVolumePath, VolumeGroupName, or LogicalVolumeName arguments after the options, you can filter the output to show information only for relevant PVs. For example, pvs /dev/sdb1 will show details only for that specific physical volume.
HISTORY
The Logical Volume Manager (LVM) framework, which includes pvs, was initially developed for Linux around 1998/1999. The original LVM (often called LVM1) laid the groundwork for flexible storage management. LVM2, a significant rewrite, was introduced to address limitations of LVM1, offering enhanced performance, scalability, and stability. pvs has been a consistent and core utility throughout LVM's evolution, providing administrators with a standardized way to inspect the status of their physical volumes.