There is a better, quicker way to do this which is to clone your entire drive onto a new drive.
You can do this with a tool like GParted, but there is also a command line tool that will get the job done as well. This tool is ddrescue. Now with ddrescue you will have to have your new disc partitioned (it will not partition for you). In this article I am going to show you how to get your dying Linux drive cloned onto a new drive.
Installation of ddrescue:
apt-get install ddrescue gparted
Paritioning your new drive:
After you installed the new drive reboot your server. Then do the following:
- Start GParted.
- Create a partition scheme on the new drive identical with the old drive.
- Save the new partition scheme and you are ready to clone.
Cloning the drive:
Let’s say your old drive was /dev/sda and your new drive is /dev/sdb. To make the clone you would issue the following command:
ddrescue -v /dev/sda /dev/sdb
Depending upon the size of your disk, this can take some time. You should be ready now to boot into that new drive.
Check the new disk for errors:
Do that with the following command:
e2fsck -fp /dev/sdb1

Download as PDF
40 queries in 0.214 seconds.
Recent Comments