Add new SSD to my laptop

Hello,

I have space issues on my laptop and decided to get a new 4TB SSD. What is the best way to transfer my existing installation to the new SSD? This is my current setup:

As you can see, I have an encrypted LUKS partition with BTRFS inside it.

Is it possible to boot from a USB stick and copy the entire 1TB disk that I have, to the new 4TB one? How do I go about extending the LUKS/BTRFS content? I suppose I must first extend LUKS and then do the same for BTRFS within it?

Has anyone ever done this and what was your experience? I need to formulate a plan before doing anything. Fortunately my important data is already backed up, but I would like to avoid having to reinstall everything…

Thanks!

P.S. On that note, I wouldn’t mind extending the root partitions, as I find they are just big enough to hold 3-4 images. If I pin 2 images I immediately run into space issues updating. But this is just an extra request. It’s a nice to have, but not necessary…

Hi! I cloned my 250 GB SSD to a 2 TB one recently, but mine wasn’t encrypted, however. I created a bootable Fedora Workstation USB to live boot on, then used Balena Etcher to clone the source drive to the destination drive.

This will clone the entire installation as well as the UUID of the drive, which is the important part to end up with a seamless experience.

Once done, you will end up with some free space. I used Gparted and upon launch, it asked me if I wanted to expand the drive. If it doesn’t, you can choose your new drive in the dropdown at the top right, and resize the space by right clicking the partition, then Resize, and slide to fill the space.

Afterwards, shut down the PC, remove the old drive, and it should boot on the new one. If you wish to use the 2 drives, make sure to format the old one once you confirm the new one works.

If you have any questions, hit me up.
Cheers!

  1. I used a Fedora USB stick to install Balena Etcher and cloned the disk.
  2. Afterward I installed gparted and answered yes to extending the partition table.

At this point I was able to remove my old SSD and boot off the new one. Obviously the extra 3TB was free at the end, but since now had the old SSD as an extra backup, I was bold and went ahead to try and resize the boot/efi partitions as well:

  1. I booted off the stick again used gparted to move the LUKS partition to the right by 2GB
  2. I moved the boot partition to the right by 1GB and extended it by 1GB
  3. I extended the efi partition by 1GB
  4. I extended the LUKS partition as well to use the rest of the disk till the end

Rebooted and all was working! However, BTRFS was still not seeing the extra space, so after a quick search I ran (on the live system):

root@host /v/h/user# btrfs filesystem resize max /sysroot
Resize device id 1 (/dev/mapper/luks-0f45e4b2-02d1-4a30-9462-a67ed1db53bd) from 952.27GiB to max
ERROR: unable to resize '/sysroot': Read-only file system

root@host /v/h/user [1]# btrfs filesystem resize max /var/home
Resize device id 1 (/dev/mapper/luks-0f45e4b2-02d1-4a30-9462-a67ed1db53bd) from 952.27GiB to max

So, using /sysroot did not work, but using /var/home worked fine and BTRFS immediately saw the free space:

/v/h/user# df -h .
Filesystem                                             Size  Used Avail Use% Mounted on
/dev/mapper/luks-0f45e4b2-02d1-4a30-9462-a67ed1db53bd  3.7T  363G  3.3T  10% /var/home

Finally I am able to use the free space and also have some extra room for pinning older releases!

I can’t wait for an update to arrive. I would like to see an update installed in the efi/boot partitions and everything working fine.

So far so good though… Thank you @Matty_pixels !

2 Likes

Very happy it worked for you! Thank you for documenting your experience!

Curious how long this took you to clone 256GB with Balena Etcher? (Wasn’t aware it had a clone feature)

I am cloning using a 128GB drive in with the clonezilla ISO booted in a VM, and it says it’ll take about 3 hours (it’s absolutely slow af).

I chose expert, disable any NTFS checks, use the source partition table, skip fsck, no resizing - seemed about as simple as possible. Not sure if there’s something about this process I set up in clonezilla, or if the VM layer adds a ton of overhead. I did notice it required the drives to be added as USB host devices instead of directly as disks (it’s a couple NVMe drives in external cases atm)

The only reason I reached for Clonezilla is both pv (my usual) and dd would throw an error around 1.4GB transferred, saying the device was full, when the source is 128GB and target 1TB, so … obs something was fishy there.

Edit: Just wanted to mention I’m trying to clone bluefin-lts, which uses xfs rather than btrfs, since it’s CentOS 10-Stream.

I really don’t recall, but it was definitely faster than that.

I have used Clonezilla in the past to save pre-installed Windows in previous laptops (I format them completely and install Linux, but restore their licensed OEM Windows for resale before I upgrade). I suspect the reason for the delay is that it compresses the image to save space.

In my case I was copying disk-to-disk. Are you writing to an image that you intend to use for restoring later?

No, I was going to do it disk-to-disk, but it was too slow - I just cancelled the process and installed a new copy.

You never have to worry about windows licensing again if you visit: https://massgrave.dev