I have two drives, an older and a newer one, both of which contain systems set up using Mint/Ubuntu with full disk encryption. I want to mount the older one on the newer one to copy some of my old stuff across.

The Volume group names are the same on both systems. I've found Mount external hard drive with LUKS Encryption + LVM which tells me about vgimportclone. It's not clear from the man page though whether this will change the volume group data on disk in a way that means I can't boot into the old system, which could be disastrous.

What's the safest way to do this?


The new system was relatively low value (some setup effort, but nothing hard to replace), so I decided to mess with that instead.

I booted from USB (using the mint install system), and did the following (where `sdb5 is the encrypted partition that houses the lvm data for my new system)

cryptsetup luksOpen /dev/sdb5 newdisk
vgimportclone /dev/mapper/newdisk

I'm not sure that those scans are actually necessary, but i did them, and then I looked around with pvdisplay, vgdisplay and lvdisplay. All looks fine.

I tried re-booting at this point, which didn't work. Grub couldn't find the disk, and complained with a message like this one.

I booted back into the installer, and fixed up the references to /dev/mapper/mint--vg-root and /dev/mapper/mint--vg-swap in /etc/grub/grub.cfg and /etc/fstab.

The system boots, and I can now mount the old drive using the GUI tools (nemo), albeit it's a tad inelegant, with an error displayed from the attempt to mount the encrypted partition, after which the unecrypted one is available to mount.

So, it seems OK. I've greped for mint--vg in /etc and /boot, and found nothing else to fix up. I'll add more info here if I come across anything else that needs fixing up.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.