0

I got stuck in a mess.

I have a 2T WD Elements HD mounted in ExFat that was not recognized anymore from my mac and my Windows. Reading on the internet i found that maybe linux could help me to get out of this mess (i have all my stuff there), so i installed Ubuntu 18.04 with parallels on my mac. I can't get the HD as well but then i found this: sudo apt-get install exfat-fuse exfat-utils and voilà, my WD Elements is finally back again. So now i'm trying to copy the most important stuff in my new HD (a 2TB NTFS Toshiba) but the copy is ridiculously slow, like <1mb and they are both usb 3.0; to copy 40GB it needs 68h!

So what do you suggest me to do? use ubuntu with a partition on my mac, instead using the virtual box? change the format of my new toshiba HD? others? Thanks.

3 Answers3

2

You can load Ubuntu onto a live USB drive and do the same things without having to install it to a partition on your Mac. Despite being in "live" mode you are able to install packages using apt although all data is being stored into memory.

Your HDD is likely failing and usually before a disk fails it becomes slow. It's also very likely the disk will completely fail before you can access the entire contents, so you should be careful to grab the most important documents first and avoid doing anything that can stress the disk, such as prolonged operations.

If you load a SMART utility you can likely see it's failing with metrics provided. See this question for information on how to view the SMART status of a disk and your Mac also should have tools to do this.

Kristopher Ives
  • 5,419
  • 2
  • 27
  • 36
  • Thanks! so using ubuntu on a 32GB USB will be faster? i just want to copy my stuff as soon as possible and format the ExFat HD – Mattia Eleftheriou Jan 27 '19 at 11:07
  • I can't say if it will be faster, but it's pretty easy to try. The disk copy is likely slow because the disk is likely damaged and will fail soon. It's possible that VirtualBox being used on the Mac is causing it to be slow. – Kristopher Ives Jan 27 '19 at 11:09
0

You can use ddrescue to clone the failing (?) drive to another drive with at least the same size (not one single byte smaller). ddrescue is good at reading sectors (on a drive) that are failing: 'almost bad = difficult to read'.

If the target drive with the cloned copy has a different size than the source drive (the failing one), and there is a GUID partition table, GPT, you have to repair the backup partition table with gdisk or easier with gpt-fix. This is not necessary if there is an MSDOS partition table.

Then you can do the repair work on the cloned copy and/or copying from the cloned copy.

See these links with more details,

sudodus
  • 45,126
  • 5
  • 87
  • 151
  • when i run `sudo ddrescue -d -r3 /dev/sdc /dev/sdb /path/to/rescue.log` it asks me to use `--force` , but nothing seems to happen... – Mattia Eleftheriou Jan 27 '19 at 19:05
  • 1. Please check again that all paths are correct: to the source, target and log. 2. Could it be the you can no longer read from the source? 3. Or is the problem, that you don't see any sign of life because the work is done silently? In this case you can install `iotop` and run `sudo iotop -o` is a separate terminal window in order to see if there is any read and write activity. – sudodus Jan 27 '19 at 19:58
0

I have found that using a program like tar or cpio which allows you to specify a buffer size can speed up large copies. Apparently putting the buffers into userspace avoids some system memory thrashing which brings things to a crawl. Use a buffer size of at least 2M, which I found gave me a 3x speed improvement (larger may be even better, since for you, 3x is still only 3M /sec).


Also, using nocache from the nocache package will limit the filling up of system buffers, keep the system response from grinding to a crawl, and speed up the copy (about 5x vs the 3x for the abovementioned tar buffering).


Disks using Shingled Magnetic Recording (SMR) technology can display slow copies like you are seeing, even when you have plenty of free memory. They are cheaper, but not suitable for many applications, and it may take some investigation to see if SMR was used in any particular disk (vendors weren't mentioning that it was being used in commercial disks for a period of time).

ubfan1
  • 17,041
  • 4
  • 39
  • 47