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. Peeplvm.conf(5)if you want the tea on how profiles work. π--config Stringβ Config settings for the command, and these override whateverlvm.conf(5)says. The String arg uses the exact same format aslvm.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 thelvmdevices(8)command. This overrides thedevices/devicesfileanddevices/use_devicesfilesettings inlvm.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 thelvm.conflog/journalsetting. The values:commandrecords information about the command.outputrecords the default command output.debugrecords full command debugging. π°--lockopt Stringβ Used to pass options for special cases over tolvmlockd. Scoot tolvmlockd(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--commandprofileor--metadataprofile, depending on the command. two-faced in a cute way π-q,--quiet ...β Suppress output and log messages. Overrides--debugand--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 thereport/output_formatsetting inlvm.conf(5).basicis 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.jsonproduces report output in JSON format.json_stdproduces report output in JSON format that's more compliant with the JSON standard. Seelvmreport(7)for more. π-S,--select Stringβ Selects objects for processing and reporting based on criteria you specify. The criteria syntax is described by--select helpand inlvmreport(7). For reporting commands, one row is displayed for each object matching the criteria. See--options helpfor selectable object fields. Rows can be displayed with an extra"selected"field (-o selected) showing1if the row matches the selection and0if 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
--selectoption 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.UNITrepresents other possible input units:b|Bis bytes,s|Sis sectors of 512 bytes,k|Kis KiB,m|Mis MiB,g|Gis GiB,t|Tis TiB,p|Pis PiB,e|Eis 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
- 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