VGEXPORT(8)
π VGEXPORT π
okay bestie, welcome to the vgexport(8) page from your friendly neighbourhood System Manager's Manual β this is the one about politely removing a volume group from a system's whole vibe. let's get into it π
β¨ NAME β¨
vgexport β unregister volume group(s) from the system
πΈ SYNOPSIS πΈ
vgexport option_args position_args
[ option_args ]
π DESCRIPTION π
so here's the tea, bestie: vgexport flips a VG into the exported state, and what that means is the VG and its disks are not being used, and literally cannot be used until the VG gets imported back by vgimport(8). putting a VG into an unusable, offline little situation is genuinely useful for stuff like moving a VG's disks to another system β it's giving "packing your bags and locking the door behind you" π§³β¨
exporting a VG also gives you some protection from its LVs getting accidentally used, or getting used by an automated system before it's even ready. no cap, it's a safety feature.
β οΈ a VG cannot be exported until all of its LVs are inactive. that's the rule, periodt.
LVM commands will ignore an exported VG, or flat out report an error if a command tries to use it. it's like the VG is on do-not-disturb π«
for an exported VG, the vgs command will display attribute, and the pvs command will display attribute. both vgs and pvs will display report field.
also vgexport clears the VG system ID, and vgimport sets the VG system ID to match the host running vgimport (if the host has a system ID). iconic matching-hosts behaviour, honestly π
π₯ USAGE π₯
export specified VGs, slay
vgexport VG|Tag|Select ...
[ -S|--select String ]
[ --persist stop ]
[ COMMON_OPTIONS ]
β
export all of them, go off
vgexport -a|--all
[ COMMON_OPTIONS ]
β
common options for command
[ --reportformat basic|json|json_std ]
common options for lvm (the shared lore π)
[ -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 π
-a,--allβ the "do it to everything" button, bestie.--commandprofile Stringβ the command profile you want this command configured with. for more on profiles, go readlvm.conf(5). it's giving "presets but for LVM" π--config Stringβ config settings for the command, and these override the ones inlvm.conf(5). theStringarg uses the exact same format aslvm.conf(5), or you can usesection/fieldsyntax if that's your vibe. more deets inlvm.conf(5).-d,--debug ...β sets the debug level. repeat it from 1 to 6 times to crank up the detail on messages sent to the log file and/or syslog (if that's configured). the more you repeat, the more you know π--devices PVβ restricts which devices are visible and accessible to the command. devices you don't list will appear to be missing β like they ghosted π». you can repeat this option, or hand it a comma-separated list of devices. this one overrides the devices file.--devicesfile Stringβ a file that lists the devices LVM should use. the file has to exist in/etc/lvm/devices/, and it's managed with thelvmdevices(8)command. this overrides thelvm.conf(5)devices/devicesfileanddevices/use_devicesfilesettings.--driverloaded y|nβ if you set this tono, the command won't even attempt to use device-mapper. it's strictly for testing and debugging, so don't get cute with it in prod π-h,--helpβ displays help text. the classic.--journal Stringβ records info in the systemd journal. this is in addition to whatever thelvm.conflog/journalsetting already enables. your options:command: record info about the command.output: record the default command output.debug: record full command debugging.
--lockopt Stringβ used to pass options for special cases over tolvmlockd. more info inlvmlockd(8).--longhelpβ displays long help text. it's the director's cut π¬--nohintsβ don't 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 do standard hint file invalidation where it's appropriate, so it's not fully feral.--nolockingβ disables locking. β οΈ use with caution, fr fr: concurrent commands may produce incorrect results. this is a dangerous one, bestie.--persist Stringβ Persistent Reservation operation. the flavours: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. it's the multitalented icon β¨-q,--quiet ...β suppresses output and log messages. this overrides--debugand--verbose. repeat it once to also suppress any prompts with answer'no'. so-qqis your automatic no, iykyk.--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 original format with columns and rows. if there's more than one report per command, each report gets prefixed with the report name for identification.jsonproduces report output in JSON format.json_stdproduces report output in JSON format that's more compliant with the JSON standard.
more info in lvmreport(7).
-S,--select Stringβ selects objects to process and report based on specified criteria. the criteria syntax is described by--select helpandlvmreport(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 additional"selected"field (-o selected) showing1if the row matches the selection and0otherwise. for non-reporting commands that process LVM entities, the selection is used to choose items to process. very main character energy π―-t,--testβ runs in test mode. commands will not update metadata. it works by disabling all metadata writing but still returning success to the calling function anyway. β οΈ heads up 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. messy.-v,--verbose ...β sets the verbose level. repeat from 1 to 4 times to increase the detail of messages sent to stdout and stderr.--versionβ displays version information.-y,--yesβ don't prompt for confirmation interactively, just always assume the answer is yes. β οΈ use with extreme caution, genuinely. (for automatic no, see-qq.)
π¦ VARIABLES π¦
- VG β Volume Group name. valid names are in
lvm(8). - Tag β Tag name.
lvm(8)has the info about tag names and using tags in place of a VG, LV or PV. - Select β
Selectmeans that a required positional parameter can be omitted if the--selectoption is used.No argappears in this position. - String β see the option description for info about the string content.
- Size[UNIT] β
Sizeis an input number that accepts an optional unit. input units are always treated as base two values, no matter the capitalization, e.g.'k'and'K'both refer to 1024. the default input unit is specified by letter, followed by|UNIT.UNITrepresents the 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. (don't confuse this with the output control--units, where capital letters mean a multiple of 1000 β different lore entirely, don't mix them up π)
π ENVIRONMENT VARIABLES π
lvm(8) has all the info about environment variables used by lvm. for example, LVM_VG_NAME can generally be substituted for a required VG parameter. convenient king π
π«Ά 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)
and that's the whole page, bestie!! π
this absolute banger of a man page was brought to you by Red Hat, Inc., running LVM TOOLS 2.03.44(2) dated 2026-10-27 β and remember, this is the vgexport(8) page. go forth and export responsibly πβ¨
π¦ 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