VGRENAME(8)

✨ VGRENAME(8) ✨

okay bestie, welcome to the System Manager's Manual page for vgrename β€” yes it's section 8, yes we're in the grown-up sysadmin section, and yes you're gonna slay this πŸ’…


πŸ’– NAME πŸ’–

vgrename β€” Rename a volume group


πŸ¦‹ SYNOPSIS πŸ¦‹

vgrename position_args
       [ option_args ]

🌸 DESCRIPTION 🌸

So like. vgrename renames a VG. That's it, that's the whole vibe. πŸŽ€

But here's the tea, and it's important tea: every VG visible to a system needs to have a different name, otherwise a whole bunch of LVM commands will just refuse to run, or they'll hit you with warning messages. Rude? Maybe. Necessary? Absolutely. 😭

When does the same-name situation even happen, you ask? Two ways, bestie:

  • disks get moved between machines 🧳
  • filters get changed

And if a newly connected disk has a VG with the same name as the VG containing the root filesystem, the machine may not boot correctly. Not a vibe. Not the main character energy we want. πŸ’€

So when two VGs have the same name, you can use the VG UUID in place of the source VG name. problem solved, periodt. ✨


πŸ‘‘ USAGE πŸ‘‘

Rename a VG.

vgrename VG VG_new
       [ COMMON_OPTIONS ]

β€”

Rename a VG by specifying the VG UUID.

vgrename String VG_new
       [ COMMON_OPTIONS ]

β€”

Common options for command:

[ -A|--autobackup y|n ]
[ -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 πŸ’…

  • -A, --autobackup y|n β€” tells you whether metadata should get backed up automatically after a change. Turning this ON is strongly advised!! like genuinely, don't skip it. Peep vgcfgbackup(8) for the full rundown. 🫢
  • --commandprofile String β€” the command profile to use for command configuration. lvm.conf(5) has all the profile lore if you're curious. ✨
  • --config String β€” config settings for the command. These override the settings in lvm.conf(5). The String arg uses the exact same format as lvm.conf(5), or it can use section/field syntax. Again, lvm.conf(5) for the details. πŸ“–
  • -d, --debug ... β€” sets the debug level. Repeat it from 1 to 6 times to crank up the detail of messages sent to the log file and/or syslog (if that's configured). the more you repeat, the more it yaps πŸ’¬
  • --devices PV β€” restricts which devices are visible and accessible to the command. Devices you don't list will appear to be missing πŸ‘». This option can be repeated, or it accepts a comma-separated list of devices. Heads up: this overrides the devices file.
  • --devicesfile String β€” a file listing the devices that 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 it to no, the command will not attempt to use device-mapper. For testing and debugging. πŸ§ͺ
  • -f, --force ... β€” overrides various checks, confirmations and protections. Use with extreme caution. like, extreme extreme. 😬
  • -h, --help β€” displays help text.
  • --journal String β€” records information in the systemd journal. This info is in addition to whatever is enabled by the lvm.conf log/journal setting. The values:
    • command: record information about the command.
    • output: record the default command output.
    • debug: record full command debugging.
  • --lockopt String β€” used to pass options for special cases to lvmlockd. See lvmlockd(8) for more. πŸ”’
  • --longhelp β€” displays long help text. (the deluxe version πŸŽ€)
  • --nohints β€” do not use the hints file to locate devices for PVs. A command may read more devices to find PVs when hints are not being used. The command will still perform standard hint file invalidation where appropriate. πŸ•΅οΈ
  • --nolocking β€” disables locking. Use with caution β€” concurrent commands may produce incorrect results. πŸ’€
  • --profile String β€” an alias for --commandprofile or --metadataprofile, depending on the command.
  • -q, --quiet ... β€” suppresses output and log messages. Overrides --debug and --verbose. Repeat it once to also suppress any prompts with the answer 'no'. 🀫
  • --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 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. 🌈

  • -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. 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 ... β€” 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 β€” do not prompt for confirmation interactively, but always assume the answer is yes. Use with extreme caution. (For automatic no, see -qq.) 😌

πŸ“ VARIABLES πŸ“

  • VG β€” Volume Group name. See lvm(8) for valid names.
  • String β€” See the option description for information 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 β€” so for example '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
(This should not be confused with the output control --units, where capital letters mean multiple of 1000.)

🧚 ENVIRONMENT VARIABLES 🧚

See lvm(8) for the whole scoop on environment variables used by lvm. For example, LVM_VG_NAME can generally be substituted for a required VG parameter. iconic behaviour honestly πŸ‘‘


⭐ EXAMPLES ⭐

Rename VG "vg02" to "myvg":

vgrename vg02 myvg

Rename the VG with the specified UUID to "myvg".

vgrename Zvlifi-Ep3t-e0Ng-U42h-o0ye-KHu1-nl7Ns4 myvg

🌈 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 🫢 brought to you by Red Hat, Inc., running LVM TOOLS 2.03.44(2), dated (2026-10-27) β€” vgrename(8), see you in the group chat πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from