VGIMPORT(8)

πŸ’– VGIMPORT(8) β€” the "omg my volume group is BACK" era πŸ’–

okay bestie, sit down, because this one is a system manager's manual page and it's genuinely one of the more iconic little tools in the LVM squad. It's vgimport(8), and it's the moment where your exported VG gets reintroduced to the host like "hey girl, you're home now" 🏠✨


🌸 NAME 🌸

vgimport β€” register an exported volume group with the system. That's it, that's the whole job: it makes the system know about a VG again. πŸ’«


πŸŽ€ SYNOPSIS πŸŽ€

vgimport option_args position_args
       [ option_args ]

yeah she takes options, then positional args, then (surprise!) more options. the duality πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

So like, vgimport makes exported VGs known to the system again β€” which is lowkey the whole plot twist, because maybe you moved the PVs over from a totally different system and now nobody here recognizes them. awkward. 😭

Here's the lil duo if you need the lore: vgexport clears the VG system ID, and vgimport sets the VG system ID to match the host that's running vgimport β€” if that host even has a system ID. no system ID, no matching, that's just how it is. πŸ€·β™€οΈ


🌈 USAGE 🌈

Import specified VGs. β€” the picky, main-character version:

vgimport VG|Tag|Select ...
       [ -S|--select String ]
       [ --persist start ]
       [ COMMON_OPTIONS ]

β€”

Import all VGs. β€” the "I want EVERYTHING" version:

vgimport -a|--all
       [ COMMON_OPTIONS ]

β€”

Common options for command:

[ -f|--force ... ]
[ --reportformat basic|json|json_std ]

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, bestie, no skips, no shortcuts, we go through all of them πŸ’–

  • -a, --all β€” Import all visible VGs. the "I don't want to pick, I want them ALL" option πŸ‘‘
  • --commandprofile String β€” The command profile you wanna use for command configuration. Peep lvm.conf(5) if you want the tea on how profiles work. πŸ““
  • --config String β€” Config settings for the command, and these override whatever lvm.conf(5) says. The String arg uses the exact same format as lvm.conf(5), or you can use section/field syntax instead. Again, lvm.conf(5) has the lore about config. πŸ”§
  • -d, --debug ... β€” Sets the debug level. Repeat it from 1 to 6 times to crank up how much detail gets sent to the log file and/or syslog (if that's configured). yes bestie, spam it, you know you want to πŸ›
  • --devices PV β€” Restricts which devices are visible and accessible to the command. Anything not on the list just straight up appears to be missing πŸ‘». You can repeat this option, or hand it a comma-separated list of devices. Heads up: this overrides the devices file.
  • --devicesfile String β€” A file listing the devices LVM should use. That file has to exist in /etc/lvm/devices/, and it's managed with the lvmdevices(8) command. This overrides the devices/devicesfile and devices/use_devicesfile settings in lvm.conf(5). πŸ“‚
  • --driverloaded y|n β€” Set it to no and the command won't even try to use device-mapper. It's for testing and debugging, so it's giving lab-coat energy πŸ₯Ό
  • -f, --force ... β€” Overrides various checks, confirmations and protections. Use with extreme caution. like, EXTREME. we are not playing πŸ’€
  • -h, --help β€” Display help text. the "bestie what do I type" button 🫢
  • --journal String β€” Records info in the systemd journal. This stacks on top of whatever's already 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 over to lvmlockd. Scoot to lvmlockd(8) for more info. πŸ”
  • --longhelp β€” Display long help text. the extended cut 🌟
  • --nohints β€” Don't use the hints file to locate devices for PVs. When hints aren't used, a command may read more devices to find PVs. It'll still do standard hint file invalidation where that's appropriate though, no worries. πŸ—‚οΈ
  • --nolocking β€” Disable locking. Use with caution β€” concurrent commands may produce incorrect results. say it with me: caution ⚠️
  • --persist String β€” Persistent Reservation operation. Here's the whole menu:
    • start: register local key and acquire reservation.
    • stop: unregister local key, releasing reservation.
    • remove: preempt and abort another key.
    • clear: remove reservation and keys.
    • check: check if started.
    • autostart: start if the VG autostart flag is set.

lvmlocal.conf pr_key or host_id must be configured to use PR. For local VGs, Write Exclusive (WE) is used, and for shared VGs, Write Exclusive, all registrants (WEAR) is used. Use --setpersist to automate and/or require PR. πŸ”‘

  • --profile String β€” An alias for --commandprofile or --metadataprofile, depending on the command. two-faced in a cute way 🎭
  • -q, --quiet ... β€” Suppress output and log messages. Overrides --debug and --verbose. Repeat it once and you'll also suppress any prompts with answer 'no'. 🀫 (psst β€” for automatic no, see -qq.)
  • --reportformat basic|json|json_std β€” Overrides the current output format for reports, which is normally defined globally by the report/output_format setting in lvm.conf(5). basic is the OG format with columns and rows β€” and if there's more than one report per command, each report gets prefixed with the report name so you can tell them apart. 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. πŸ“Š
  • -S, --select String β€” Selects objects for processing and reporting based on criteria you specify. The criteria syntax is described by --select help and in lvmreport(7). For reporting commands, one row is displayed for each object matching the criteria. See --options help for selectable object fields. Rows can be displayed with an extra "selected" field (-o selected) showing 1 if the row matches the selection and 0 if it doesn't. For non-reporting commands that process LVM entities, the selection chooses which items get processed. 🎯
  • -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. Warning bestie: 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. spooky. πŸ‘€
  • -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, just always assume the answer is yes. Use with extreme caution. (And for automatic no, see -qq.) 🫣

πŸ’œ VARIABLES πŸ’œ

  • VG β€” Volume Group name. See lvm(8) for valid names. πŸ“›
  • Tag β€” Tag name. See lvm(8) for info about tag names and using tags in place of a VG, LV or PV. 🏷️
  • Select β€” Select indicates that a required positional parameter can be omitted if the --select option is used. No arg appears in this position. πŸ•³οΈ
  • String β€” See the option description for info 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 do not get this twisted with the output control --units, where capital letters mean a multiple of 1000. πŸ™ˆ

🧚 ENVIRONMENT VARIABLES 🧚

See lvm(8) for info about environment variables used by lvm. For example, LVM_VG_NAME can generally be substituted for a required VG parameter. slay, so convenient πŸ’


⭐ 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)


πŸ‘‘ sign-off πŸ‘‘

that's the page, bestie!! this iconic entry comes to you from Red Hat, Inc., and it's part of LVM TOOLS 2.03.44(2), dated 2026-10-27. no cap, that's the version, remember it for the vibe check πŸ’–βœ¨ go register that VG, you absolute legend 🫢

πŸ“¦ where this page comes from