lvscan
Scan for all existing logical volumes
SYNOPSIS
lvscan [options] [LogicalVolume[s]]
PARAMETERS
-a|--all
Scan all volume groups for logical volumes.
-b|--background
Run the scan in the background.
-d|--debug
Increase debugging output.
-e|--errorwhenempty
Return an error if no LVs are found.
-h|--help
Display help text and exit.
-l|--logicalvolume LogicalVolume
Scan a specific logical volume. Accepts multiple LVs.
-m|--minor Minor
Use a specific minor number for the logical volume.
-n|--name LogicalVolume
Scan a logical volume by name.
-o|--options String
Comma-separated ordered list of columns to display.
-p|--profile ProfileName
Configuration profile to use.
-q|--quiet
Suppress output messages.
-r|--readahead ReadAheadSectors
Set the read ahead sectors of logical volumes.
-s|--stripes Stripes
Logical volume with a specific stripes number.
-t|--test
Run in test mode (no actual changes).
-u|--uuid UUID
Logical volume with a specific UUID.
-v|--verbose
Increase verbosity.
-y|--yes
Answer yes to all prompts.
--version
Display version information and exit.
DESCRIPTION
The lvscan
command scans all disks for LVM logical volumes and reports their status. It can be used to activate logical volumes, making them available for use. This is crucial for mounting file systems residing on these volumes. lvscan
provides information such as the volume group and logical volume names, sizes, and current state (active or inactive). This tool is invaluable for system administrators managing storage using LVM, allowing them to quickly identify available and active LVs, activate those that need to be, and troubleshoot potential storage issues. It's a read-only operation and doesn't modify volume data, making it safe to use for auditing and monitoring. Use lvscan to detect changes in your logical volume configuration after adding or removing disks, ensuring that LVM correctly recognizes all available resources.
ACTIVATION
lvscan primarily checks and reports the status of logical volumes. Use the lvchange -ay
command to activate all available logical volumes. To activate a specific volume: lvchange -ay /dev/VolumeGroupName/LogicalVolumeName
.
TROUBLESHOOTING
If lvscan doesn't find expected logical volumes, verify that the physical volumes are correctly detected using pvscan and that the volume group is active using vgscan. Check for errors in system logs (e.g., /var/log/syslog
or /var/log/messages
).