pvscan – Scans the List of Physical Volumes of all Hard Disks in the System

The 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.

Overview

The 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.

Examples

To run pvscan, simply open a terminal and type the following command:

pvscan

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.

Options

The pvscan command has a few options that can be used to modify its behavior. The available options are listed in the table below:

Option Description
-d Debug mode. Displays detailed debugging information.
-h Displays a help message and exits.
-v Verbose mode. Displays more detailed information about the PVs.
-a Scans all devices, including those that are ignored by default.
-i Displays information about the PVs in a machine-readable format.

Troubleshooting Tips

  • If pvscan does 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.
  • If pvscan displays an error message, check the system logs for more information about the error.
  • If pvscan does not recognize a newly added hard disk, try running the partprobe command to update the system’s partition table.

Notes

  • The pvscan command is part of the LVM system and requires LVM to be installed on the system.
  • The information displayed by pvscan includes 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.