[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Advice sought re HDD --> SSD migration



On Sat, Jun 04, 2016 at 11:11:37AM +0000, Mark Fletcher wrote:
> I've got a feeling though that the main disk is going to be a bit more of a
> challenge, and that is what I want advice about. I'm thinking I should boot
> from a live image and effect the copy there so that the disk is not mounted
> and in active use. Is that along the right lines or is there a better way?

I would suggest doing that, yes.

> The replacement SSD is 960GB where the original hard disk is 500GB. Would
> you recommend a dd if=/dev/sda of=/dev/sdd (or whatever it turns out to
> be), or a cp -r command like I used for the /opt disk, or some other way to
> execute the migration?

I'd go with rsync (-va), run repeatedly until it makes no further changes.

I think doing it at the file level - from a live environment - means the new
(larger) filesystem can make different decisions as to where the files are
located on the underlying device (and the underlying device, doing its own
wear levelling, can do too).

If you do a dd, you're "forcing" all the files to be allocated into a subset
of the new drive capacity, which might not be the most optimal spread.

This is all muddied somewhat by the SSD layer of indirection, which might
make the above completely moot.

> One complication is when I originally partitioned the 500GB disk I may have
> overdone it a bit. I've got separate partitions for /boot, /usr, /home,
> /tmp, /var, swap space and the root partition. I now consider that I
> overdid that and would ideally like to collapse /usr, /tmp and /var into
> the (correpondingly bigger) root partition, ie not have separate partitions
> for them and end up with root, /boot and /home (BIOS is too old for UEFI so
> using MBR booting so /boot partition makes sense).

Perfect. Mount the separate filesystems in the right place for your live
environment (say root at /src, usr at /src/usr etc) and the rsync will
consolidate them for you.

The only other two things I would suggest are

 * if you don't have a regular backup regime, make a backup. Get a proper
   backup routine once you've finished.
 * Use LVM on the destination device.


-- 
Jonathan Dowland
Please do not CC me, I am subscribed to the list.


Reply to: