You are not logged in.

#1 2014-09-14 15:43:42

saz
Member
From: Lisbon
Registered: 2008-04-19
Posts: 115

Moving from a HDD to a (smaller) SSD

Hi,

Currently have Arch installed in a 500GB HDD. I have shrunk the partitions to have around 300GB unallocated and I want to move to a 256GB SSD.

I have dd'ed the whole drive (if=/dev/sda) into an (compressed) .img file, but the image is way over the 200GB I have allocated, what tells me that it's probably going over the unallocated space also.

Can I just dd that image into the SSD? What other maintenance will I have to do? (edit the partition table? re-align the SSD?)

Thanks

Offline

#2 2014-09-14 15:52:47

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,837
Website

Re: Moving from a HDD to a (smaller) SSD

Maybe I'm mising something here but isn't 300GiB > 256GiB?
Surely it won't fit?
Presuming I'm understanding it wrong, I have dd'd my install from a 64GiB USB stick to a 110GiB internal SSD directly (from the live environment).
The UUID's remain the same so the fstab is unaltered; the partition table is copied along with the filesystem that lies on top.
I used gparted to increase the size of the root partition afterwards to fill up the remaining space (tune2fs could also be used for this).
Hope this helps.
smile


Destruam et ædificabo

Offline

#3 2014-09-14 16:46:48

saz
Member
From: Lisbon
Registered: 2008-04-19
Posts: 115

Re: Moving from a HDD to a (smaller) SSD

300GB *unallocated*, that is, I'm using around 200GB (which is less than the SSD's 256GB)

That's good news, so in reality the only thing I have to do afterwards is resize the root partition to fill the whole 256GB.

I'm still not sure though if I can just dd though, because as I said, I think dd has ran over the unallocated space also, so the image is greater than the 256GB...

Since it's only unallocated space, can I just dd everything to the SSD and when it reaches the limit dd will fail but I'll still be able to boot?

Offline

#4 2014-09-14 17:00:47

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,621
Website

Re: Moving from a HDD to a (smaller) SSD

Why not just partition the ssd and rsync the file system over?  To me, you're making this way too difficult.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Online

#5 2014-09-14 17:42:24

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,837
Website

Re: Moving from a HDD to a (smaller) SSD

I agree with @graysky, but FWIW dd will not even execute unless there is enough space on $target

Last edited by Head_on_a_Stick (2014-09-14 17:42:57)


Destruam et ædificabo

Offline

#6 2014-09-14 18:19:20

saz
Member
From: Lisbon
Registered: 2008-04-19
Posts: 115

Re: Moving from a HDD to a (smaller) SSD

It's a laptop, I only have one SATA connection. I can't connect both drives at the same time, so I have to make an image, store it in an external drive and then dd it to the SSD

Offline

#7 2014-09-14 18:22:40

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: Moving from a HDD to a (smaller) SSD

saz wrote:

It's a laptop, I only have one SATA connection. I can't connect both drives at the same time, so I have to make an image, store it in an external drive and then dd it to the SSD

rsync it to the external drive, then rsync it back.

Offline

#8 2014-09-15 12:17:41

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Moving from a HDD to a (smaller) SSD

Most probably you shouldn't use dd, you want to have the partitions on the SSD properly aligned, I doubt the partitions you have now on your current disk have the best alignment for the SSD.

On another note, dd will happily write data until it runs out of space, dd is also known as disk destroyer for this reason, it's very easy to mess things up wink


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#9 2014-09-15 22:03:54

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,523

Re: Moving from a HDD to a (smaller) SSD

I would propose the use of fsarchiver. It may split onto DVD size as well and then reconstruct the FS to destination.
DD can be also used, but rather slow tranfer (6~7 Mib/sec), then piped on zip process which allows to split the resulting image.

Last edited by TheSaint (2014-09-15 22:07:14)


do it good first, it will be faster than do it twice the saint wink

Offline

Board footer

Powered by FluxBB