Migrating into a new hard disk. How to

Dear all,
I would like to migrate into a new larger hard disk. As the data written into that disk, are important, I would like first to plan for the migration (which means first make all the necessary steps inside my brain clear). Of course before any migration I will do a full backup of that hard disk.

I would first explain how my system now is structured and then what I have

A. How my system is now
-One hard disk with one /home partition. Inside that home partition there is a folder called
/home/username/Documents/DocumentsInNetwork , which is a sshfs mount folder.

B. What I want to do.

  1. Clone the hard disk into a larger one (specifically from 500GB to 2TB). In the new hard disk I want the /root folder to be like 100Gb(same size as now) and all the rest the home directory (plus some swap).
    2.Then I would like to rsync/“download” that network share inside the /home/username/Documents/DocumentsInNetwork. That way I will start to access all that files locally.
    3.Make a script that will use now the remote sshfs folder for backing data with rsync (actually making local copies)

Could you please help me by reading B and commenting if there is any logical-misconception in the steps described above?
Could you also please give me the commands for doing the 1. and 2. (3. can also come later).

I would like to thank you in advance for your help

B.R
Alex

There are several ways to do this but here is what I would do …

  1. Add new hard drive to existing system, internal or external as it does not matter. If you have modified the fstab file to use only /dev/sdaX names or forced Grub to use the same and not use disk/by-id, the new disk must come up after the old hard disk.
  2. Use YaST / System / Partitioner to create on the new disk, the exact partitions you want to use.
  3. Mount the the new /home partition as /new_home and use the following command to copy /home from old small drive to new larger disk drive:
cp -R -u -p /source_partition /destination_partition
  1. Shut down PC and install new hard drive in place of old and remove old hard drive.
  2. Do clean install of openSUSE and a Custom Partition Setup, mount all partitions as you want, format all but do not format /home
  3. If disk has no Windows, suggest you install Grub into the MBR and that is it.

You still have your old hard drive to go back to if you need to.

Thank You,

  1. Why I need to make a clean install of opensuse? That looks to me something that at the end will make things not working. Why not just from the hard disk clone the / partition to the new hard disk and then the same for the /home directory (to its dedicated partition)?

YOu also forgot to give me your advice of how to get the files of my remote server to my hard disk and the convert those to backup partition.

Regards
Alex

If you just want to clone a hard drive, that is one thing, but to move to new partition sizes and still have a bootable hard drive is another. Keeping /home intact, but doing a by file copy allows it to be larger. Doing a clean install of openSUSE allows the boot drive to get larger, while doing the required things to keep it booting. Its a good way for someone that might not know all of the ins and outs of replacing your main hard drive with a larger one. Its early morning here in Austin and I have little time to explain things. Let me do a better job tonight when I get home from work.

Thank You,

Hm…
It seems there is something here I miss. I thought that there is some sort of “clone” command when ones want to go from a smaller partition to a larger new one. So that means that I could to do clone my /home directory to a new partition that is larger.

I do not really see the reason to have larger /boot partition, but probably this can be solved by making a larger partition for the /boot.

Why do you also think that I should reinstall opensuse? Do you mean clean install, update, repair (I have seen all these options in the past). Why just having the / partition as it is and the /home as it is (let’s assume here that I do the raw copy you have gave before). What makes you believe that this will not work.

Regards
Alex

Do you have a boot partition. That is not normal, but it is not wrong either. perhaps it would help if you showed us the partitions

sudo fdisk -l
in a console will get the info (note that is a lower case L not a one)

a clone is an exact binary copy no different in size.

On 2012-04-26 07:36, alaios wrote:
> Why do you also think that I should reinstall opensuse? Do you mean
> clean install, update, repair (I have seen all these options in the
> past).

It is one procedure. You install a minimal system, check it boots, then
copy over everything from the old disk, except /boot/grub/* (mind kernel
versions) and fstab. Another is install a minimal system, then copy the old
disk to new partitions. But you have to reinstall grub on the destination copy.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)