I've got a full drive image 2022-06-11_fedora.iso that I'm trying to manipulate its partitions on another computer. (e.g. resize LVM logical volumes, move ESP, and expand /boot partition).
I cannot seem to mount the LVM volumes after decrypting the LUKS partition. How can I mount the LVM volumes after decrypting the LUKS partition that they sit on in order to manipulate the volumes with the LVM command suite?
fdisk of image contents
3 partitions:
2022-06-11_fedora.iso1is/boot2022-06-11_fedora.iso2is ESP2022-06-11_fedora.iso3is LVM on LUKS
$ fdisk -l 2022-06-11_fedora.iso Disk 2022-06-11_fedora.iso: 238.47 GiB, 256060514304 bytes, 500118192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: Device Start End Sectors Size Type 2022-06-11_fedora.iso1 2048 514047 512000 250M Linux filesystem 2022-06-11_fedora.iso2 514048 808959 294912 144M EFI System 2022-06-11_fedora.iso3 808960 500117503 499308544 238.1G Linux filesystem Decrypting third partition
$ sudo cryptsetup plainOpen --offset=808960 2022-06-11_fedora.iso cryptdisk Enter passphrase for 2022-06-11_fedora.iso: $ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS loop0 7:0 0 238.5G 0 loop └─cryptdisk 253:2 0 238.1G 0 crypt sda 8:0 0 1.8T 0 disk └─sda1 8:1 0 1.8T 0 part nvme0n1 259:0 0 1.8T 0 disk ├─nvme0n1p1 259:1 0 487M 0 part /boot/efi ├─nvme0n1p2 259:2 0 3.8G 0 part /recovery └─nvme0n1p3 259:3 0 1.8T 0 part └─cryptdata 253:0 0 1.8T 0 crypt └─data-root 253:1 0 1.8T 0 lvm / $ sudo fdisk -l /dev/mapper/cryptdisk Disk /dev/mapper/cryptdisk: 238.09 GiB, 255646326784 bytes, 499309232 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Trying to mount /dev/mapper/cryptdisk
$ sudo mount /dev/mapper/cryptdisk /mnt/crypt mount: /mnt/crypt: wrong fs type, bad option, bad superblock on /dev/mapper/cryptdisk, missing codepage or helper program, or other error. How can I mount the LVM volumes after decrypting the LUKS partition?