{"slug": "fixing-my-own-mistakes-renaming-a-volume-group", "title": "Fixing my own mistakes: renaming a volume group", "summary": "The article describes a problem where a user reinstalled Debian on a new NVMe drive with the same hostname, causing both the old and new drives to have identically named LVM volume groups (\"heartofglass-vg\"), which prevented the old drive from mounting. The solution involved booting from a live USB and using the `vgrename` command to rename the old volume group to \"oldhog-vg,\" allowing both drives to coexist without conflict. The author emphasizes backing up data before making such changes and consulting the `man vgrename` page for guidance.", "body_md": "Fixing my own mistakes: renaming a volume group\nUsing vgrename to rename a volume group is a piece of cake. Here's an unnecessarily long blog post about it.\nThis week, I upgraded the NVMe drive on my editing rig, and rather than clone from one drive to the other, I decided to simply reinstall Debian: we're getting close to Trixie's release and I figured it was time to rebase to Trixie.\nWhile installing, Debian asks you to assign a hostname. Naturally, I chose the same hostname I'd previously used: heartofglass\nafter the Blondie song (all my physical machines are named for songs, and Blondie's been on the mind recently).\nI use LUKS with LVM for whole-disk encryption on this desktop, and Debian assigns a name to a volume group based on the hostname of the machine. So, Debian called the new volume group heartofglass-vg\n. That would come to be a problem later...\nProblems with LVM\nSince I knew there'd be file copying between the old and new NVMe drives, I just plugged the old drive into a spare M.2 slot on the motherboard. Well, wouldn't you know it, when I tried to unlock it and mount the old NVMe drive from the new install, it couldn't mount.\nThe reason: the volume group on both drives was named the exact same thing: heartofglass-vg\n. Since the new root filesystem lived on a heartofglass-vg\n, Nautilus apparently couldn't mount a second filesystem with the same name again.\nNow, obviously I could go into fstab\nand specify an alternative mount point for the old NVMe. But leaving both devices with the same volume group name could cause me some headaches down-the-road... maybe I'd end up accidentally booting from the wrong NVMe or snapshotting old data. Mistakes happen, and I decided it was easier to simply change the name of the old volume group.\nChanging the name of a volume group\nDoing so was a piece of cake. I booted up a live USB that I had at my desk. This way I'd have access to both NVMe drives without mounting the new one before the old one.\nAs always, back up your files before making any sort of changes to how partitions or volume groups work: I routinely check my backups once per week to make sure I can recover the media files I'm working with. Changing a volume group name shouldn't be terribly destructive, but you never know.\nI mounted the old heartofglass-vg\nand then as root, used vgrename\nto rename the old volume group:\nvgrename heartofglass-vg oldhog-vg\nI could have also done this with a UUID:\nvgrename NNNNNN-NNNN-NNNN-NNNN-NNNN-NNNN-NNNNNN oldhog-vg\nChanging the name of the volume group allows me to take my sweet time in migrating files, which has benefits: I can boot up the old environment if I'd like to see how something used to be configured.\nI rebooted from the new NVMe drive, and everything mounts as expected.\nAnd as always, the man page is your friend. I checked man vgrename\nbefore I got started, and you should too. :)", "url": "https://wpnews.pro/news/fixing-my-own-mistakes-renaming-a-volume-group", "canonical_source": "https://veronicaexplains.net/rename-a-volume-group/", "published_at": "2025-05-01 19:42:26+00:00", "updated_at": "2026-05-23 20:09:55.716390+00:00", "lang": "en", "topics": [], "entities": ["Debian", "LVM", "LUKS", "NVMe", "Nautilus", "Blondie", "heartofglass", "Trixie"], "alternates": {"html": "https://wpnews.pro/news/fixing-my-own-mistakes-renaming-a-volume-group", "markdown": "https://wpnews.pro/news/fixing-my-own-mistakes-renaming-a-volume-group.md", "text": "https://wpnews.pro/news/fixing-my-own-mistakes-renaming-a-volume-group.txt", "jsonld": "https://wpnews.pro/news/fixing-my-own-mistakes-renaming-a-volume-group.jsonld"}}