You are here

mounting an encrypted disk with lvm

i got myself a new laptop, a lenovo t420, a while back. it works with fedora 15. however, to keep costs down i purchased it with a 5400rpm disk and would use an old disk i had a smaller 7200rpm disk.

so now i needed to clone the disk

a straight dd if=/dev/sda of=/dev/sdb cant work because of the smaller size. the solution was to use virt-manager and create a vm that used /dev/sdb as its storage. then install fedora 15 on that.

next is to use rsync on it. but wait. i enrypted the volume and now it wont read. the solution i got was from over here and it was

sudo cryptsetup luksOpen /dev/sdb2 secret
<enter password>
sudo vgchange -ay
sudo mount /dev/mapper/secret /media


and thats it!