VGIMPORTCLONE(8)
π VGIMPORTCLONE(8) π
okay bestie, so this one lives in the System Manager's Manual section 8, and it's literally the glow-up ritual for a VG that got copy-pasted by hardware. slay.
β¨ NAME β¨
vgimportclone β Import a VG from cloned PVs π¦
β¨ SYNOPSIS β¨
vgimportclone position_args
[ option_args ]
β¨ DESCRIPTION β¨
So vgimportclone imports a VG from duplicated PVs β like the ones a hardware snapshot of your existing PVs would hand you. π
Here's the tea: a duplicated VG cannot be used until it's been made to coexist with the original VG. So vgimportclone does two things: it renames the VG that's attached to the PVs you named, and it changes the associated VG and PV UUIDs. no cap, it's giving identity crisis resolution. β¨
β¨ USAGE β¨
vgimportclone PV ...
[ -i|--import ]
[ -n|--basevgname String ]
[ --importdevices ]
[ COMMON_OPTIONS ]
Common options for lvm, bestie β the shared little kit:
[ -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 π
-n,--basevgnameString β By default, the snapshot VG gets renamed to the original name plus a numeric suffix, yep, to dodge duplicate naming (so'test_vg'would become'test_vg1'). This option overrides that base VG name used for all the VG renames. And if a VG with that name already exists, a numeric suffix gets added (same deal as the example above) to make it unique. π«Ά--commandprofileString β The command profile to use for command configuration. Peeplvm.conf(5)for the full rundown on profiles.--configString β Config settings for the command. These override thelvm.conf(5)settings. The String arg uses the same format aslvm.conf(5), or it can use section/field syntax.lvm.conf(5)has the info about config. β¨-d,--debug... β Set debug level. Repeat it from 1 to 6 times to crank up the detail of messages going to the log file and/or syslog (if that's configured). π--devicesPV β Restricts the devices that are visible and accessible to the command. Devices not on the list will appear to be missing. This option can be repeated, or it accepts a comma-separated list of devices. It overrides the devices file. π--devicesfileString β A file listing devices that LVM should use. The file must exist in/etc/lvm/devices/and is managed with thelvmdevices(8)command. This overrides thelvm.conf(5)devices/devicesfileanddevices/use_devicesfilesettings.--driverloadedy|n β If set to no, the command will not attempt to use device-mapper. For testing and debugging. π§ͺ-h,--helpβ Display help text. π-i,--importβ Import exported VGs. Otherwise VGs that have been exported will not be changed (and neither will their associated PVs). π--importdevicesβ Add devices to the devices file.--journalString β Record information in the systemd journal. This info is in addition to whatever thelvm.conflog/journalsetting already enables.command:records information about the command.output:records the default command output.debug:records full command debugging.--lockoptString β Used to pass options for special cases tolvmlockd. Seelvmlockd(8)for more info.--longhelpβ Display long help text. the extended cut, bestie. π--nohintsβ Do not use the hints file to locate devices for PVs. A command may read more devices to find PVs when hints aren't used. It will still perform standard hint file invalidation where appropriate.--nolockingβ Disable locking. π Use with caution β concurrent commands may produce incorrect results. fr fr, be careful.--profileString β An alias for--commandprofileor--metadataprofile, depending on the command.-q,--quiet... β Suppress output and log messages. Overrides--debugand--verbose. Repeat it once to also suppress any prompts with answer'no'. π€«-t,--testβ Run in test mode. Commands will not update metadata. This is implemented by disabling all metadata writing but still 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. π-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 but always assume the answer is yes. Use with extreme caution. (For automatic no, see-qq.) π¨
πΈ VARIABLES πΈ
PVβ Physical Volume name, a device path under/dev. For commands managing physical extents, a PV positional arg generally accepts a suffix indicating a range (or multiple ranges) of physical extents (PEs). When the first PE is omitted, it defaults to the start of the device, and when the last PE is omitted it defaults to the end. Start and end range (inclusive):PV[:PE-PE] ...Start and length range (counting from 0):PV[:PE+PE] ...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 β like'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 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. iykyk π
β EXAMPLES β
Okay so picture this: an original VG "vg00" has PVs "/dev/sda" and "/dev/sdb". The corresponding PVs from a hardware snapshot are "/dev/sdc" and "/dev/sdd". You want to rename the VG associated with "/dev/sdc" and "/dev/sdd" from "vg00" to "vg00_snap" (and change the associated UUIDs, periodt):
vgimportclone --basevgname vg00_snap /dev/sdc /dev/sdd
ate. π₯
π 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 icon was brought to you by Red Hat, Inc., running LVM TOOLS 2.03.44(2), dated 2026-10-27. go forth and clone 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