Successful cloning of the hard disk before it fails

Post Reply
Pummel
Posts: 2
Joined: Sat Sep 03, 2011 1:49 pm

Successful cloning of the hard disk before it fails

Post by Pummel » Sat May 24, 2014 11:17 am

Hi all,

first of all thanks for the wealth of information in the forum and wiki, it was great and helped me a lot. So let me give some back by sharing my successful cloning of the Cloud Edition NAS to a new hard disk.

My 2TB version showed SMART errors so it was time to replace the harddisk (it was a good idea to set up the email service) BEFORE it failed for good. I bought a WD Red 2TB, removed the failing one from the NAS and connected both to my PC (USB connectors). Then, I went and booted my PC with clonezilla from a USB stick to make the clone. I tried a local disk to disk copy without changing any copy settings. /dev/sdc is the new drive, /dev/sdd the old one. The result was that the NAS booted with white light on, red light dull and after a few seconds red light bright. Bummer.

The partitions looked good but when double checking the GPT, I found the first problem:

Code: Select all

/sbin/gdisk /dev/sdc
showed me corrupt GPT

So backup the GPT of the failing drive

Code: Select all

/sbin/gdisk /dev/sdd
b (to save a backup)
/tmp/gpt.back (just a filename)
q (quit)
And then restored it to the new drive

Code: Select all

/sbin/gdisk /dev/sdc
r (restore)
l (load backup)
/tmp/gpt.back (filename of the backup)
w (write the new GPT)
Y (confirm)
Now, gdisk was happy with the GPT. I tried booting again but still the same problem.

From the information at nas-central, I thought that I should copy the 32 MB bootloader, so

Code: Select all

dd if=/dev/sdd of=/dev/sdc bs=2k count=16348
And voila, it boots and all data is retained!

Post Reply