Cloning an ssd to larger disk


Sure this answer is somewhere, but can’t seem to find it, and in the doco’s, it doesn’t state it either…

Am cloning a 500GB SSD to a 1TB SSD - what happens to the partition sizes, when multiple partitions exist - OS/Data/SWAP etc?

  • Do they remain the same?
  • Do they expand to fill the space?
  • Is the resultant 1TB drive then restricted to 500GB?

I would probably prefer that it clones as existing, and I can then resize a preferred, but…



(Also posted in Clonezilla forums - I think.,)

@hornetster is it really worth it (time and ssd write wise)? I find it quicker to install and transfer the stuff I want from the old device.

Copying the data you want to have on the new SSD is the preferred procedure. I considered cloning a SSD, but eventually found this to be a bad idea: Upgrading the Hardware - #7 by karlmistelberger

Cloning in the true sense results in exactly what you had on the original. So done, one can easily expand the size of the last partition, and/or add one or more partitions using the resulting freespace, subject to the limitations of the partition table type if using MBR/legacy partitioning. More complicated is cloning original partitions individually in a manner that allows expanding or not their individual sizes. Expanding an EXTx partition is a relatively simple process when there is freespace at its tail end. The relative ease of such changes depends on the power of the tool(s) used. The only tool I ever use to partition can be had here. I use it also for cloning, but not quite exclusively, depending on what I’m cloning to and/or from, and for what purpose.

Tipically, cloning drives is the best way to migrate a configured production system. As far as the target drive is bigger than the source one, it´s ok. you can extend-trim partitions later with partitioner.
That said, in this exact moment i am facing a hard situation. I was doing exactly what you asked, i got my origin 500Gb mechanical drive, my transit 1Tb external drive and my nvme 1Tb target drive. i cloned the source with filezilla, the old way (manually), I did everything as i did the last 30 years… And now, i have an external drive with my cloned system booting ok in my new computer, while the nmve inside that computer, that has been cloned too with no errors DOES NOT boot. It gets stuck in the dracut prompt…

When you move a system from a “mechanical drive” to an NVMe drive its initrd was build for a “mechanical drive” and will most likely miss the nvme kernle driver.

# lsinitrd | grep nvm
drwxr-xr-x   3 root     root            0 Apr 25 18:01 usr/lib/modules/6.3.1-2-default/kernel/drivers/nvme
drwxr-xr-x   2 root     root            0 Apr 25 18:01 usr/lib/modules/6.3.1-2-default/kernel/drivers/nvme/host
-rw-r--r--   1 root     root       113282 Apr 25 18:01 usr/lib/modules/6.3.1-2-default/kernel/drivers/nvme/host/nvme-core.ko.zst
-rw-r--r--   1 root     root        42497 Apr 25 18:01 usr/lib/modules/6.3.1-2-default/kernel/drivers/nvme/host/nvme.ko.zst

The copy on the external drive (USB? eSATA?) will boot because for starting from USB/eSATA there is no need for the nvme kernle driver.

1 Like

That make sense, i am also experiencing some issues with the file system btw, i guess i tried to jump to many architectures at once lol. I am actually going to do a fresh install, wich means i have to migrate mi server manually (100 services, published).
You know that feeling

You should be able to specially configure an initrd on the original system to include NVME support, then transfer it to the clone and boot successfully. You may need an extra boot parameter rd.hostonly=0 to succeed, as explained here.

It may be easier to boot the installed clone via USB, then regenerate initrd.

… in many situations cloning is a bad idea. I upgraded from a 512GB 950 PRO to a 2TB 970 EVO and tailored the new EVO partitioning exactly to my needs: Upgrading the Hardware - #7 by karlmistelberger