LegendBR
Posts: 8
Joined: Tue Dec 09, 2014 1:54 am

Issues with external powered USB HDD

Tue Apr 28, 2015 8:28 pm

Hello there.

I've got a 3,5" HDD USB enclosure externally powered connected to my RPi (model B). A while back I was having some input/output errors, and the HDD (Samsung) would get quite warm, so I thought the HDD was dying and bought a replacement (WD Blue). Just after the backup all the files on the original HDD disappeared, so I thought the problem was indeed with the HDD.

After I changed the HDDs, the first difference I noticed was when I made an "ls" on the command line. With the original HDD, most of the folders would appear with a green color around the name that would make it almost illegible. With the new HDD, everything was normal, just the plain text with no weird colors.

New HDD installed, it was time for some torrent downloading. I downloaded and uploaded a few torrents a the same time (around 20, I guess), and I think that it might have been my problem: after a few days, I started getting input/output errors again, needing to reboot the RPi, and had the same strange green color around the folders' name when I did a "ls" at the root of the HDD (which was and is ext4 formatted, btw).

Now I'm wondering what might be my problem: would it be too many files / access for the RPi to handle at the same time (transmission was a little unresponsive)? Are the HDD and/or enclosure just not fitted to RPi? Could it be a faulty SD card (I've read that a change of SD card did the trick in one case)? If the latter might be true, is it better to make a clean install or could I make a clone of the current SD?

LegendBR
Posts: 8
Joined: Tue Dec 09, 2014 1:54 am

Re: Issues with external powered USB HDD

Wed Apr 29, 2015 11:22 am

No one? :(

User avatar
DougieLawson
Posts: 39120
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Issues with external powered USB HDD

Wed Apr 29, 2015 12:03 pm

What's the filesystem format on your drive?

If it's ext4 then you'll see the standard Linux coloured file names and directory names.
If it's FAT, vFAT or exFAT then you don't get that stuff.

df -T will show you what type of filesystem you've got.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

cpc464
Posts: 239
Joined: Tue Jul 08, 2014 5:10 pm
Contact: Website

Re: Issues with external powered USB HDD

Wed Apr 29, 2015 1:44 pm

Not sure what is causing your i/o errors, but the folder colours can be turned off with

$ unalias ls

Jim
Unix engineer since 1989

LegendBR
Posts: 8
Joined: Tue Dec 09, 2014 1:54 am

Re: Issues with external powered USB HDD

Wed Apr 29, 2015 10:19 pm

The filesystem is ext4. But what I think is strange is the fact that just after the backup there was no colors, and after I started getting I/o errors, the folders appeared in green. Why would there be such changes?

User avatar
electronicsguy
Posts: 156
Joined: Wed Jan 21, 2015 11:20 pm
Contact: Website

Re: Issues with external powered USB HDD

Wed Apr 29, 2015 10:25 pm

LegendBR wrote:The filesystem is ext4. But what I think is strange is the fact that just after the backup there was no colors, and after I started getting I/o errors, the folders appeared in green. Why would there be such changes?
Maybe the way you are mounting/unmounting is changing permissions to the various folders in your specific case. This thread explain the colors and permissions: http://unix.stackexchange.com/questions ... -ls-output

show us the output of "ls -al" when you have different colors and we could compare the permissions.
blog: https://electronicsguy.wordpress.com
github: https://github.com/electronicsguy

LegendBR
Posts: 8
Joined: Tue Dec 09, 2014 1:54 am

Re: Issues with external powered USB HDD

Fri May 01, 2015 12:16 am

OK, managed to fix the HDD with fsck (there were a few problems, but now everything seems OK).

I'm thinking my fstab configuration might not be the best... it was looking like this:

Code: Select all

/dev/sda1       /media/HD       ext4    rw,user,async     0       0
I've changed it, and now it looks like this:

Code: Select all

/dev/sda1       /media/HD       ext4    defaults          0       0
I'm wondering what might be the best configuration for a reliable 24/7 configuration... I'm not really worried about speed, reliability is my priority.

LegendBR
Posts: 8
Joined: Tue Dec 09, 2014 1:54 am

Re: Issues with external powered USB HDD

Fri May 01, 2015 11:11 pm

No one again? :D

User avatar
electronicsguy
Posts: 156
Joined: Wed Jan 21, 2015 11:20 pm
Contact: Website

Re: Issues with external powered USB HDD

Fri May 01, 2015 11:40 pm

Your fstab entry is not going to guarantee reliability. the data reliability will come from not disconnecting the drives before writing all data to it and unmounting it.
blog: https://electronicsguy.wordpress.com
github: https://github.com/electronicsguy

Return to “Troubleshooting”