Unable to mount old system disk. Crypt and LV

Hi

I’m really struggling with this and I know I’m missing something.

I wanted to perform a clean system install on a fresh SSD which went well. I then connected my old system disk as I want to cp files from my old /home directory as SATA 1. Both new and the old system drives are Open SUSE 15.4. Both were installed as encrypted and seem to be LVs.

Fdisk sees both drives and their partitions.
My old /home must be on sdb2.

cryptsetup luksOpen /dev/sdb2 cr_sdb2
requests password and completes.

#lsblk

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda ( The new system disk)
├─sda1 /boot/efi
└─sda2 part
└─cr_ata- crypt
├─system-swap [SWAP]
└─system-root /var
/root
/tmp
.
.
/home
etc.

sdb (The old system disk )
├─sdb1 part
└─sdb2 part
└─cr_sdb2 crypt
sr0 rom
(The above is edited as Libre Office didn’t like my copy/paste)

localhost:~ # mount /dev/mapper/cr_sdb2 /mnt/sdb2
mount: /mnt/sdb2: unknown filesystem type ‘LVM2_member’.

Ive looked at various responses on mounting LVs and they seem to use the paths given by lvdisplay.

localhost:~ # lvdisplay

File descriptor 26 (anon_inode:inotify) leaked on lvdisplay invocation. Parent PID 3194: -bash
— Logical volume —
LV Path /dev/system/swap
LV Name swap
VG Name system
LV UUID Ma7kAl-dM2f-akil-j5mq-e0sc-6Prn-PEn5Tt
LV Write Access read/write
LV Creation host, time install, 2021-04-06 20:12:27 +0100
LV Status NOT available
LV Size 11.72 GiB
Current LE 3001
Segments 1
Allocation inherit
Read ahead sectors auto

— Logical volume —
LV Path /dev/system/root
LV Name root
VG Name system
LV UUID rRTW48-4NRq-3x8R-6rC0-Tces-5s6Q-v2GSb0
LV Write Access read/write
LV Creation host, time install, 2021-04-06 20:12:28 +0100
LV Status NOT available
LV Size 919.30 GiB
Current LE 235340
Segments 1
Allocation inherit
Read ahead sectors auto

— Logical volume —
LV Path /dev/system/swap
LV Name swap
VG Name system
LV UUID RyEU4S-sYGP-eAbr-s3JE-wdNr-y5CW-98p3IO
LV Write Access read/write
LV Creation host, time install, 2022-07-24 20:49:56 +0100
LV Status available

open 2

LV Size 2.00 GiB
Current LE 512
Segments 1
Allocation inherit
Read ahead sectors auto

  • currently set to 1024
    Block device 254:1

— Logical volume —
LV Path /dev/system/root
LV Name root
VG Name system
LV UUID Tx95yT-JogU-fwzy-9JXH-rkw7-2sRm-aciswq
LV Write Access read/write
LV Creation host, time install, 2022-07-24 20:49:56 +0100
LV Status available

open 1

LV Size 929.01 GiB
Current LE 237826
Segments 1
Allocation inherit
Read ahead sectors auto

  • currently set to 1024
    Block device 254:2

I need to mount *dev/*system/root but of course I have two of them. From the creation dates I can see that the first of these is the one that I want . It is also marked NOT available.

df shows

/dev/mapper/system-root 974135296 8099500 965282436 1% /home

Which is of course the new one but I also need the old.

etc/fstab (edited)

/dev/system/root / btrfs

/dev/system/root /home btrfs subvol=/@/home

Just from desperation

localhost:~ # mount -t btrfs /dev/mapper/cr_sdb2 /mnt/sdb2
mount: /mnt/sdb2: wrong fs type, bad option, bad superblock on /dev/mapper/cr_sdb2, missing codepage or helper program, or other error.

I’m not sure what you are doing, so this might not help.

If cr_sdb2 is the base for an LVM, then you cannot just mount it.

Maybe try (as root)

lvchange -a y

to make the logical volumes accessible. And then look at “/dev/mapper” to see if they show up.

I suspect you have a name conflict problem. When you create a logical volume, the default name is “system”. However, you are already using “system” for a logical volume on “/dev/sda”.

Try booting live media, so that you do not use “/dev/sda”. And then see if you can access the LVM on “/dev/sdb”.

(I’ll note that I always choose an LVM name different from “system”, so that it will be unique).

Many thanks for picking this up.


**localhost:~ #** lvchange -a y 
File descriptor 25 (anon_inode:inotify) leaked on lvchange invocation. Parent PID 2492
: -bash 
  No command with matching syntax recognised.  Run 'lvchange --help' for more informat
ion. 
  Nearest similar command has syntax: 
  lvchange -a|--activate y|n|ay VG|LV|Tag|Select ... 
  Activate or deactivate an LV. 

**localhost:~ #** ls /dev/mapper 
**control**  cr_ata-CT1000BX500SSD1_2214E6252411-part2  system-root  system-swap 
**localhost:~ #**

I suspect that cr_ata-CT1000BX500SSD1_2214E6252411-part2 is my new disk and the parent of [FONT=monospace]system-root & system-swap.

I tried to mount it anyway


[FONT=monospace]**localhost:~ #** mount /dev/mapper/cr_ata-CT1000BX500SSD1_2214E6252411-part2 /mnt/sdb2 
mount: /mnt/sdb2: unknown filesystem type 'LVM2_member'. 
**localhost:~ #**

[/FONT][/FONT]

Isn’t that very logical. When that partition is managed by LVM, there is a LVM physical volume on it and NOT a file system of any kind.