LVM: How to access a foreign volume group

Volker Wysk post at volker-wysk.de
Mon Dec 4 01:03:25 UTC 2017


Hi!

I'm about to set up an LVM cache (for my encrypted root file system). This involves attaching a cache pool LV to the origin LV to be cached, as the last step:

lvconvert --type cache --cachepool kubuntu-vg/cachedatalv kubuntu-vg/root

I've got it working in a virtual machine, but I'm hesitant to apply the procedure to my production system. It would be bad, if I had to restore it from a backup, because I have installed and configured a lot of things.

So, in case something goes wrong, I want to be able to start a rescue system and undo the attaching of the cache pool LV to the origin LV. This would be the command to do this:

lvconvert --uncache kubuntu-vg/root

But the question is: How to access the LVM setup of the other (production) system from the rescue system? The rescue system is encrypted too, but I could make it unencrypted, non-LVM, if needed.

How to instruct LVM to operate on another installation? When I start the rescue system, which I've installed on an USB stick, I can access only the native LVM installation, like it should be.

Also, both volume groups have the same name. Because I installed both from the Kubuntu 16.04 install ISO (from an USB stick), and this assigns "kubuntu-vg" to the VG name. (I'm using "Guided - use entire disk and setu up encrypted LVM" in the "Disk Setup" step. "Manual" doesn't work, and looks broken).

Thanks,
Volker





More information about the ubuntu-users mailing list