VGMKNODES(8)

πŸ’– VGMKNODES(8) πŸ’– β€” the system manager's manual, but make it cute

okay bestie, buckle up, we're doing vgmknodes today and honestly it's giving quietly essential energy. it lives in the System Manager's Manual section (that's section 8, the grown-up admin one 🫢) and it's part of the LVM family, so if you already know lvm(8) you're gonna be fine, and if you don't, no worries, we'll get there.


✨ NAME ✨

vgmknodes β€” Create the special files for volume group devices in /dev

like, that's it, that's the whole job. she makes the special files. she's the special-files girlie. πŸŽ€


🌸 SYNOPSIS 🌸

vgmknodes
       [ option_args ]
       [ position_args ]

πŸ¦‹ DESCRIPTION πŸ¦‹

so what's actually happening here. vgmknodes goes and checks the LVM device nodes sitting in /dev β€” the ones that active LVs need β€” and then:

  • it creates any that are missing πŸ‘‘
  • it removes any that aren't being used anymore πŸ—‘οΈ
ngl though: this command should not usually be needed if all the system components are working correctly together. she's a fixer-upper, not a daily driver. if you're running her all the time, something else in your stack is being shady. πŸ’€

also psst β€” scroll down to NOTES at the end of this page, there's important tea about using vgmknodes together with udev. don't skip it, i'm literally begging. πŸ™ˆ


πŸ’… USAGE πŸ’…

vgmknodes
       [ --ignorelockingfailure ]
       [ --refresh ]
       [ --reportformat basic|json|json_std ]
       [ COMMON_OPTIONS ]
       [ VG|LV|Tag ... ]

β€”

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 🌈

okay this is the big one, she's long but she's worth it. every single flag, no skips:

  • --commandprofile String β€” the command profile to use for command configuration. see lvm.conf(5) for more info about profiles. πŸŽ€
  • --config String β€” config settings for the command, and they override the lvm.conf(5) settings. the String arg uses the same format as lvm.conf(5), or it can use section/field syntax. see lvm.conf(5) for more about config. 🫢
  • -d|--debug ... β€” sets the debug level. repeat it 1 to 6 times to crank up the detail of messages sent to the log file and/or syslog (if configured). more -d, more lore. πŸ”
  • --devices PV β€” restricts which devices are visible and accessible to the command. devices not listed will appear to be missing πŸ‘». this option can be repeated, or it accepts a comma-separated list of devices. it overrides the devices file.
  • --devicesfile String β€” a file listing devices that LVM should use. it must 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 set to no, the command will not attempt to use device-mapper. for testing and debugging. πŸ§ͺ
  • -h|--help β€” display help text. the classic.
  • --ignorelockingfailure β€” allows a command to continue with read-only metadata operations after locking failures. locked out but still showing up to the read-only party πŸ’…
  • --journal String β€” record information in the systemd journal. this is in addition to what's enabled by the lvm.conf log/journal setting. the values: 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 to lvmlockd. see lvmlockd(8) for more info. πŸ”
  • --longhelp β€” display long help text. the extended edition ✨
  • --nohints β€” do not use the hints file to locate devices for PVs. a command may read more devices to find PVs when hints are not used. the command will still perform standard hint file invalidation where appropriate. πŸ—’οΈ
  • --nolocking β€” disable locking. > use with caution, concurrent commands may produce incorrect results. πŸ’€ fr fr, this one's spicy.
  • --profile String β€” an alias for --commandprofile or --metadataprofile, depending on the command.
  • -q|--quiet ... β€” suppress output and log messages. this 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, usage of this option is highly recommended πŸ‘‘. why? 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 β€” if there's more than one report per command, each report is prefixed with the report name for identification. json produces report output in JSON format. json_std produces report output in JSON format which is more compliant with the JSON standard. see lvmreport(7) for more info. πŸ“Š
  • -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. the audacity of that tool, honestly. πŸ™ˆ
  • -v|--verbose ... β€” sets the 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 yes. > use with extreme caution. (for automatic no, see -qq.) 🚨 like bestie please read that twice.

🧚 VARIABLES 🧚

these are the position_arg girlies πŸ‘‘:

  • VG β€” Volume Group name. see lvm(8) for valid names.
  • LV β€” Logical Volume name. see lvm(8) for valid names. an LV positional arg generally includes the VG name and LV name, e.g. VG/LV.
  • Tag β€” Tag name. see lvm(8) for information about tag names and using tags in place of a VG, LV or PV. 🏷️
  • 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. > and don't get it twisted: this is not the same as the output control --units, where capital letters mean multiple of 1000. πŸ“

πŸ“ 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. 🌱


πŸ’œ NOTES πŸ’œ

this is the part i told you not to skip, and i meant it. πŸ‘€

when you're using udev(7) to manage the /dev content, it's also highly recommended to use the --refresh option. that way, the necessary udev events are generated too, and the associated udev rules are properly applied. ✨

if the --refresh option is not used in this case, then LVM recreates the /dev content directly β€” and udev will not have proper records about the affected symlinks and nodes. also, any node permissions defined by udev rules are not applied. 😭

and that, in turn, may cause problems for other system components that rely on reading the udev database to get the list of /dev symlinks and nodes, and which rely on the permissions based on udev rules. so like… just use --refresh. it's the moment. πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘

the whole extended friend group, no one gets left out 🫢:


and that's the whole page bestie!! πŸŽ‰ she was brought to you by Red Hat, Inc., running LVM TOOLS 2.03.44(2), dated 2026-10-27 β€” so you know she's fresh ✨. go make some special files in /dev, use --refresh if udev is in the chat, and remember: this command should usually not be needed, so if you're here a lot, go check on your other system components. love u, bye πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from