[ale] Anyone using a Western Digital external HD ?

Ron Frazier atllinuxenthinfo at c3energy.com
Thu Nov 17 02:42:22 EST 2011


Hi Courtney,

This is a long answer to a short question.

It depends on how much trouble you want to go to, but here are some 
suggestions. I'm assuming you meant 500 GB, not MB.

First, if the unit is not very old, it could be under warranty. If so, 
you could RMA it to the factory.

If it is under warranty, removing the drive from the case will probably 
void the warranty.

Also, if there's any data that the former owner wants, you don't want to 
do what I'm about to propose, as it will erase the drive.

Assuming you don't want to or can't RMA it, and assuming there's no data 
you need from it, and assuming it hasn't suffered any mechanical damage, 
and assuming it has good fully functional firmware and controller, you 
could try the following. This could be used for any drive, not just the 
one you listed.

As others have mentioned, those drives were somewhat famous in the past, 
or infamous, for heat death. I haven't personally owned one. However, 
the enclosures tended to have inadequate air circulation and no fans. 
That's, why, if I want an external drive for myself, I buy the bare 
drive and put it in a case myself. If that were my drive, I'd acquire an 
external case from Fry's or something and put the drive in it. You want 
a metal case, and for physically bigger drives like the 3.5" ones, it's 
nice to have a fan, although not totally essential. Even without a fan, 
a metal case will dissipate heat better. I really like the Vantec brand, 
although there are many options. You'll need to know what size the 
original drive is physically, probably 3.5" or 2.5". You'll also need to 
find out whether it has a PATA or SATA interface, and get the proper 
enclosure. Getting the enclosure from a local store would allow for easy 
returns as long as you save all the packaging and parts in case the 
drive just won't work.

Putting the drive in a new enclosure should preemptively eliminate the 
following potential problems: cable problems, exterior interface 
problems, heat problems, and power supply problems.

If whatever enclosure you end up using (even the original one) does not 
come with a power supply wall adapter, then it draws its power from the 
USB ports. These usually require a cable with a double USB plug on one 
end and must be plugged into two USB ports at the same time to get 
enough power. In this case, make sure you have the right cable. Also, if 
you're plugging into a USB hub that does not have a wall adapter, only 
ONE port on the hub will have full power. That could be any port on the 
hub as long as there are not other high power devices plugged into it. 
To adequately power an external hard drive from the USB ports without 
any wall adapters anywhere, you have to plug both of the plugs on the 
dual cable assembly directly into the PC or plug one into the PC and the 
other into a hub. If you're plugging into a hub which has it's own 
external power adapter, you can plug both plugs of the hard drive into 
the hub. Hope that makes some sense.

Once you decide which enclosure you're using and install the drive, then 
you can proceed to format and thoroughly test the drive. I could give 
you these instructions for Windows or Linux, but I'm assuming you're 
using Linux. If you want Windows instructions, please let me know. These 
instructions are not as hard as they look, so don't let the length of 
this put you off.

I'm going to give instructions for using the (mostly) graphical tools in 
Ubuntu using Gnome 2. If you're using another system, you can adapt 
them. Other people here might be able to give you some command line 
options as well.

When you're ready to test the drive, plug both USB plugs (if there are 
two) into USB ports. Start the disk utility program. In the old Ubuntu 
menu system, this is under menu, system, administration, disk utility. 
In the Synaptic package manager, it's called gnome-disk-utility. I think 
the actual program name is palimpsest. That might help you find it if 
your version of Linux is different.

Make sure you don't have any other external disk drives or memory sticks 
plugged in to prevent confusion. Once disk utility is running, maximize 
the window. You should see a column on the left showing your storage 
devices. There should be an entry called Peripheral Devices, and under 
that, you should see something like 500 GB Hard Disk. Click on the 500 
GB Hard Disk underneath Peripheral Devices. If the drive mounts at all, 
you should see a chart of whatever partitions are on it.

WARNING, the next step will completely erase the drive. Stop here if you 
want any data off the drive. Assuming the drive mounted and the 
partitions mounted, you could try to copy any important data off of the 
drive. If you don't mind erasing the drive, continue.

Make doubly sure you have selected the correct drive on the left. The 
one you're looking at should NOT be listed under Local Storage. If 
you're sure, click each partition in turn on the partition map and click 
the Unmount Volume button near the middle of the screen. If the Unmount 
Volume button doesn't appear, go on to the next partition. Click the 
"Format Drive" button in the top third of the screen above the partition 
map. The disk utility will ask what scheme you want to use. Select 
Master Boot Record then click Format in the small dialog box. It says 
Are you sure ...? Click Format.

