VGSCAN(8)

πŸ’… NAME πŸ’…

okay so bestie, let me introduce you to vgscan β€” she searches for all volume groups. that's it. that's her whole thing, and she does it beautifully. ✨

(and for the record, this is a System Manager's Manual page, section 8 β€” the big system-admin section. main character energy only. πŸ‘‘)

πŸ¦‹ SYNOPSIS πŸ¦‹

vgscan [ option_args ]

🌸 DESCRIPTION 🌸

vgscan goes around scanning all supported LVM block devices in the system hunting for VGs (volume groups). it's giving detective queen πŸ”πŸ’– β€” that's literally the entire job description, no cap.

πŸŽ€ USAGE πŸŽ€

here's how you'd actually call her:

vgscan
       [ --ignorelockingfailure ]
       [ --mknodes ]
       [ --notifydbus ]
       [ --refresh ]
       [ --reportformat basic|json|json_std ]
       [ COMMON_OPTIONS ]

and these are the common options for lvm, the shared wardrobe that basically every lvm command gets to wear:

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 ✨

  • --commandprofile String β€” the command profile you want to use for command configuration. peep lvm.conf(5) for the full tea on profiles. πŸ’œ
  • --config String β€” config settings for the command, and these override whatever lvm.conf(5) was saying. the String arg uses the same format as lvm.conf(5), or you can go off-script with section/field syntax. more info in lvm.conf(5). πŸ“
  • -d, --debug ... β€” set debug level. repeat it anywhere from 1 to 6 times to crank up the detail of the messages sent to the log file and/or syslog (if that's even configured). yes bestie, more is more.
  • --devices PV β€” restricts which devices are visible and accessible to the command. anything you don't list will just look like it's missing (ghosted, honestly πŸ‘»). you can repeat this option, or hand it a comma-separated list of devices. it overrides the devices file.
  • --devicesfile String β€” a file listing the devices LVM should use. the file has to already 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 will not attempt to use device-mapper. strictly for testing and debugging, babe.
  • -h, --help β€” display help text. the classic. 🫢
  • --ignorelockingfailure β€” lets a command keep going with read-only metadata operations even after locking failures. she's forgiving like that.
  • --journal String β€” record information in the systemd journal. this info is in addition to whatever the lvm.conf log/journal setting already turned on. command: records information about the command. output: records the default command output. debug: records full command debugging.
  • --lockopt String β€” used to pass options for special cases over to lvmlockd. see lvmlockd(8) for more.
  • --longhelp β€” display long help text. the extended director's cut. ✨
  • --mknodes β€” also checks the LVM special files in /dev that are needed for active LVs, and creates any missing ones and removes any unused ones. also check out the additional --refresh option for use in a udev environment.
  • --nohints β€” do not use the hints file to locate devices for PVs. without hints, a command may end up reading more devices to find PVs. she'll still perform standard hint file invalidation where appropriate, don't worry.
  • --nolocking β€” disable locking. use with caution, because concurrent commands may produce incorrect results.
⚠️ fr fr, that one is not a vibe. concurrent commands + no locking = incorrect results. be careful.
  • --notifydbus β€” send a notification to D-Bus. the command will exit with an error if LVM was not built with support for D-Bus notification, or if the notify_dbus config setting is disabled. πŸ’€
  • --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 answer 'no'. 🀫
  • --refresh β€” if the LV is active, reload its metadata. in an environment where udev is used to manage the /dev content, using this option is highly recommended β€” because refresh also regenerates udev events for an LV based on which existing udev rules are applied to set the /dev content and permissions. also, this operation may be useful if something has gone wrong, or if some form of manual LV sharing is being used. πŸ”₯
  • --reportformat basic|json|json_std β€” overrides the current output format for reports, which is defined globally by the report/output_format setting in lvm.conf(5). basic is the original format with columns and rows β€” and if there's more than one report per command, each report gets prefixed with the report name for identification. json produces report output in JSON format. json_std produces report output in JSON format that's more compliant with the JSON standard. see lvmreport(7) for more. 🌈
  • -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. heads up: 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 the 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. (and no, bestie, don't confuse this with the output control --units, where capital letters mean multiples of 1000. two totally different girls. πŸ’…)

🌟 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. πŸ’–

πŸ”— SEE ALSO πŸ”—


and that's the whole page, bestie!! 🫢 this one was brought to you by Red Hat, Inc. β€” LVM TOOLS 2.03.44(2), dated 2026-10-27. a true icon, periodt. πŸ’–βœ¨πŸ‘‘

πŸ“¦ where this page comes from