pvscan command scans all physical volumes (PVs) on the system and displays information about them. PVs are the partitions on a hard disk that are used to create logical volumes (LVs) in the Linux Logical Volume Manager (LVM) system. The
pvscan command is useful for checking the status of PVs, especially after adding or removing hard disks from the system.
pvscan command is used to scan all physical volumes on the system and display information about them. The command does not require any arguments, and it can be run as a regular user or as the root user.
pvscan, simply open a terminal and type the following command:
This will display information about all PVs on the system.
Specific Use Cases
- Checking the status of PVs after adding or removing hard disks from the system.
- Verifying that all PVs are recognized by the system.
- Troubleshooting issues with the LVM system.
pvscan command has a few options that can be used to modify its behavior. The available options are listed in the table below:
||Debug mode. Displays detailed debugging information.|
||Displays a help message and exits.|
||Verbose mode. Displays more detailed information about the PVs.|
||Scans all devices, including those that are ignored by default.|
||Displays information about the PVs in a machine-readable format.|
pvscandoes not display any information, it may be because there are no PVs on the system. Verify that the hard disks are properly connected and recognized by the system.
pvscandisplays an error message, check the system logs for more information about the error.
pvscandoes not recognize a newly added hard disk, try running the
partprobecommand to update the system’s partition table.
pvscancommand is part of the LVM system and requires LVM to be installed on the system.
- The information displayed by
pvscanincludes the name of the PV, the size of the PV, the UUID of the PV, and the VG (Volume Group) name, if the PV is part of a VG.