The Linux Newbie Guide  ⇒    Fundamentals     Advanced     Supplement   Command Index   ENG⇒中
All rights reserved, please indicate the source when citing

vgscan - Scan for VGs (Volume Groups)



he vgscan command is part of the Logical Volume Manager (LVM) toolset and is used to scan for Volume Groups (VGs) on all available hard disks. It helps identify VGs, their names, and their statuses.

The basic syntax for the vgscan command is as follows: :
vgscan [OPTIONS] .

The vgscan command scans for VGs and reads information about them, providing details such as VG names and statuses. It is typically run as a superuser (root).

Commonly used options for the vgscan command include:

For example, running the vgscan command without options will scan for VGs and display the found VGs with their names and metadata types:

# vgscan
  Reading volume groups from cache.
  Found volume group "myVG" using metadata type lvm2

In this example, the vgscan command found a Volume Group named "myVG" using LVM2 metadata type.

The vgscan command is useful when you want to discover VGs on your system, especially if you're working with LVM and need to manage storage volumes.

For more details and additional examples of using the vgscan command in LVM, you can refer to the provided link.