Forrest logo
back to the vgscan tool

vgscan:tldr:d3723

vgscan: Scan for volume groups and add the special files in `/dev`, if they don't already exist, needed to access the logical volumes in the found groups.
$ sudo vgscan --mknodes
try on your machine

The command "sudo vgscan --mknodes" is used in a Linux environment to scan and detect the existing volume groups (VG) on a system and create the necessary device nodes if they don't already exist.

Here is a breakdown of the command:

  • "sudo": It is used to execute the command with root privileges. This command may require administrative privileges to perform some actions.
  • "vgscan": It is a command that belongs to the Logical Volume Manager (LVM) system. It scans all the physical volumes (PV) to find and identify any volume groups (VG) present on the system.
  • "--mknodes": It is an option used with the "vgscan" command to create missing device nodes associated with the volume groups. Device nodes are special files that map to the physical storage devices used by the logical volume manager.

Overall, the "sudo vgscan --mknodes" command helps to identify and register any existing volume groups on the system, and ensures that the necessary device nodes are created for accessing those volume groups.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the vgscan tool