On 11/26/2020 05:27 PM, Leon Fauster via CentOS wrote:
Am 26.11.20 um 20:10 schrieb H:
Running CentOS 7 I have a previously combined backup of a disk with three partitions using dd. I now need to restore one single file from this backup and after perusing the internet, specifically https://unix.stackexchange.com/questions/31669/is-it-possible-to-mount-a-gzi..., I have done the following:
installed squashfs-tools
installed kpartx
made a squash image of the dd backup and mounted it
used kpartx to create devices for the three partitions under /dev/mapper/loopNpP
I can now mount the first partition, which is the EFI partition, and access it
the second partition, the boot partition, fails to mount since it has the same UUID as the disk I am using in the computer, and of which it is an earlier dd backup. Since I am not interested in the boot partition - at least not right now - I moved on.
I am, however, interested in the third partition which is LUKS encrypted. Running 'cryptsetup luksOpen /dev/sda3 my_encrypted_volume' I can decrypt it with the password
trying to mount the decrypted version with 'mount /dev/mapper/my_encrypted_volume /media/my_device' results in a failure message 'mount: unknown filesystem type 'LVM2_member'
another website, https://askubuntu.com/questions/766048/mount-unknown-filesystem-type-lvm2-me..., suggests I could run vgdisplay to get the UUID and then rename it using vgrename
But, vgdisplay shows only one vg and I am afraid to rename the VG UUID shown by vgdisplay since it might refer to the VG currently in use...
Does anyone have any insight or suggestions into the above and how to proceed while being absolutely certain I will not be messing up the running part of the system?
IIRC: Activate the LVM via: vgchange -a y
and mount the logical volume (LV).
LV can be listed with lvs. The device nodes are under /dev/mapper ...
-- Leon
CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
OK, I am looking at https://www.cyberciti.biz/faq/linux-mount-an-lvm-volume-partition-command/. A couple of follow-up questions:
- Would activating the LVM with 'vgchange -a y' make any changes, or create any potential issues, with the system already running?
- How do I know that the output from 'vgdisplay' refers to this 'new' VG and not VGs on the running system?
- To mount the VG, I would have to run:
-- 'vgscan'
-- make directory for mounting
-- 'mount...' to mount the VG
Is that correct? And it would not create any issues with the running system?
Thank you in advance.