RasPass
Posts: 16
Joined: Sat Dec 08, 2012 12:44 am

USB Hub and Clicking HDD

Fri Mar 28, 2014 9:24 pm

Hello everyone,

I recently set up a couple of hard drives on my RPi and it was all well for a week or so, till a couple of days ago one of the drives started clicking. I realized this might mean the drive is failing, and I started getting I/O errors anyway. I tried rebooting but somehow RPi would hang on boot trying to mount the drive, but I could boot fine when the entry was commented out in fstab (RPi would also become unresponsive and hang after running 'sudo mount -a').

I figured that the signs point to a dead drive, but when I connected the HDD to my computer, the drive ran smoothly, with no rhythmic clicking, and I rsynced ~300 GB to my computer with no problems. I should note, though, that trying to verify the disk on my computer, I get the error "inode 899, i_blocks is 2894400, should be 262144", and while I guess that was caused by the clicking noise, it did not seem to affect the file transfer or file integrity, or bring the clicking back.

So now I'm thinking that the drive is fine, but maybe it was not powered adequately by the USB hub? However, it seemed to have been running smoothly for a week and then suddenly started clicking and failing without having changed anything in the meantime.

I'm using this USB hub, and this HDD external enclosure. I'm aware that USB 3.0 devices may use more power, but the enclosure seems to be USB 2.0 compatible, and I don't see why the hub should have any problems powering it.

Sorry for the rambling post — I guess my main question is: is there any way I could check how trustworthy the USB hub is to use with my new HDD, and also rule this incident as simply a drive failure that is not related with the hub's power output?

Thanks for any feedback!

User avatar
GTR2Fan
Posts: 1601
Joined: Sun Feb 23, 2014 9:20 pm
Location: South East UK

Re: USB Hub and Clicking HDD

Fri Mar 28, 2014 9:40 pm

I think all hard drive manufacturers provide their own diagnostics software free to the public. If you know what make the drive is I'd be inclined to download and run the appropriate diagnostic test with it plugged into your PC before making any assumptions regarding the cause of the problem.
Pi2B Mini-PC/Media Centre: ARM=1GHz (+3), Core=500MHz, v3d=500MHz, h264=333MHz, RAM=DDR2-1200 (+6/+4/+4+schmoo). Sandisk Ultra HC-I 32GB microSD card on '50=100' OCed slot (42MB/s read) running Raspbian/KODI16, Seagate 3.5" 1.5TB HDD mass storage.

User avatar
iinnovations
Posts: 621
Joined: Thu Jun 06, 2013 5:17 pm

Re: USB Hub and Clicking HDD

Fri Mar 28, 2014 9:50 pm

The only thing to do with a clicking drive is to immediately recover your data as quickly as possible and replace it. That clicking is often the head crashing onto the platter.

Storage is too cheap to inflict this sort of punishment upon yourself.

Colin
CuPID Controls :: Open Source browser-based sensor and device control
interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

RasPass
Posts: 16
Joined: Sat Dec 08, 2012 12:44 am

Re: USB Hub and Clicking HDD

Fri Mar 28, 2014 9:58 pm

@iinnovations: That's true, so I've recovered all the data and ordered a new HDD, but was wondering if my new HDD would suffer the same fate. Also, mysteriously the clicking does not happen when it is connected with my computer for some reason.

@GTR2Fan: That's a good point, but this is the drive I got, and unfortunately WD only offers software for Windows.

Thanks,
RasPass

andrum99
Posts: 810
Joined: Fri Jul 20, 2012 2:41 pm

Re: USB Hub and Clicking HDD

Fri Mar 28, 2014 10:51 pm

Your symptoms sound very similar to what I am currently experiencing with an old laptop hard disk that I have in an external enclosure attached to my Pi. It has the option of connecting a power supply directly, but I would rather not do that as I would prefer to power everything off the same power supply. I do have a special Y cable that can take power from 2 USB ports and feed it into the direct power port. I have not yet tried that yet, as in my case it doesn't result in data errors -the drive just becomes inaccessible when the clicking starts. If you are able to power the drive directly from a separate power supply then you could try that.

RasPass
Posts: 16
Joined: Sat Dec 08, 2012 12:44 am

Re: USB Hub and Clicking HDD

Fri Mar 28, 2014 11:06 pm

