惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Security @ Cisco Blogs
罗磊的独立博客
宝玉的分享
宝玉的分享
Last Week in AI
Last Week in AI
T
The Blog of Author Tim Ferriss
美团技术团队
T
Tailwind CSS Blog
博客园 - 三生石上(FineUI控件)
博客园 - Franky
G
Google Developers Blog
Jina AI
Jina AI
Stack Overflow Blog
Stack Overflow Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
V
Visual Studio Blog
腾讯CDC
S
SegmentFault 最新的问题
Recent Announcements
Recent Announcements
博客园 - 叶小钗
Microsoft Security Blog
Microsoft Security Blog
雷峰网
雷峰网
L
LangChain Blog
Vercel News
Vercel News
Forbes - Security
Forbes - Security
PCI Perspectives
PCI Perspectives
N
News | PayPal Newsroom
S
Security Affairs
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 司徒正美
J
Java Code Geeks
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hacker News: Ask HN
Hacker News: Ask HN
Schneier on Security
Schneier on Security
A
About on SuperTechFans
Attack and Defense Labs
Attack and Defense Labs
Google Online Security Blog
Google Online Security Blog
aimingoo的专栏
aimingoo的专栏
MongoDB | Blog
MongoDB | Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
酷 壳 – CoolShell
酷 壳 – CoolShell
Cloudbric
Cloudbric
B
Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Proofpoint News Feed
D
DataBreaches.Net
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
B
Blog RSS Feed
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
N
News and Events Feed by Topic

Veronica Explains

Here's how I host my own AIM server I'm switching to a dumbphone this summer Writerdeck: FAQ It's time to talk about my writerdeck Living with GrapheneOS: FAQ Upcoming performance + quick housekeeping note Veronica Explains launches new website/newsletter! Responding to comments on "I stream nothing..." How I use Handbrake in 2025 Everyday rsync Installing helpful Cockpit modules from 45Drives How I set up VimWiki for notetaking Clonezilla 101: creating disk images Removed ActivityPub from vkc.sh RIP guestbook Predictably, I've returned to Mastodon
Fixing my own mistakes: renaming a volume group
vkc · 2025-05-02 · via Veronica Explains
tutorials

Using vgrename to rename a volume group is a piece of cake. Here's an unnecessarily long blog post about it.

A terminal window showing the vgrename utility in action.

This 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.

While installing, Debian asks you to assign a hostname. Naturally, I chose the same hostname I'd previously used: heartofglass after the Blondie song (all my physical machines are named for songs, and Blondie's been on the mind recently).

I 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. That would come to be a problem later...

Problems with LVM

Since 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.

The reason: the volume group on both drives was named the exact same thing: heartofglass-vg. Since the new root filesystem lived on a heartofglass-vg, Nautilus apparently couldn't mount a second filesystem with the same name again.

Now, obviously I could go into fstab and 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.

Changing the name of a volume group

Doing 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.

As 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.

I mounted the old heartofglass-vg and then as root, used vgrename to rename the old volume group:

vgrename heartofglass-vg oldhog-vg

I could have also done this with a UUID:

vgrename NNNNNN-NNNN-NNNN-NNNN-NNNN-NNNN-NNNNNN oldhog-vg

Changing 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.

I rebooted from the new NVMe drive, and everything mounts as expected.

And as always, the man page is your friend. I checked man vgrename before I got started, and you should too. :)