**NOTE** January 2022 - Changes to Gstreamer and Pipewire packages from PackmanPlease read the following thread about the current changes
-
Help: externally access HD with encrypted LVM
Hi folks. Needing some assistance here.
I have an old HD with opensuse system on it. The main partition is an encrypted LVM.
For several reasons, I can't simply boot a computer with that disk at the moment (and it will be that for a long time).
Since I have a docking station available, I though about simply connecting it and accessing. However, I can't find a way to mount it: clicking on it in the notification either not prompts me for the password and/or worries about permission (tried as root with similar results), and on the command line nothing like vgscan and others find anything.
Can someone please help me on this?
Thanks a lot in advance!
-
Re: Help: externally access HD with encrypted LVM
What I normally do, in that case, is:
Code:
cryptsetup luksOpen /dev/sdb5 cr_lvm
Replace "/dev/sdb5" with the appropriate device on your system.
That should make the LVM volumes available under "/dev/mapper", and you can mount from there. These days, I don't need "vgscan", as that seems to be done automatically. But that might depend on what is installed on your system. Some distros do not automatically install "cryptsetup".
openSUSE Leap 15.4; KDE Plasma 5.24.4;
testing Tumbleweed.
-
Re: Help: externally access HD with encrypted LVM
 Originally Posted by nrickert
What I normally do, in that case, is:
Code:
cryptsetup luksOpen /dev/sdb5 cr_lvm
Replace "/dev/sdb5" with the appropriate device on your system.
That should make the LVM volumes available under "/dev/mapper", and you can mount from there. These days, I don't need "vgscan", as that seems to be done automatically. But that might depend on what is installed on your system. Some distros do not automatically install "cryptsetup".
Thanks @nrickert, it helped already:
Code:
#> ll /dev/mapper
total 0
crw------- 1 root root 10, 236 fev 7 11:12 control
lrwxrwxrwx 1 root root 7 fev 7 11:12 cr-auto-2 -> ../dm-2
lrwxrwxrwx 1 root root 7 fev 7 15:30 cr_lvm -> ../dm-7
lrwxrwxrwx 1 root root 7 fev 7 11:12 cr_root -> ../dm-0
lrwxrwxrwx 1 root root 7 fev 7 11:12 cr_swap -> ../dm-1
lrwxrwxrwx 1 root root 7 fev 7 14:32 luks-7583dc6f-415d-4446-8279-16c55b18a0a2 -> ../dm-3
lrwxrwxrwx 1 root root 7 fev 7 14:32 system-home -> ../dm-4
lrwxrwxrwx 1 root root 7 fev 7 14:32 system-main -> ../dm-5
lrwxrwxrwx 1 root root 7 fev 7 14:32 system-tmp -> ../dm-6
However, I don't know how to proceed:
Code:
#> sudo vgscan
WARNING: PV /dev/mapper/cr_lvm in VG system is using an old PV header, modify the VG to update.
WARNING: Device mismatch detected for system/home which is accessing /dev/mapper/luks-7583dc6f-415d-4446-8279-16c55b18a0
a2 instead of /dev/mapper/cr_lvm.
WARNING: Device mismatch detected for system/main which is accessing /dev/mapper/luks-7583dc6f-415d-4446-8279-16c55b18a0
a2 instead of /dev/mapper/cr_lvm.
WARNING: Device mismatch detected for system/tmp which is accessing /dev/mapper/luks-7583dc6f-415d-4446-8279-16c55b18a0a
2 instead of /dev/mapper/cr_lvm.
Found volume group "system" using metadata type lvm2
#> sudo lvs
WARNING: PV /dev/mapper/cr_lvm in VG system is using an old PV header, modify the VG to update.
WARNING: Device mismatch detected for system/home which is accessing /dev/mapper/luks-7583dc6f-415d-4446-8279-16c55b18a0
a2 instead of /dev/mapper/cr_lvm.
WARNING: Device mismatch detected for system/main which is accessing /dev/mapper/luks-7583dc6f-415d-4446-8279-16c55b18a0
a2 instead of /dev/mapper/cr_lvm.
WARNING: Device mismatch detected for system/tmp which is accessing /dev/mapper/luks-7583dc6f-415d-4446-8279-16c55b18a0a
2 instead of /dev/mapper/cr_lvm.
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
home system -wi-a----- 296,44g
main system -wi-a----- 50,00g
tmp system -wi-a----- 2,00g
I want to mount that lvm home volume in a different directory to find some old files I'm needing. How can I proceed? It is just mount now (and if yes, what path should I mount?), or should I perform some other procedure before?
Thanks a lot!
-
Re: Help: externally access HD with encrypted LVM
 Originally Posted by johannesrs
However, I don't know how to proceed:
Try (as root)
Code:
mount /dev/mapper/system-home
and then look under "/mnt" to find the files you are seeing. You probably don't need to be root, once it is mounted.
For now, I would ignore that message about old PV header.
I'm not sure of those "Device mismatch" messages. Perhaps you currently have another LVM with a name conflict between the two.
openSUSE Leap 15.4; KDE Plasma 5.24.4;
testing Tumbleweed.
-
Re: Help: externally access HD with encrypted LVM
 Originally Posted by nrickert
Try (as root)
Code:
mount /dev/mapper/system-home
and then look under "/mnt" to find the files you are seeing. You probably don't need to be root, once it is mounted.
For now, I would ignore that message about old PV header.
I'm not sure of those "Device mismatch" messages. Perhaps you currently have another LVM with a name conflict between the two.
Hi @nrickert.
Now I had no advances. 
If I don't "point" the mount command to some destination directory, it complains that it is not in the /etc/fstab. Understandable.
However, if I go further and point the mount command somewhere, say "sudo mount /dev/mapper/system-home /home/user/tmp" (where that is an actually directory that the user user has created), it complains that he can't read the superblock in /dev/mapper/system-home... 
Seems that I'm in trouble now... Right?
-
Re: Help: externally access HD with encrypted LVM
 Originally Posted by johannesrs
Seems that I'm in trouble now... Right?
It looks that way. I have not come across that situation.
openSUSE Leap 15.4; KDE Plasma 5.24.4;
testing Tumbleweed.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|