Hello, I currently have a Lenovo T480 with 240GB Toshiba 2242 M2 SSD and 2" WS Blue.
I will be replacing the Toshiba 240GB to a WD Blue 512GB. These are the existing partitions:
/dev/nvme0n1p1 OpenSUSE EFI
/dev/nvme0n1p2 Windows EFI
/dev/nvme0n1p3 MS Misc.
/dev/nvme0n1p4 MS C:
/dev/nvme0n1p5 MS Recovery environment
/dev/nvme0n1p6 OpenSUSE /
I am looking at gParted and OpenSUSE partitioner.
Partitioner returns an error “The partition … is already created on disk and cannot be moved”.
GParted only gives me the option to resize but not move.
I recommend downloading GParted Live (the one that is its own boot image, not the version you install in an OS).
Everything you do should then be easy, just be aware that if you change the order of your partitions, because of your current/legacy method of identifying your drives and drive partitions you’ll break your fstab. If you really do want to change the order of your partitions, you have several options but all would require manual work and nothing easy…
Modify to identify your disk and partitions by UID instead. Then manually edit your /etc/fstab.
Leave your partitions identified as they are now, but understand how your new order changes the mapping locations.
But,
Before all that I’d ask why you would even consider changing the partition order, when you are on an SSD instead of an HDD, I wouldn’t know of any advantage. On an HDD, you can take advantage of the rotational geometry to move more often used data to more accessible sectors, but on an SSD everything is flat and only emulated to look like an HDD. And, with wear leveling your data will end up all over your storage anyway.
So,
I’d recommend forgetting about relocating any partitions, only re-size if desired.
And FYI… Although not important here, you should know that a Western Digital Blue can still mean both an m.2 card and a 2.5" drive,.
I am intending to relocate the partitions simply because I wish to resize the windows partition. The partitions in the 2.5" drive will be untouched, but the M2 card will be swapped to a larger one.
The main problem is that in the current setup:
/dev/nvme0n1p1 OpenSUSE EFI
/dev/nvme0n1p2 Windows EFI
/dev/nvme0n1p3 MS Misc.
/dev/nvme0n1p4 MS C:
/dev/nvme0n1p5 MS Recovery environment
/dev/nvme0n1p6 OpenSUSE /
I cannot extend MS C: partition unless OpenSUSE root is pushed back within the M2 card. I’ve already eliminated MS Recovery environment, and now I have:
/dev/nvme0n1p1 OpenSUSE EFI
/dev/nvme0n1p2 Windows EFI
/dev/nvme0n1p3 MS Misc.
/dev/nvme0n1p4 MS C:
/dev/nvme0n1p5 Opensuse /
The only difference I wish to make from now and the upgrade is to Move the OpenSUSE / by ~200GB, and extend MS C: by 200GB and extend OpenSUSE / by ~50GB.
OK,
Then if you’re simply re-sizing partitions which could require a move but are not changing your partition order, then your procedure can be simple and easy.
Highly recommend downloading and booting to GParted Live for everything you want to do.
I will give GParted Live a go. I will first attempt the following:
While booted from OpenSUSE in Toshiba M2, clone the whole drive to WD Blue M2.
While still booted from OpenSUSE in Toshiba M2, use Partitioner and then GParted to push the OpenSUSE partition in WD Blue M2.
Mount the WD Blue M2 OpenSUSE root, then reconfigure its fstab to boot properly.
Physically swap out the drives and hopefully everything will be good to go.
In case something goes wrong, I also have a LEAP 15.1 live USB stick, and I will first try to use that and the partitioner if something goes wrong. If that doesn’t help, I will flash a GParted live USB stick and use that instead.
2.Upon opening gParted, it gave me an option to automatically move the GPT to the end of the new WD SSD. I Said yes.
3.While still booted from OpenSUSE in Toshiba M2, I used GParted to move and resize the OpenSUSE cloned partition within the new WD SSD.
//OpenSUSE Partitioner returns an error “The partition … is already created on disk and cannot be moved”.
4.I modified the WD_M2_OpenSUSE_Root/etc/fstab to use the correct UUID to mount its root.
//Even after cloning, moving and stretching the OpenSUSE root partition, the UUID was unchanged! This was a surprise to me.
5.I rebooted, and booted from the WD M2 SSD, everything works perfectly on OpenSUSE side.
6.I rebooted, and booted from the WD M2 SSD, everything works on the W10 side.
7.I opened up the laptop, swapped out the SSDs.
8.I booted from W10, and used “Create and format hard disk partitioners” in Control Panel to extend/enlarge the W10 C: drive.
I didn’t have to make gParted Live nor an OpenSUSE LEAP 15.1 Live drives to do the cloning, moving and upsizing to my pleasant surprise.
Congrats.
The danger of cloning a mounted drive which is actively being used (would be the case if it contains your OS and program files) is that *NIX filesystems don’t mandate locking files.
This means that for the duration that your cloning is copying bytes, the filesystem integrity cannot be assured.
Various cloning apps will take this into account and do something that will ensure integrity, but dd will not.
That said,
If your system is as quiet as possible while you’re cloning, there’s a reasonable chance that nothing critical will change during that time.
It might be helpful for instance to stop as many services as possible besides not run any app before your cloning.
If you’re cloning a data drive, then your risks are considerably less.
Just be sure to check out every application and your system before giving your new system a bill of health and wiping your old disk.
Based on my experience, I’ve actually never had cloning the drive using dd from source while booted from the source ssd/hdd. That said, I do not have any encryptions and my system is rather quiet (I don’t really have a good reference). Typically I extensively test the system for at least 24 hours before considering it stable.