Once the format is done, the entire drive should show up as unallocated 
space. Click the Create Partition button near the middle of the screen. 
A dialog box pops up. It asks the size, type, name, and a couple of 
questions. On mine, the defaults are: size: (the full size of the 
drive), type: ext4, name: new volume (make whatever you want, I chose 
"Test Drive"), take ownership of filesystem: ON (someone else can tell 
me what happens if this is OFF), and encrypt underlying device: OFF. In 
testing, I only changed the name. When ready, click the Create button.

After a few seconds, the volume should be created. Click the Mount 
Volume button in the mid left of the screen. At this point, the drive 
should be usable. However, since it had a questionable past, I recommend 
further testing and verification. I do this same testing and 
verification process, essentially, on all new drives I get.

The following may help prevent any premature power down sequences. This 
procedure will be different if you're not running Gnome 2.

Go to menu, system, preferences, power management. On the On AC Power 
tab, make sure the Spin down hard disks when possible checkbox is OFF. 
(If you want it on, you can turn it back on later. Close the power 
management window. Minimize the Disk Utility.

Some on the list may disagree with the following, but I now recommend 
completely filling the drive with data. Here's why. Modern hard drives 
are just reliable enough to get the job done most of the time. When the 
data is stored on the drive as magnetic patterns, inevitably, thousands 
of errors are generated. The drive's controller compensates for the 
errors and arranges to give you your data back when you ask for it. So, 
by entirely filling the drive, the controller will be forced to look at 
every sector and evaluate it's ability to write to it. It will keep 
track of which sectors work properly and which, if any, don't. The ones 
that don't will be mapped out and not used.

Here's one way to fill up the drive. I'm sure there are many other ways, 
including some based on the command line.

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

I'm going to digress a bit here. When I get a new hard drive, or want to 
refurbish an old one, this is what I do. I'm not going to describe this 
entire procedure below since these tools are not built into Linux.

First I'd mount the new drive in a new metal enclosure, with a fan 
preferably if it's a big drive.

Second, I'd boot up the Ultimate Boot CD ( 
http://www.ultimatebootcd.com/ ) and find the CopyWipe utility. I'd 
start the utility and wipe the drive with random data. This forces each 
sector to be written, and thus evaluated for functionality by the 
drive's controller. This utility has a somewhat unfriendly user 
interface. It would be easy to wipe out your main system drive if you're 
not careful.

Third, I'd fire up my copy of SpinRite, from Gibson Research. I use it 
to do an exhaustive surface analysis (level 4) on the drive. On every 
pass, it reads a sector, inverts the data, writes it back, reads it, 
inverts it, and writes it back again. This forces the drives controller 
to thoroughly evaluate each sector AGAIN and makes sure the flux levels 
on the surfaces work both for binary 0 and 1 at for every byte on the 
drive. Any questionable sectors will be mapped out. I run 6 passes this way.

You could also run an extended SMART test, using disk utility or 
something else, IF you have access to the drive's SMART subsystem. This 
test is not nearly as exhaustive as the SpinRite test, as it is a single 
pass read only surface analysis, as far as I know. Also, for the drive 
I'm testing with while writing this, I can't get access to SMART via the 
USB port.

Before some of you pile on about a possibly low opinion of SpinRite, we 
covered that extensively in a thread entitled something like "What kind 
of large drives are you having luck with" right around the first of the 
year 2011.

Bottom line, I have personal experience and KNOW that SpinRite has 
recovered a failing drive for me and allowed me to get data off of it. 
Furthermore, I firmly believe that running SpinRite periodically on my 
drives prevents failures by avoiding the problem of weakening magnetic 
fields on sectors that are rarely accessed. Barring mechanical failures, 
it is not uncommon for my drives to last more than 5 years.

For the purposes of this discussion, my objective is to thrash the drive 
I'm trying to initialize in order for it to identify any weak sectors 
and to make the magnetic fields on the in use sectors as strong as possible.

By the way, if you do have access to the SMART system, you will be able 
to find out if the drive has bad sectors after all this testing. If it 
does, I'd be suspicious about using it for critical data. SpinRite has a 
function to return bad sectors to use after exhaustively testing them, 
but I've never used it. Pretty much, if I see bad sectors, I scrap the 
drive.

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

Download a Ubuntu (or other) ISO file and save it on your desktop. We're 
just trying to get a really big file here, so this will get us a 700 MB 
file to work with. It doesn't matter where you get the ISO from, or if 
you use another type of large file. You could try this link:

http://mirrors.ccs.neu.edu/releases.ubuntu.com/11.04/ubuntu-11.04-desktop-amd64.iso

Once you've got the ISO on your desktop, open two copies of your file 
manager, in my case Nautilus, and tile the windows side by side. On the 
left window, select your desktop. On the right window, select the new 
disk drive, which should show up as whatever you named it when you 
created the new volume. Mine is Test Drive.

Drag the ISO file from the Desktop to the Test Drive. Now, the Test 
Drive should have only that file on it. You may also see lost+found and 
.Trash files. You may close the Nautilus window which was pointing to 
the desktop. You may also delete the Ubuntu ISO from the desktop later 
if desired. Go back to the Nautilus window that points to your test drive.

Click on the new ISO file to select it. Right click on it and select 
copy. Right click on an empty space on the Test Drive and click paste. 
You should now have two ISO files on the Test Drive. Click the first 
one, then Shift Click the last one to select both. Right click on them 
and click copy. Right click on an empty space and click paste. When this 
is done, you should have 4 ISO files. Repeat the procedure to duplicate 
them to 8 files. Repeat the procedure to duplicate them to 16 files. At 
this point, when you are copying 8 files, you are copying 5 GB at a 
time. The source and destination is the external USB drive. So, it takes 
some time, about 3 - 5 minutes every time you copy 8 ISO's. Continue 
doubling the number of files until the copy fails because there's not 
enough room. One advantage of copying from and to the same destination 
using the copy and paste procedure is that it automatically renames the 
copies. Someone may point out that you could create a giant file using 
the DD command. I give some example usage of that below. No matter how 
you do it, transferring all this data to a USB drive will, in total, 
take several hours. Once you're duplicating 16 or more ISO files at a 
time, you can spend 10 - 20 minutes doing something else while the 
copying is going on. If you use something like DD, be aware that the 
terminal window will appear to have locked up, possibly for hours at a 
time, depending on the size of the file you're trying to create. If you 
use DD, I would set the data source to random numbers rather than zeros. 
This exercises the magnetic surfaces and the controller more fully.

Writing this post gave me an opportunity to do some large file transfer 
tests. Just as a test, I tried this procedure.

Open terminal.

cd "/media/Test Drive" (The drive named is whatever you named it during 
volume creation. Use quotes if there are spaces in the drive name.)

(I want to create a big file with random numbers. Wikipedia has an 
article on the random number source in Linux: 
http://en.wikipedia.org/wiki//dev/random )

dd if=/dev/urandom of=junkfile-16GB-001 bs=1M count=16384 (Using urandom 
prevents it from blocking further usage when it runs out of entropy.)

(This should create a 16 GB file of random numbers. The file will be 
stored in whatever location you started the DD command from. Note that 
the "M" must be capitalized.)

In my case, I was sending the file directly to the Test Drive. This 
worked, but VERY slowly. It took 33 minutes to create a 16 GB file and 
worked at 8.7 MB / s. I must assume that the random number source works 
very slowly as this is well below the bandwidth limit of the USB interface.

I then highlighted the new file in Nautilus, and did a copy / paste on 
it, from the Test Drive to the Test Drive. In my case, the Test Drive is 
a 5400 RPM SATA drive.

This took 17 minutes, and averaged 15.8 MB / s. Note that this is 
hampered by the need to copy both to and from the USB drive.

Then, I copied this big 16 GB blob to my desktop, which is on a separate 
7200 RPM SATA drive. I renamed the file on the desktop, then copied it 
again to the USB drive using Nautilus.

This took 8 minutes, and averaged 34.5 MB / s. Interestingly enough, the 
copy from the Test Drive to the desktop only averaged 31 or so MB / s. 
This transfer speed is probably approaching the limit of both the drive 
and the interface. So, the fastest you can go is about 30 s / GB to 
write data to the external USB drive.

So, the fastest way to fill up an external drive, if that's what you 
want to do, is repeatedly copy a large file to it from an internal 
drive. You can use /dev/urandom to create random numbers once, but 
shouldn't use that to directly write to the target drive if what you 
want is speed.

It would be neat to have a script that would just repeatedly copy and 
rename a 1 GB file of random noise, and then smaller files, to the drive 
of choice until the drive is full.

I proceeded to continue copying data to my Test Drive until it was full. 
When I could no longer copy the 16 GB blob, I made some additional blobs 
of 8 GB, 4 GB, 2 GB, 1 GB, 512 MB, 256 MB, 128 MB, 64 MB, 32 MB, and 16 
MB with DD. I then proceeded to copy these smaller files to the drive 
until I used up all but 16 MB of space. For these other file blobs, I 
CD'd back to my desktop before running the commands, so the DD utility 
created the files on the desktop. Then, I dragged these files to the 
Test Drive to copy them from the desktop.

So, here are the commands you can use to create random number files of 
different sizes in whatever directory you launch the terminal in:

dd if=/dev/urandom of=junkfile-16GB-001 bs=1M count=16384
dd if=/dev/urandom of=junkfile-8GB-001 bs=1M count=8192
dd if=/dev/urandom of=junkfile-4GB-001 bs=1M count=4096
dd if=/dev/urandom of=junkfile-2GB-001 bs=1M count=2048
dd if=/dev/urandom of=junkfile-1GB-001 bs=1M count=1024
dd if=/dev/urandom of=junkfile-512MB-001 bs=1M count=512
dd if=/dev/urandom of=junkfile-256MB-001 bs=1M count=256
dd if=/dev/urandom of=junkfile-128MB-001 bs=1M count=128
dd if=/dev/urandom of=junkfile-64MB-001 bs=1M count=64
dd if=/dev/urandom of=junkfile-32MB-001 bs=1M count=32
dd if=/dev/urandom of=junkfile-16MB-001 bs=1M count=16

To use up the very last bit of space, you can use the secure-delete 
utility in Linux. Look in your package manager and find and install this 
item.

Issuing the following command will use up all the remaining free space 
on your Test Drive.

sudo sfill -l -v "/media/Test Drive/" (Substitute your name for the drive.)

In Nautilus, you will see a file called oooooooo.ooo appear for a while. 
The utility is using this file to use up all the remaining free space on 
the drive and securely wipe it. Allow this utility to run until your 
terminal prompt comes back. This may take LONG time, maybe an hour or 
more. It does funky things to the drive I don't understand. For example, 
when I started sfill for testing, Nautilus said it had only a few MB 
available, less than 16 MB. However, sfill somehow created a 14 GB file. 
Just let the thing run until your terminal prompt comes back. If you 
really get tired of waiting, I think you can abort sfill with CTRL-C, 
but it's better to leave it running until it's done.

You might say this could be use to fill up the whole drive without all 
this copying. That's true, but it's abominably slow, even slower than 
/dev/urandom and DD. Copying big files to the drive is a much faster way 
to fill up space. Using sfill alone would probably take 20 hours or 
more. The one advantage is that you could start it and leave it.

It's not a bad idea to fill up all the empty space on a drive this way 
periodically even if you don't use something like SpinRite. If you have 
existing data, you DO NOT want to format the drive first, as we did 
originally. Filling up empty space this way does two things. It 
periodically forces the drive controller to verify that it can write to 
all remaining available sectors, or map them out. It will also force the 
permanent deletion and replacement of everything that you've deleted 
before, which actually hangs around on the drive. This procedure will 
NOT read all the existing data on the drive, and refresh it by rewriting 
it, as SpinRite does. Therefore, you still may suffer from infrequently 
written sectors developing weak magnetic fields and losing data over 
time. If you can get access to the drive's SMART subsystem, you should 
periodically run an extended SMART test, which will at least verify that 
the drive can read all it's sectors. Do NOT run the benchmark function 
of the disk utility, which I believe is destructive to data.

The sfill utility first makes the oooooooo.ooo file as big as it can, 
then writes into it with zeros, then with random numbers. Once it's 
done, it deletes the oooooooo.ooo file. But, that's OK. By that time, we 
will have accomplished our desired aim of forcing the drive to write to 
absolutely all of it's space for testing purposes.

Hopefuly, the drive will have accepted all these files properly and 
written them to disk. Hopefully, also, the drive will not have shut down 
during this process.

Once you've completely filled the drive with data, and once the sfill 
utility ends and your terminal window is no longer locked, go back to 
the disk utility window. It should still be pointing at your Test Drive. 
Click the Unmount Volume button on the middle left. Click the Check 
Filesystem button on the middle left. It should report that the file 
system is clean.

At this point, you can be pretty sure that the drive is running fine. If 
you really wanted to check further, you could run MD5 sums on some the 
ISO's you copied and compare to the Ubuntu mirror, but that's probably 
not necessary. If you've gotten this far, you can probably put the drive 
into service and use it.

Go back to Nautilus and select the Test Drive. This will remount it. 
Click the first regular file item to select it. Scroll down if 
necessary. Hold the Shift key and click the last item. This should 
select all. Delete all the files. Then, empty your trashcan in Gnome. 
Once you've done this, all your drive's space should be available. Use 
it as desired. When done, unmount it by clicking the little up arrow 
next to the drive name in Nautilus. Once it says it's safe to remove the 
drive, you can unplug it. You can use it whenever you need to, just 
remember to unmount it each time.

It turned out to be lots harder to write this than I thought. But it's 
not so hard to do. Hope it helps.

Sincerely,

Ron


On 11/16/2011 05:22 AM, Courtney Thomas wrote:
> If yes, under what system and how should it be installed and used, please ?
>
> I've been given one [500MB MyBook, USB&  Firewire capable] that the
> former owner says will only intermittently shutdown or be recognized
> by Windows Vista, so would like to use it myself if I can figure out
> what's been the problem under winders.
>
> Thank you,
> C.Thomas
>    

-- 

(PS - If you email me and don't get a quick response, you might want to
call on the phone.  I get about 300 emails per day from alternate energy
mailing lists and such.  I don't always see new messages very quickly.)

Ron Frazier

770-205-9422 (O)   Leave a message.
linuxdude AT c3energy.com



More information about the Ale mailing list