@andrum99: That does sound very similar, thanks for your input. I can only assume that the same case could potentially happen with another HDD in the same enclosure. Can a Y cable be used with any device to provide extra power if needed, or can it only be used for specified devices?

My external HDD enclosure doesn't have the option of connecting a power supply directly, but I think I might have a Y cable lying around somewhere. If you happen to try using it, let me know if the Y cable prevents any clicking.

Thanks!

andrum99
Posts: 810
Joined: Fri Jul 20, 2012 2:41 pm

Re: USB Hub and Clicking HDD

Fri Mar 28, 2014 11:15 pm

Will do. You might also try using a different power supply to power the USB hub, for example a "universal" PSU with a selectable voltage you might have lying about.

RasPass
Posts: 16
Joined: Sat Dec 08, 2012 12:44 am

Re: USB Hub and Clicking HDD

Fri Apr 11, 2014 1:12 pm

Just an update — new drive was giving input/output errors after a while too... Now I have a bad fstab and RPi won't boot again, but the extFS trial I had for mounting ext4 partitions on my Mac is expired, so there's no way to fix it without restoring from a backup. #frustration #hashtags

Should I give up on using RPi as a NAS box? I thought it was a legitimate purpose, so I must be doing something wrong.

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2094
Joined: Thu Jul 11, 2013 2:37 pm

Re: USB Hub and Clicking HDD

Fri Apr 11, 2014 1:36 pm

Are you powering the hub from an external power supply?

The Pi most definitely cannot support the current requirements of a USB HDD without an external powered hub.
Rockets are loud.
https://astro-pi.org

RasPass
Posts: 16
Joined: Sat Dec 08, 2012 12:44 am

Re: USB Hub and Clicking HDD

Fri Apr 11, 2014 1:41 pm

Yeah, the USB hub and the RPi both have their own plug. I was considering it may be the USB hub causing the problems, but I don't see how that might happen some time afterwards, instead of right away.

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2094
Joined: Thu Jul 11, 2013 2:37 pm

Re: USB Hub and Clicking HDD

Fri Apr 11, 2014 1:43 pm

Does the hub back-power? I.e. if you unplug the Pi power with the hub power connected, does the Pi still work?
Rockets are loud.
https://astro-pi.org

RasPass
Posts: 16
Joined: Sat Dec 08, 2012 12:44 am

Re: USB Hub and Clicking HDD

Fri Apr 11, 2014 1:50 pm

It does not back-feed power, and the RPi turns off when I unplug it; the hub is advertised as being able to power the pi, though, but I did not use it that way.

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2094
Joined: Thu Jul 11, 2013 2:37 pm

Re: USB Hub and Clicking HDD

Fri Apr 11, 2014 3:26 pm

The HDD clicking is most likely because the power supply has drooped low enough to cause the motor to drop out. USB HDDs will usually retry spinups infinitely - it's not the click of death.

I suggest you measure the voltage that the hub PSU is putting out when under load.
Rockets are loud.
https://astro-pi.org

RasPass
Posts: 16
Joined: Sat Dec 08, 2012 12:44 am

Re: USB Hub and Clicking HDD

Fri Apr 11, 2014 4:27 pm

Are there diagnostics tools I could install to do that, or would I need some sort of device? Thanks!

RasPass
Posts: 16
Joined: Sat Dec 08, 2012 12:44 am

Re: USB Hub and Clicking HDD

Wed Apr 16, 2014 8:57 pm

So before it would take a week for it to give me I/O errors, now it's doing it everyday, and to fix it I have power everything down and up again. It seems like the external drive is powering down and then not back up again, like you said @jdb, and in one of your posts I read in the forum. Sometimes a simple unmount/mount fixes it – most times it doesn't.

Is the most probable problem the USB hub's power supply? What are my options in testing that? Thanks for the help so far, guys!

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2094
Joined: Thu Jul 11, 2013 2:37 pm

Re: USB Hub and Clicking HDD

Wed Apr 16, 2014 9:03 pm

There's not really an easy way to do this apart from either butchering a USB cable, or swapping the hub power supply at random until you find one that works.

If you take one that plugs into one of the hub's downstream ports (i.e. a type A plug) and chop the cable in half, then bare the ends, measuring with a multimeter between the red wire and the black wire will tell you the voltage supplied by the hub.
Rockets are loud.
https://astro-pi.org

RasPass
Posts: 16
Joined: Sat Dec 08, 2012 12:44 am

Re: USB Hub and Clicking HDD

Wed Apr 16, 2014 9:10 pm

Ah I see... At first I was considering getting a new power supply, but I figured it might be the hub's fault, so I was thinking of getting a new hub altogether, do you think that could potentially solve things, or might this not be hub related? I should mention that any drive I have connected to the hub fails after a while, so it couldn't be drive specific, but I don't know if inherently the MO of all USB HDDs would be to power down after a while and not power back up again...

RasPass
Posts: 16
Joined: Sat Dec 08, 2012 12:44 am

Re: USB Hub and Clicking HDD

Mon May 12, 2014 8:35 pm

Sorry to resurrect an old thread, but here's an update with good news. I tried the USB Y cable and that worked fine with no problems, so that may be a solution if you're having the same problem. However, as I have more drives connected, the Y cable would take up too many ports, so I bought this D-link hub and I haven't had any issues since. It looks like the previous hub used may have been defective, or just not up to the task, so it seems like the hub from a trusted brand does the trick.

Thanks for all your help guys!

mathewparet
Posts: 2
Joined: Sat Jun 20, 2015 7:37 am

Re: USB Hub and Clicking HDD

Sun Dec 20, 2015 6:36 am

I hav similar problem. I use a Y cable. One leg of Y is attached to the RPI, and the other to a power adaptor. The tail of the Y is connected to the hard disk.

Every time the unit is switched on, I hear the clicking noise for some time (say 5-10 seconds) and then it stops. The hard disk partitions stay readable and runs fine for some time. After some time the partitions becomes inaccessible. This doesn't happen in a particular rhythm. Sometimes when I try to access the partition it says Input/output error. Sometimes unmounting and remounting works, while sometimes unmounting tells me that the device is busy and I am forced to reboot to get access to the partition. Does anyone have a clue why this might be happening? It might be because of power, because each time after boot when the partition becomes inaccessible and I try to list the contents of the partition, the clicking sound comes back!

Does PI limit power to a USB port if it is inacative for some time? This could be a reason.

I am looking for an answer to:
1. Is there a way to fix it?
2. Is it worth replacing the HDD with a memory card or USB stick? Will it have a similar issue?

I download a lot of torrents in the HDD, I don't want to risk data consistency by moving to a solid state device like memory card or USB stick.

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: USB Hub and Clicking HDD

Sun Dec 20, 2015 7:13 am

mathewparet wrote:I hav similar problem.
If you find an old thread and add to it, it can be confusing under this system because people might look at the first post and not your post. I'm not sure that's really your fault.
Every time the unit is switched on, I hear the clicking noise for some time (say 5-10 seconds) and then it stops. The hard disk partitions stay readable and runs fine for some time. After some time the partitions becomes inaccessible. This doesn't happen in a particular rhythm.
You really should take this seriously. You do not want to mess up your hard drive. Power it properly. Don't expect the pi to do it for you. Do whatever the maker of the hard drive says to do.

fruitoftheloom
Posts: 20727
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: USB Hub and Clicking HDD

Sun Dec 20, 2015 7:20 am

mathewparet wrote:I hav similar problem. I use a Y cable. One leg of Y is attached to the RPI, and the other to a power adaptor. The tail of the Y is connected to the hard disk.

Every time the unit is switched on, I hear the clicking noise for some time (say 5-10 seconds) and then it stops. The hard disk partitions stay readable and runs fine for some time. After some time the partitions becomes inaccessible. This doesn't happen in a particular rhythm. Sometimes when I try to access the partition it says Input/output error. Sometimes unmounting and remounting works, while sometimes unmounting tells me that the device is busy and I am forced to reboot to get access to the partition. Does anyone have a clue why this might be happening? It might be because of power, because each time after boot when the partition becomes inaccessible and I try to list the contents of the partition, the clicking sound comes back!

Does PI limit power to a USB port if it is inacative for some time? This could be a reason.

I am looking for an answer to:
1. Is there a way to fix it?
2. Is it worth replacing the HDD with a memory card or USB stick? Will it have a similar issue?

I download a lot of torrents in the HDD, I don't want to risk data consistency by moving to a solid state device like memory card or USB stick.
You are under-powering the Hard Drive and if it is a 3.5" Hard Drive you should separate power from data, or use a better USB-IDE Bridge !!

If you have a RPi B+/2B then this post is not for you as it applies to the B which had different power mangement :?
Retired disgracefully.....

Return to “Troubleshooting”