Re: cloning a lvm crypto volume to a bigger disk
On Tue, Jul 5, 2011 at 10:57 AM, Jochen Schulz <email@example.com> wrote:
>> So I have this machine with a lvm crypto volume done with a debian
>> testing install. This is on a disk with 160GB.
>> But now I would like to clone it to a new disk: 500GB.
>> What are my options?
> What's the order of the block layers?
> - LVM on top of dm-crypt on top of raw device, or
> - dm-crypt on top of LVM on top of raw device
I don't remember the specifics when I did the install but here's what I got:
$ cat /etc/fstab
# /etc/fstab: static file system information.
# Use 'vol_id --uuid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/mapper/laptop-root / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda1 during installation
UUID=25835063-4f87-2c8f-b0fb-897d9c6dba93 /boot ext2
defaults 0 2
/dev/mapper/laptop-home /home ext4 defaults 0 2
/dev/mapper/laptop-swap none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0
$ cat /etc/crypttab
#target name source device key file options
sda5_crypt UUID=adaff49c-4719-8a94-8ecd-532ca4b3627c none luks
$ ls -l /dev/mapper
lrwxrwxrwx 1 root root 7 Jul 4 11:34 laptop-home -> ../dm-3
lrwxrwxrwx 1 root root 7 Jul 4 11:34 laptop-root -> ../dm-1
lrwxrwxrwx 1 root root 7 Jul 4 11:34 laptop-swap -> ../dm-2
crw------- 1 root root 10, 236 Jul 4 11:34 control
lrwxrwxrwx 1 root root 7 Jul 4 11:34 sda5_crypt -> ../dm-0
Hope this helps.