Replace HDD by SSD? Anything to pay attention to?

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read how to get help
Post Reply
Centauri39
Level 4
Level 4
Posts: 291
Joined: Sun Mar 23, 2014 2:20 pm

Replace HDD by SSD? Anything to pay attention to?

Post by Centauri39 »

I've got a HP 250 G5 notebook with a 1TB HDD inside, which I want to replace with a 1TB SSD in order to make the notebook faster.

Since it is a multi boot system with Win10 and two Ubuntu 18.04 based distros (all of them are 64 bit), I think I'm probably going to do it by purchasing a HDD/SSD case with a USB 3.0 port and clone the entire HDD with the dd tool and then replace the HDD with the SSD.

Now the question is, can I use whatever case I can find, or is there anything to pay attention to, to make sure it is going to work flawlessly?

I guess I need a live stick and do

Code: Select all

sudo dd if=/dev/sda bs=4k of=/dev/sdb
Prior to this I probably should check the names of the drives using GParted on the live stick and change these names accordingly.

Am I right?

rene
Level 16
Level 16
Posts: 6294
Joined: Sun Mar 27, 2016 6:58 pm

Re: Replace HDD by SSD? Anything to pay attention to?

Post by rene »

No opinion on specific cases; most anything should work I guess. Ones with JMicron controllers seems to have been more often problematic when using Linux than others but generally you'd find out the brand of controller only after buying. Expectation: should work, use Google on the specific model you're about to buy for possible counter indications.

dd as such is going to be slow but bs=4k is going to turn it excruciatingly so. I generally use bs=64M to keep intermediate buffers everywhere filled at all times --- and no, it does not in fact matter for what ends ups being written to the device. Add in status=progress to have it be a bit more verbose.

Note that the slowness of dd vs. potential other cloning options will be caused by dd also transferring unused blocks from the file systems which is something more involved tools can avoid, but that you may not care deeply if the 1T HDD isn't hugely empty anyway. Certainly it's a nicely straightforward option.

A to checking "names" ... no, that would not be the idea. A cloned disk will end up with also cloned UUIDs which would be an issue if you'd then have both connected during normal operation but since you will not be, nothing other to do than the regular clone.

Centauri39
Level 4
Level 4
Posts: 291
Joined: Sun Mar 23, 2014 2:20 pm

Re: Replace HDD by SSD? Anything to pay attention to?

Post by Centauri39 »

If dd is too slow, what other tool would you recommend instead?

As for the "names", what I meant was sda, sdb, sdc, ... etc...

The copied UUID's shouldn't matter (hopefully!) since it is only a replacement of the drive, and the old HDD is not intended for further usage within the notebook.
In fact, the HDD will most likely be formatted in the end, anyway.
Maybe I can insert the HDD into the case and use it as an external USB drive, because otherwise the case would become useless after the replacement.

rene
Level 16
Level 16
Posts: 6294
Joined: Sun Mar 27, 2016 6:58 pm

Re: Replace HDD by SSD? Anything to pay attention to?

Post by rene »

dd isn't necessarily too slow; it's going to copy at full HDD read-speed, it's just that it'll as said also copy file system blocks that are not in fact in use. With 1T and, say, 100M/s HDD read-speed that makes for 1000000M / 100M/s = 10000s ~= 2u45m. At 50M/s average for your HDD 5u30m. In reality it's likely somewhere in between those.

If however as said there's not a huge amount of free space anyway that number also doesn't change much -- and it's always going to be long. Long vs. Very Long tends to not be as big of a difference as Short vs. Long. I.e., you'd be doing something else in the meantime anyway.

When a few years ago HDD -> SSD replacements were very common external cases tended to be supplied with (Windows) cloning software. Maybe still, not sure, neither sure said software would be able to skip unused blocks on ext4. Something like Acronis True Image for Windows probably does and for Linux there's Clonezilla and also the recently by a Linux Mint forum-user (AndyMH) developed Foxclone: https://foxclone.com/

As to names: no, you wouldn't be able to change names like "sda" and "sdb"; they are kernel-assigned and depend only on discovery order: if your SSD will be the only SATA device then it will be "sda" in the same manner as now your HDD is. If you'd install your HDD in the case you'd probably repartition and reformat it anyway, so in that case no issue either; only when you'd connect it as is would you want to change UUIDs on the HDD. This is easy to do once you have things set up.

Centauri39
Level 4
Level 4
Posts: 291
Joined: Sun Mar 23, 2014 2:20 pm

Re: Replace HDD by SSD? Anything to pay attention to?

Post by Centauri39 »

rene wrote:
Mon May 25, 2020 7:06 am
As to names: no, you wouldn't be able to change names like "sda" and "sdb"; they are kernel-assigned and depend only on discovery order: if your SSD will be the only SATA device then it will be "sda" in the same manner as now your HDD is.
When I talked about "changing names", what I meant is this:
I assume, GParted will usually call the drives sda and sdb and therefore I would use these ones for the dd command.
But if GParted would call the drives, for example, sdc and sdd, then of course, I wouldn't use sda and sdb for the dd command but sdc and sdd.

rene
Level 16
Level 16
Posts: 6294
Joined: Sun Mar 27, 2016 6:58 pm

Re: Replace HDD by SSD? Anything to pay attention to?

Post by rene »

Ah, okay, yes, fine.

hman2
Level 1
Level 1
Posts: 22
Joined: Fri Mar 28, 2014 1:28 pm

Re: Replace HDD by SSD? Anything to pay attention to?

Post by hman2 »

I upgraded my system (Fujitsu business minitower) by adding an Intel SSD. I wanted genuine Intel, because as a manufacturer of the chips I trusted them most. That was a couple of years ago, today I might say Sandisk, now part of Western Digital, is trustworthy, too. My SSD is in a standard 2.5 inch casing with SATA III interface. Try to select a size with single level cells (SLC). they have higher endurance. DO NOT TRY TO SAVE MONEY here. Rather make the SSD as small as possible to contain all your operating systems and their swap spaces, but no data. Using these guidlines I selected a 160 GByte Intel SSD paired with a Western Digital 3 TByte "data grave". Be sure to have at least 20% free space in all partitions (except for swap, of course) AFTER being filled. That is crucial! The less free space you have, the faster the media will wear out (and of course by frequent writing, like swap space or temp files).

I migrated two Windows (7 and 8.1) and Linux Mint in one go. Booting from a stick, I simply copied the entire partitions to the SSD with gparted. One Windows wanted to re-register, but that went through with no problems, the other didn't bother. Everything worked out.

With today's motherboards you might want to select an SSD in the M2 format. If you go SATA, make sure the SSD sits on the fastest ports (many chipsets have SATA III and SATA II in separated connectors. SATA III is a waste for hard drives, but SSD on SATA II do not play to full speed.

This method will give you a safe fallback, should anything go wrong or the SSD won't boot an OS properly, you always have the hard drive.

Monitor your SSD regulary using gmartcontrol, save its reporting and watch the media wear out indicator. SSD cells can only be rewritten about a hundred thousand times before they start failing. That sounds like only a few, but a good SSD will spread the wear evenly among the cells, so a good SSD should give you at least five years of useful life even with the swap space on it. The media wear out indicator starts at 100 and decreases with usage over the years. My recommendation is to not let it go under 25, which gives you more than 5 years. Also, give the wear level management a little help, and from time to time issue a 'sudo fstrim -v /' which will tell the SSD which blocks are currently not in use, and can be used as a reserve (for some reason at least Mint 18.3 won't do that automatically like Windows does).

Good luck

Post Reply

Return to “Hardware Support”