LVMDISKSCAN(8)
β¨ LVMDISKSCAN(8) β¨
okay so bestie, welcome to the System Manager's Manual section 8, and today's main character is lvmdiskscan β yes the whole page is named after it, it's giving legendary π
πΈ NAME πΈ
lvmdiskscan β List devices that may be used as physical volumes
β¨ SYNOPSIS β¨
lvmdiskscan
[ option_args ]
π¦ DESCRIPTION π¦
So what does it even do? lvmdiskscan goes and scans all SCSI, (E)IDE disks, multiple devices and a bunch of other block devices in the system, hunting for LVM PVs. The size it reports is the real device size β no cap, no inflation π―. You can define a filter in lvm.conf(5) to restrict the scan, which is how you'd dodge a CD ROM for example. Iconic.
β οΈ okay this is the important part bestie β this command is deprecated; use pvs instead. She's retired, she's still here, but she's retired π
π USAGE π
lvmdiskscan
[ -l|--lvmpartition ]
[ --readonly ]
[ COMMON_OPTIONS ]
β
Common options for lvm:
[ -d|--debug ... ]
[ -h|--help ]
[ -q|--quiet ... ]
[ -t|--test ]
[ -v|--verbose ... ]
[ -y|--yes ]
[ --commandprofile String ]
[ --config String ]
[ --devices PV ]
[ --devicesfile String ]
[ --driverloaded y|n ]
[ --journal String ]
[ --lockopt String ]
[ --longhelp ]
[ --nohints ]
[ --nolocking ]
[ --profile String ]
[ --version ]
π OPTIONS π
every single one, no skipping, we're thorough in this house π
--commandprofile Stringβ the command profile to use for command configuration. Peeplvm.conf(5)if you wanna know more about profiles β¨--config Stringβ config settings for the command, and these override thelvm.conf(5)settings. The String arg uses the same format aslvm.conf(5), or it might use section/field syntax.lvm.conf(5)has the full tea on config π-d,--debug ...β set debug level. Repeat it from 1 to 6 times to crank up the detail of messages sent to the log file and/or syslog (if configured).--devices PVβ restricts the devices that are visible and accessible to the command. Devices not listed will appear to be missing π». You can repeat this option, or pass a comma-separated list of devices. Also: this overrides the devices file.--devicesfile Stringβ a file listing devices that LVM should use. It has to exist in/etc/lvm/devices/and it's managed with thelvmdevices(8)command. This overrides thelvm.conf(5)devices/devicesfileanddevices/use_devicesfilesettings.--driverloaded y|nβ if you set it to no, the command won't even attempt to use device-mapper. It's for testing and debugging π§-h,--helpβ display help text.--journal Stringβ record information in the systemd journal. This info is in addition to what's enabled by thelvm.conflog/journalsetting. Options:command:records info about the command,output:records the default command output,debug:records full command debugging.--lockopt Stringβ used to pass options for special cases tolvmlockd. Seelvmlockd(8)for more info.--longhelpβ display long help text.-l,--lvmpartitionβ only report PVs. that's it, that's the whole vibe π--nohintsβ do not use the hints file to locate devices for PVs. Heads up: a command may read more devices to find PVs when hints aren't used. The command will still perform standard hint file invalidation where appropriate.--nolockingβ disable locking. π¨ Use with caution β concurrent commands may produce incorrect results.--profile Stringβ an alias for--commandprofileor--metadataprofile, depending on the command.-q,--quiet ...β suppress output and log messages. Overrides--debugand--verbose. Repeat it once to also suppress any prompts with the answer 'no'.--readonlyβ prevent the command from making changes, including activation and metadata updates. (See--permission rfor read only LVs.)-t,--testβ run in test mode. Commands will not update metadata. This is implemented by disabling all metadata writing but nevertheless returning success to the calling function. β οΈ This may lead to unusual error messages in multi-stage operations if a tool relies on reading back metadata it believes has changed but hasn't.-v,--verbose ...β set verbose level. Repeat from 1 to 4 times to increase the detail of messages sent to stdout and stderr.--versionβ display version information.-y,--yesβ do not prompt for confirmation interactively but always assume the answer is yes. π¨ Use with extreme caution. (For automatic no, see-qq.)
π VARIABLES π
Stringβ see the option description for information about the string content.Size[UNIT]β Size is an input number that accepts an optional unit. Input units are always treated as base two values, regardless of capitalization, e.g.'k'and'K'both refer to1024. The default input unit is specified by letter, followed by|UNIT.UNITrepresents other possible input units:b|Bis bytes,s|Sis sectors of512bytes,k|Kis KiB,m|Mis MiB,g|Gis GiB,t|Tis TiB,p|Pis PiB,e|Eis EiB. (This should not be confused with the output control--units, where capital letters mean multiple of1000. don't mix them up bestie π)
π§ ENVIRONMENT VARIABLES π§
See lvm(8) for information about environment variables used by lvm. For example, LVM_VG_NAME can generally be substituted for a required VG parameter. slay π
π SEE ALSO π
lvm(8),lvm.conf(5),lvmconfig(8),lvmdevices(8),pvchange(8),pvck(8),pvcreate(8),pvdisplay(8),pvmove(8),pvremove(8),pvresize(8),pvs(8),pvscan(8),vgcfgbackup(8),vgcfgrestore(8),vgchange(8),vgck(8),vgcreate(8),vgconvert(8),vgdisplay(8),vgexport(8),vgextend(8),vgimport(8),vgimportclone(8),vgimportdevices(8),vgmerge(8),vgmknodes(8),vgreduce(8),vgremove(8),vgrename(8),vgs(8),vgscan(8),vgsplit(8),lvcreate(8),lvchange(8),lvconvert(8),lvdisplay(8),lvextend(8),lvreduce(8),lvremove(8),lvrename(8),lvresize(8),lvs(8),lvscan(8),lvm-fullreport(8),lvm-lvpoll(8),blkdeactivate(8),lvmdump(8),dmeventd(8),lvmpolld(8),lvmlockd(8),lvmlockctl(8),lvmdbusd(8),fsadm(8),lvmsystemid(7),lvmreport(7),lvmcache(7),lvmraid(7),lvmthin(7),lvmvdo(7),lvmautoactivation(7)
and that's the whole page bestie, you ate it, go forth and <bold>pvs</bold> instead π«Ά
made with love by Red Hat, Inc. π β this is LVM TOOLS 2.03.44(2), dated (2026-10-27), and it's still LVMDISKSCAN(8) obviously πβ¨π
π¦ where this page comes from
- arch rolling: lvm2 2.03.44-1 Β· GPL-2.0-only AND LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms