Linux command
pvscan 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
List
sudo pvscan
Example
sudo pvscan --cache --listvg [/dev/sdX]
Example
sudo pvscan --cache --listlvs [/dev/sdX]
Example
sudo pvscan --reportformat json
说明
pvscan scans for LVM physical volumes and lists them. It can update the LVM metadata cache and report which volume groups and logical volumes are present on specific devices. The command is useful for discovering physical volumes after adding new disks and for troubleshooting LVM configuration issues.
参数
- --cache
- Update LVM metadata cache
- --listvg
- List volume group of specified device
- --listlvs
- List logical volumes on specified device
- --reportformat _format_
- Output format (basic, json)
- -v, --verbose
- Verbose output
FAQ
What is the pvscan command used for?
pvscan scans for LVM physical volumes and lists them. It can update the LVM metadata cache and report which volume groups and logical volumes are present on specific devices. The command is useful for discovering physical volumes after adding new disks and for troubleshooting LVM configuration issues.
How do I run a basic pvscan example?
Run `sudo pvscan` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --cache do in pvscan?
Update LVM metadata cache