I have a 2 TB SSD as my main drive in the laptop, and I want to clone it to a 4 TB SSD. The reason is an enormous growth of my music collection due to more and larger hi-rez files, such that one of my partitions needs to grow considerably.
My current SSD is GPT partitioned, EFI booted. It has a number of ext4 partitions for two Linux operating systems on it (four partitions, holding separate root and home each), plus a separate swap partition, plus an EFI boot partition, plus an ext4 partition to hold my VirtualBox virtual machines, plus an NTFS partition serving as a software store for both Windows and Linux, plus an ext4 partition for the music. This is the gdisk output for my current SSD:
Code: Select all
sudo gdisk /dev/sda [sudo] Passwort für myself: GPT fdisk (gdisk) version 1.0.3 Partition table scan: MBR: protective BSD: not present APM: not present GPT: present Found valid GPT with protective MBR; using GPT. Command (? for help): p Disk /dev/sda: 4000797360 sectors, 1.9 TiB Model: Samsung SSD 850 Sector size (logical/physical): 512/512 bytes Disk identifier (GUID): xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Partition table holds up to 128 entries Main partition table begins at sector 2 and ends at sector 33 First usable sector is 34, last usable sector is 4000797326 Partitions will be aligned on 2048-sector boundaries Total free space is 2669 sectors (1.3 MiB) Number Start (sector) End (sector) Size Code Name 1 2048 2099199 1024.0 MiB EF00 EFI System Partition 2 2099200 203425791 96.0 GiB 0700 Mint Root 3 203425792 304089087 48.0 GiB 0700 Mint Home 4 304089088 505415679 96.0 GiB 0700 Tumbleweed Root 5 505415680 606078975 48.0 GiB 0700 Tumbleweed Home 6 606078976 840959999 112.0 GiB 0700 Virtual Machines 7 840960000 908068863 32.0 GiB 0700 Exchange 8 908068864 3961450495 1.4 TiB 0700 Common Data 9 3961450496 4000796671 18.8 GiB 8200 Linux Swap
Code: Select all
sudo blkid /dev/sda1: UUID="4912-D9DE" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" /dev/sda2: LABEL="Mint Root" UUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" TYPE="ext4" PARTLABEL="Mint Root" PARTUUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" /dev/sda3: LABEL="Mint Home" UUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" TYPE="ext4" PARTLABEL="Mint Home" PARTUUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" /dev/sda4: LABEL="Tumbleweed Root" UUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" TYPE="ext4" PARTLABEL="Tumbleweed Root" PARTUUID="7xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" /dev/sda5: LABEL="Tumbleweed Home" UUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" TYPE="ext4" PARTLABEL="Tumbleweed Home" PARTUUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" /dev/sda6: LABEL="Virtual Machines" UUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" TYPE="ext4" PARTLABEL="Virtual Machines" PARTUUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" /dev/sda7: LABEL="Exchange" UUID="xxxxxxxxxxxxxxxx" TYPE="ntfs" PARTLABEL="Exchange" PARTUUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" /dev/sda8: LABEL="Common Data" UUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" TYPE="ext4" PARTLABEL="Common Data" PARTUUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" /dev/sda9: UUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" TYPE="swap" PARTLABEL="Linux Swap" PARTUUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
My goal is: Clone this 2 TB SSD to a new 4 TB SSD, leaving all partitions the same size except for the one "Common Data" (/dev/sda8) partition, which should grow to encompass the additional 2 TB on the new SSD (i.e. push the swap partition further out accordingly). All identifiers (UUIDs) must remain identical, so that (a) both Linux systems, (b) a Windows 8.1 virtual machine, and (c) a Windows 8.1 physical machine residing on an external hard disk continue to function flawlessly, in particular being able to mount all partitions on the new SSD as they do now on the old SSD.
What is the best practice to achieve this?
(A) I am not experienced with Clonezilla (yet). In particular I wouldn't know whether Clonezilla is able to achieve the desired enlargement of the one music partition (/dev/sda8) on the fly. Use it for my purpose?
(B) Although I have Acronis True Image Home 2018 running from my physical Windows 8.1 machine and use it regularly to backup things, I do not at all trust this black box enough yet for my current purpose.
(C) I would like to use transparent tools from the terminal to do the job in several steps. I can imagine to do something like the following from a live system (since one doesn't want the original and the target SSDs to be mounted):
(i) Use gdisk to set up the GPT partitioning of the new SSD to my needs. Ordering and sizes of these new partitions are thus achieved as I want them.
(ii) How do I assure that all identifiers needed by my Linux AND Windows operating system get cloned properly? What identifiers do exist, anyway? From the above gdisk output, I see an overall disk identifier (GUID), and per partition I see a partition label (PARTLABEL) and partition UUID (PARTUUID), plus a filesystem label (LABEL) and filesystem UUID (UUID). For the NTFS partition, the filesystem UUID has a different structure as compared to the ext4's. What other identifiers do I have, e.g. I read about s.th. like a Windows serial number. Again, how to set ALL identifiers?
(iii) I suppose I can then clone the EFI and the Linux partitions via Clonezilla, one by one. Or maybe use rsync to "copy" the home partitions and the ext4 partition holding the virtual machines ("Virtual Machines", /dev/sda6).
(iv) What about the NTFS partition ("Exchange", /dev/sda7)? I guess it might be best to copy its contents under Windows, switching a file read/write check on. But maybe I can also clone it via Clonezilla.
(v) Finally, I am concerned about my music partition, the "Common Data" (/dev/sda8). My point of concern is: Is there something like a reserved size of the directory? By this I mean: When formatting a partition to a certain type (ext4, or NTFS), e.g. via gparted, then gparted thereafter reports that x MiB's of this partition are in use. What is that x MiB's good for? Is it a directory size, and would it have to differ for the different sizes of my music partitions on the old SSD (1.4 TiB) as compared to the targeted 3.4 TiB on my new SSD?
(vi) Thus, how to clone my music partition? Format it to ext4 (e.g. via gparted) as the first step, give it the proper identifiers, then simply use cp or rsync or a graphical filemanager to copy the files as the second step? I would like to check data integrity in the end, using checksums (e.g. Krusader under Tumbleweed).
(D) I can also think of using a simple "dd" to copy partitions which don't change size, or use "copy" and "paste" within gparted. I think the latter turns to dd or similar to do the job.
Please, if you kept reading up to this point, could you help me by recommending a best practice step by step, and pointing out what to take care of in particular? Thanks a lot in advance.