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 read lvm.conf(5). it's giving "presets but for LVM" πŸ’–
  • --config String β€” config settings for the command, and these override the ones in lvm.conf(5). the String arg uses the exact same format as lvm.conf(5), or you can use section/field syntax if that's your vibe. more deets in lvm.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 the lvmdevices(8) command. this overrides the lvm.conf(5) devices/devicesfile and devices/use_devicesfile settings.
  • --driverloaded y|n β€” if you set this to no, 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 the lvm.conf log/journal setting 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 to lvmlockd. more info in lvmlockd(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 --commandprofile or --metadataprofile, depending on the command. it's the multitalented icon ✨
  • -q, --quiet ... β€” suppresses output and log messages. this overrides --debug and --verbose. repeat it once to also suppress any prompts with answer 'no'. so -qq is your automatic no, iykyk.
  • --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 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.
    • json produces report output in JSON format.
    • json_std produces 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 help and 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 additional "selected" field (-o selected) showing 1 if the row matches the selection and 0 otherwise. 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 β€” Select means 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, no matter the 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. (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