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. Peep lvm.conf(5) if you wanna know more about profiles ✨
  • --config String β€” config settings for the command, and these override the lvm.conf(5) settings. The String arg uses the same format as lvm.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 the lvmdevices(8) command. This overrides the lvm.conf(5) devices/devicesfile and devices/use_devicesfile settings.
  • --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 the lvm.conf log/journal setting. 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 to lvmlockd. See lvmlockd(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 --commandprofile or --metadataprofile, depending on the command.
  • -q, --quiet ... β€” suppress output and log messages. Overrides --debug and --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 r for 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 to 1024. The default input unit is specified by letter, followed by |UNIT. UNIT represents other possible input units: b|B is bytes, s|S is sectors of 512 bytes, k|K is KiB, m|M is MiB, g|G is GiB, t|T is TiB, p|P is PiB, e|E is EiB. (This should not be confused with the output control --units, where capital letters mean multiple of 1000. 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 πŸ‘‘


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