I'd like to migrate my Ubuntu 14.04 install from a smaller SSD (256GB) to a bigger one (Crucial MX100 512GB) without reinstalling. What is the best way to process? I read that Clonezilla was not appropriate to deal with the SSD alignment.
More details about my install (a full encrypted install with LVM):
df -h
Filesystem Size Used Available Used% Mount on
/dev/mapper/rm--work--vg-root 23G 11G 12G 47% /
none 4,0K 0 4,0K 0% /sys/fs/cgroup
udev 7,7G 4,0K 7,7G 1% /dev
tmps 7,7G 74M 7,7G 1% /tmp
tmpfs 1,6G 1,6M 1,6G 1% /run
none 5,0M 0 5,0M 0% /run/lock
none 7,7G 764K 7,7G 1% /run/shm
none 100M 64K 100M 1% /run/user
tmpfs 4,0G 0 4,0G 0% /var/cache/apt/archives
/dev/sda1 228M 85M 132M 39% /boot
/dev/mapper/rm--work--vg-home 204G 189G 4,9G 98% /home
cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' 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>
/dev/mapper/aliot--work--vg-root / ext4 errors=remount-ro,noatime,discard 0 1
# /boot was on /dev/sdc1 during installation
UUID=c15f5e23-e892-4f00-8744-2805ae304cf9 /boot ext2 defaults 0 2
/dev/mapper/aliot--work--vg-home /home ext4 defaults,noatime,discard 0 2
/dev/mapper/aliot--work--vg-swap_1 none swap sw 0 0
#tmp to ram
#tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
tmps /tmp tmpfs defaults,suid,nodev,exec 0 0
#/var/log/ to ram
#tmpfs /var/log tmpfs defaults,nosuid,nodev,noatime,mode=0755,size=5% 0 0
#apt cache to ram
tmpfs /var/cache/apt/archives tmpfs defaults,size=4g 0 0
#cache to ram
tmpfs /home/rm/.cache tmpfs defaults,size=1g 0 0
sudo lvdisplay
--- Logical volume ---
LV Path /dev/aliot-work-vg/swap_1
LV Name swap_1
VG Name aliot-work-vg
LV UUID ym1lJD-aRxN-23NA-Wgs8-0YbP-ryIv-RWzY6v
LV Write Access read/write
LV Creation host, time aliot-work, 2013-06-24 14:29:45 +0200
LV Status available
# open 2
LV Size 7,86 GiB
Current LE 2013
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:1
--- Logical volume ---
LV Path /dev/aliot-work-vg/root
LV Name root
VG Name aliot-work-vg
LV UUID degnqJ-5KOJ-IW6t-FPJx-5xhy-DUTa-jaWVLY
LV Write Access read/write
LV Creation host, time aliot-work, 2013-06-24 14:31:07 +0200
LV Status available
# open 1
LV Size 23,24 GiB
Current LE 5949
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:2
--- Logical volume ---
LV Path /dev/aliot-work-vg/home
LV Name home
VG Name aliot-work-vg
LV UUID beExpf-NH3n-1CZL-BnLp-eAm3-jrpl-WTBu7U
LV Write Access read/write
LV Creation host, time aliot-work, 2013-06-24 14:31:17 +0200
LV Status available
# open 1
LV Size 207,13 GiB
Current LE 53025
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:3
Easiest thing to do, if you can some how plug in your new hard drive at the same time the old one is plugged in:
1) Boot into a liveCD or liveUSB of a linux distro (any distro!)
2) Identify which
/dev/sdX
each one is (your 256 is likely/dev/sdb
and the 512 will be/dev/sdX
where x can be b, c, d...) Check outgparted
and see what you see on the top right (sudo apt-get install gparted
if you don't have it installed and you booted into a debian/ubuntu based distro)3) Now that you know which is which (Make sure you do!) run the following command. For the purpose of this command I'll assume that your smaller SSD is /dev/sdb while the larger is /dev/sdc
4) This will take a while, a long while. Once it's done, open up gparted and you'll notice that the there's a 256 GB portion that should match your other 256 GB with 256 GB free at the end. Simply extend your main partition into the unallocated space at the end and you should be good to go.
I'm not sure that this will work properly with the encryption + LVM, but I don't see any glaring reasons why not.