My hard disk is showing all the signs of a failure in the near future. I want to replace it while it is still working, so I’ve bought a new hard drive and would like to move the existing system to the new drive before the old drive fails. For the time being, I’ll install the new drive as a second hard drive so that I can transfer the system to it. Once that’s done, I’ll remove the old drive and replace it with the new one.
The current drive is 1 TB and formatted in ext4 with a root partition, a swap partition, and an extended partition with the home partition, an opt partition, and a partition for critical data. The new drive is 2 TB. I have several questions:
What is the best way to partition the bigger hard disk?
Shall I continue to use ext4 or is another file system better?
How do I copy the old system to the new hard disk so that it will boot properly? What is the best tool to use?
I know that there’s a lot of wisdom on this forum, and I’d really appreciate any insights.
That looks like it should work. If I understand it correctly, the new partition sizes will be proportionate to the old ones - since the disk is twice as big, they will be about twice as big as the original ones but occupy the same proportion of the disk space as the old ones. Is that right? Presumably if I want to change that, I’d have to go back and use GParted or something like that to resize and move things around. Also, it looks like I’d have to use Ext4 since that is what the original disk is in. Would there be any advantage to using something new like BTFRS as a single user, and can CLonezilla do that?
No advantage at this point to change to BTRFS, and in fact might be some disadvantages, especially if you do not understand the file system. In fact, I am continuing to use ext4 for better compatibility with tools, especially for backing up and restoring.
You can create the disk structure ahead of time as you see fit, but best to create it in the proper order so the sda1, etc., remain the same. However, if they do change, let me know, because there is a fairly simple work-around to direct the Clonezilla restore to the correct locations.
As goglathorp mentions, keeping the sizes of the system and swap about the same, and letting the additional space go mostly to Data, is probably the best approach.
What I recommend doing, though, is launching the Yast Partitioner before backing up and changing your mount options to Mount by Label. If you have not done so, you will have to provide a label for the partition when you do that, make sure they are unique labels. Reboot the machine at least once, probably twice, to make certain all is running as it should.
This will help you avoid the problems of changing UUIDs and so forth. It will also make it much simpler for me to help solve any boot problems you might (probably won’t, but it is best to be fore-armed) run into.
When you create (use GParted live disk, best method) the partitions on the new drive, you can add the same labels to the appropriate partitions.
Then, restore the Clonezilla backup.
As I said, if the newly created partitions do not have the sda(numbers) in the proper places, let me know before you do the restore and I will tell you how to deal with that.
Everything worked out well. I did create the partitions up front and sized them to take up the whole disk. When I ran Clonezilla, I used the disk to disk clone option and it recreated the partitions using the sizes on the old disk and leaving half the new disk as unallocated space. I used GParted to move and resize the partitions to take up the whole disk using the sizes I had used in the upfront partioning. It worked well – the computer boots and everything seems to be where it should be. My only question is for future reference - is there something I could have done in Clonezilla to have it keep the partitioning I did up front and avoid that last GParted step?
My only question is for future reference - is there something I could have done in Clonezilla to have it keep the partitioning I did up front and avoid that last GParted step?
Actually, I should have explained that in more detail. I do not know – without firing it up and checking the options – if there is another way, but in my case, I just restored each partition one-by-one from the full-disk backup whenever I made a similar move. I have never actually used the disk clone option, and when doing a straight backup and restore normally used restore disk from image. Otherwise, with different partitioning, I would use restore partitions from image.
I like having that backup hanging around on an external drive in case I run into some problem later on due to the backup/restore process. (Never have, myself, but …)
Of course, after restoring, I update and make an additional full disk backup. Yah jest never knows!