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.