1

I have the following setup:

  • /dev/sdX - disk (GPT table)
  • /dev/sdX1 - regular partition
  • /dev/sdX1/crypt - LUKS encrypted partition
  • /dev/sdX1/crypt/lvm_vg - lvm volume group
  • /dev/sdX1/crypt/lvm_vg/lvm_lv - lvm logical volume

Inside lvm_lv, there is a regular partition table (GPT) with two partitions, one EFI partition and one for the OS. lvm_lv and the partitions inside it are used by attaching lvm_lv to a KVM virtual machine.

How can I access the partitions inside lvm_lv without attaching it to a virtual machine? If I open crypt with cryptsetup, LVM detects lvm_vg.

This is a backup copy of another disk, you are wondering how this convoluted setup came to be.

1

1 Answer 1

3

Solution based on https://unix.stackexchange.com/a/73132/30851 .

  • losetup --find --show --partscan --read-only /dev/lvm_vg/lvm_lv
    • This will output something like: /dev/loop0
    • Now we have /dev/loop0p1 and /dev/loop0p2 (partitions we were looking for)
  • mount /dev/loop0p2 /mnt

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .