Home Creators Posts Import Register Favorites Logout

Content

This is a postmortem of how I almost broke my HDD while trying to backup my old HD data.This is going to be almost a full text post, mostly for myself.

So feel free to ignore this post if you want.

There are short notes at the end that might be easier to read. Just skip to after the image.

Preface

I've been living with 50 GB of free space for almost a year now. Having constantly juggle what to delete so I can continue to using this PC.

So I decided to buy a new HD a week ago and it arrived this Friday.

Now, my PC is already full with HDs, to the point where there is no viable space inside the case to put a new one.

So my plan was to copy the data from the old HD into the new one and replace it. Giving my old HD to someone else later.

My PC has 4 HD's currently, one 120 SSD for windows, and 3 other HDs that are full.I'm going to attempt to copy the data from an old 2TB drive to a new 8TB drive.

The big reason for that is that my PC case has no more physical space to plug in another HD.My last one is already tied with string vertically in the case panel. The case itself only has 2 proper houses for HD, which are already in use. With the SSD bolted into the case with screws.

It begins

7:00 pm, Friday

I removed one of the drives and added the new HD to the PC. And booted a live usb with xubuntu to copy the data.

I decided to use 'dd' command to copy the full hd and all its partition because I didn't know if the reserved windows partition was important or not.

So I used:

sudo dd if=/dev/sda of=/dev/sdd bs=1M status=progress

And the copying started

9:00pm, Friday

It ended faster than expected, but the command only reported 760 GB of data copied.

I found it strange, but accessing the drive, the files seemed to be there and it showed the proper amount in the file system. Big mistake.

The next step was to size the partition so that the 2TB MBR/GPT displayed the full 8 TB.

I tried to use Gparted to resize and it got stuck. It didn't work, breaking the partition in the process.

So I went to copy the data again.

11:00pm, Friday

Copied the files, again stopped at 700~ Gb but displayed fine in filesystem.

Booted windows and resized HD from there. Seemed to work.

But then I realized quite a few files were missing... important ones.

So I formatted the drive again, and went back to linux.

I decided I would do the 'safe' thing and copy the files manually with thunar (linux file explorer).

A few folders at a time, only the important data for now.

01:00am, Saturday

Transfer got stuck in some file. Tried to stop and the HD stopped working. Couldn't even access the HD anymore.

Tried to unmount the HD and couldn't. HD is busy even tho nothing seemed to be using it.

At this point I kinda panicked and tried to restart linux. When the restart itself got stuck I panicked again and did a hard reset by holding the power button.

Booted the live usb again and now the drive wont even mount anymore.

"Can't write the lock file" and a couple more errors in the same vein.

And that's when things started to get strange.

Even Gparted wouldn't work anymore.

If I used Gparted after booting, it would list the drives. But if I closed Gparted and tried to open it again it would get stuck on this drive and never complete.

On a new boot, I could use ntfsfix on the new drive and it would display "No problems"

But if I tried to mount it would give the lock file error, and now ntfsfix would say the volume is corrupt and to try to use chkdsk. Makes no sense.

No lock at /var/lock- as far as I looked.

Tried format drive on windows.... Same problem, cant mount on live usb anymore.(I realize now that I should had excluded the volume and repartition again on windows)

Tried changing sata port.... Same problem

So maybe the USB live file bugged for that specific lock file.

So I thought I might have broken the HD somehow.

2:00 am, Saturday

I decided to copy the files again, and learned how to correct dd command.

dd if=/dev/sda of=/dev/sdd bs=128K status=progress conv=noerror,sync

This makes it continue even if errors occurs in the copy.

Turns out errors happened 3 times, at 700 GB, 1.3 TB and 1.6TB.

6:30 am, Saturday

The copy finished and the command got stuck.

Almost panicked again, but this time I research a bit and found it it had something to do with flush cache and queueing dirty operations.

Eventually found how to see the remaining data with

greep -e Dirty: /proc/meminfo

It listed 139 and however many zeroes. And it seemed to go at 1 per minute.

9:00 am, Saturday

Command finished and things seemed to work. Sleep.

9:00 pm, Saturday

Files seems to be there but...

Tried windows and HD is extremely broken. It lists files after getting stuck for a few seconds.

Tried to open a program and it completely died. After a while windows OS drive displayed 100% usage and windows also broke. Hard reset.

So I thought I might have broken the HD somehow.

And I gave up. I was ready to go back to the old drive and forget about this already.

But I plugged in the old HD and added the broken drive with an extra sata cable.

Deleted the volume from windows, and create a new partition.

And it seems the new HD itself is working fine.

I don't know what happen, but copying the full drive with the GPT table seems to have broke a lot of things.

Anyways, I thing I'm going to stay safe and use this drive as an extra space and stop trying to backup the old drive.

The only problem is that now I need to find some way to fit the HD inside the case.

Here's how I'm now:

The old drive was tied at the bottom.

While the new drive is just above the cables for now.

The power cables I have left are extremely short and there is no way to move them around much.

Learnings

I think what broke things were those broken sections, or how exactly dd copied them over.

Also, the sync command might have something to do with it. It seems to add zero padding to things so it makes the drive compatible of DVDs or something. I don't really understand much.

I could try again using 'dd' to copy only the files partition, or even try to use gparted for that.

But with those broken sections and what I just went through I don't think I trust anything anymore.

I think I'll keep it safe and try to figure out a way to bolt this new HD inside the case.

Update

Here is what I ended up with:

The only place the available power cable could reach without having to buy an extensor.

The box that the HD is blocking is not the power source, but the housing of the other two HDs.I just put this HD through the hole in the first image. The only place the single free cable could reach.

The HD is just sitting that, with some spongy tack tape that I had around.

It is very loosely being held to the box just to help with vibrations without trying to stop them completely. And I put a few at the bottom to keep it at this angle and prevent it to fall over. Keeping it completely horizontal was blocking too much of the fans, so it is a bit angled.

As I don't play intensive games and my PC, max temps never cross 70 degrees so I'm not too concerned about the termal profile of this computer. What I mean it, I have a 1070, but still to this day, always play games at almost minimum settings and sometimes lower resolution so the temps are low. I've got some trauma about temps with two old computers that had broken GPUs that would overheat to 100 degres in a few seconds after entering a heavy game (I remember it was so bad it would overheat if I watched an HD youtube video in fullsreen that was longer that 40 minutes). So now I never play games at full graphics anymore.

----------------------------------------------------------------------------------------------------

Here are the short notes I wrote on mobile at the time. Might be easier to read.

Short version notes

Copy 2tb drive to new 8tb.

7pm

dd if=/dev/sda of=/dev/sdd bs=1M status=progress

760GB done, no error showed

bugged when resize in gparted

9pm

Again 760 then resized on windows

Noticed missing files

11pm

Format and tried manual copy with thunar

2h later, some file got stuck. Driver busy and not responding

Canceled kinda work but soon got stuck and again and destination drive won't respond anymore

1am

Can't unmount

Panic and tried reboot... Got stuck... Panic and hard reset

Now driver can't mount.... Failed to write lock file

Even gparted bugged.

Ntfsfix doesn't show errors.... Try to mount and fails.... Ntfsfix shows failed to write lock , volume corrupt

Gparted shows drives first, but next time it won't anymore due to stuck on this drive

Tried format on windows.... Same problem

Tried changing sata port.... Same problem

Maybe USB file bugged

No lock at /var/lock- files as far as I looked

2am

Finally used the correct dd

dd if=/dev/sda of=/dev/sdd bs=128K status=progress conv=noerror,sync

Got errors 3 times, 760, 1.3 and 1.6

Finished copy but stuck command

6am 30m

Almost panicked, but read about flush cached

Can see remaining with

greep -e Dirty: /proc/meminfo

Got 139 left however many zeroes

1 per minute cleared, two hours later... Done

9am

Files there but HD extremely slow and hangs. Windows OS drive shows 100% usage after a while and also get stuck

Saturday, 9pm

Gave use and formated the drive with windows. Using it as an extra drive.

Seems to work normally. Going to stay like this for a while

Extra notes:

dd conv fsync or oflags to display proper progress

No easily access sata so had to swap from other drives

when booting windows lots of things broken due to missing files

I use junctions to free up the 120 gb os drive, so the drive is important

Files

Comments

No comments found for this post.