Re: LVM

Dear Ragesh

vgscan

The vgscan command allows the re-creation of the /etc/lvmtab file and possibly the associated volume group device files. This command should be run only in the event of a catastrophic error such as the deletion of the /etc/lvmtab file or the mismatch of names of the physical volumes in the /etc/lvmtab file to the actual physical volume path configuration. If the /etc/lvmtab file exists, the information contained in the file is used to assist in rebuilding the file, but the existing file is updated with the new corrected configuration.

vgscan searches each physical volume connected to the system, looking for logical volumes. If there are dual controller devices, only the primary controller device path is scanned, unless you specify the -a option to allow access to all paths. It groups these physical volumes into volume groups by matching the volume group information found on the physical volumes. Then it searches the /dev directory for all group device files with the LVM major number, and tries to match device files with the logical volumes' information found on the physical volumes.

If matches occur, it determines the volume group name from the device file path, and updates the /etc/lvmtab file with the volume group name and the list of physical volumes paths contained in that volume group. For volume groups where the device files cannot be matched, it prints the list of physical volumes for each volume group.