0

I recently switched to a bigger Hard Drive by running dd if=/dev/old of=/dev/new However now I am trying to get some files that changed after copying, so I connected the old Hard Drive over USB. The structure of my Main Drive looks like this (the external one does look exactly the same, just smaller in capacity):

sda                            8:0    0 931.5G  0 disk  
├─sda1                         8:1    0   512M  0 part  /boot
├─sda2                         8:2    0   256M  0 part  
├─sda3                         8:3    0   256M  0 part  
├─sda4                         8:4    0     1K  0 part  
└─sda5                         8:5    0 930.5G  0 part  
  └─sda5_crypt (dm-0)        252:0    0 930.5G  0 crypt 
    ├─vg-swap (dm-1)         252:1    0     8G  0 lvm   [SWAP]
    ├─vg-ubuntu--root (dm-2) 252:2    0   330G  0 lvm   /
    ├─vg-kali--root (dm-3)   252:3    0    30G  0 lvm   

I can sucessfully decrypt using luksOpen, but can't get LVM to recognise the Partitions. Neither vgscan --mknodes nor vgchange -ay do something. vchange output:

sudo vgchange -ay
  Found duplicate PV hb5SMvxs2GfCaHwCkLAUn1IXCm9gABCD: using /dev/mapper/sdb5_crypt not /dev/mapper/sda5_crypt
  4 logical volume(s) in volume group "vg" now active

So it looks like there's a name collision because the Partition UUID is the same due to copying with dd. Is there any way around this that allows me to access the Data? (Without booting from Live USB)?

1 Answer 1

2

In case anyone has the same problem, vgimportclone is your savior.

You must log in to answer this question.

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