LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   General (https://www.linuxquestions.org/questions/general-10/)
-   -   WD Blue HDD corrupts easily in USB enclosure (https://www.linuxquestions.org/questions/general-10/wd-blue-hdd-corrupts-easily-in-usb-enclosure-4175650546/)

dracolich 03-20-2019 08:18 AM

WD Blue HDD corrupts easily in USB enclosure
 
Hello, LQ. I'm posting this in General since it is not specific to any OS. Apologies for the long story. Thanks in advance for any clues or ideas. :)

Approx. 1.5 - 2 years ago I bought a 500GB WD Blue HDD (not a Scorpio Blue) to use with my softmodded Nintendo Wii. I put it into a USB 2.0 enclosure, formatted it as FAT32, loaded the files onto it, and it worked great for a while.

On the Wii it began to freeze when listing games. So I connected it to my computer via USB (Win7 and Linux) where I would find some corrupted files in various folders folders. Even worse, when doing any large file operations on the disk while connected via USB 2.0, the drive would suddenly disconnect from Windows. Connected via USB 3.0 does not seem to disconnect. :confused:

Approx. 1 year ago, the corruption was almost total. Trying to recover without losing files, I ran a deep testdisk scan from Linux. After 8 hours it seemed to recover all of the files. The next time I tried to play Wii games some would not start while others did. Browsing the files again I found that although the files appear normal some are unable to be read/copied.

Finally, about six months ago, I copied what I could onto a different drive, reformatted with the bad sector scan, and restored the files from the copies and other backups. It worked well again until I connected it to my computer again to add some new files. No problem from my computer. A few weeks later I brought it work with me to add/organize some more files on it, under Win10 via USB 2.0(SS?). No problems adding, but it would not safely remove. I shut down before unplugging, but still when I connected it to another Win10 workstation it was corrupted again! Not only that but it showed signs of using an older FAT table, such as folder contents and filenames were from before recent changes.

I immediately opened Win10 Power Shell to run chkdsk, and after it fixes one file it stopped and returned to the command prompt. I could run it again and it would do the same. Next I waited until I got home to try chkdsk on my Win7. Same thing. Finally I removed the drive from the enclosure and swapped with one of my internal non-boot drives. Started Win7 and did chkdsk /r, and it completed successfully! I also got the latest WD Data Lifeguard tools and did SMART and surface scans. All good.

Satisfied but puzzled, I swapped the drives back and plugged the enclosure into USB 3.0 to verify files and replace ones that were removed by chkdsk. All seems to be fine now, as long as the USB 2.0 enclosure is connected to a 3.0 port. I have a 256GB flash drive arriving today to transfer these files onto for use on the Wii.

My question is this: Is there something about WD Blue drives that they don't work reliably via USB 2.0? Power, data speed, etc. Yet, somehow, when the 2.0 enclosure is plugged into a 3.0 port there are no problems. I have used various cables including the Y-type for extra power.

The enclosure is an older WD brand with an Initio chip. I also tried a different newer enclosure for a while, a Sabrent brand, but it won't even spin up without the extra power from a Y-cable. The WD drive is a WD5000LPVX and the power rating is 5V@0.55A. I have used WD 120GB Caviar drives in this same enclosure over the years and never had problems other than those associated with old age. I have also used Toshiba drives of 120GB and 1TB, which are both rated for 5V@1.0A, without problems.

jsbjsb001 03-20-2019 08:29 AM

From what you've said, it sounds like the common denominator is your USB 2.0 port. It sounds like the drive itself is OK, but it's either your USB 2.0 interface, or more likely, the USB 2.0 port it's being connected to. The other thing to remember is that the FAT filesystem isn't a good choice for storing large files on. It also has the 4GB file size limit.

So based on that;

* Have you tried using a different USB 2.0 port?
* Does this always happen with the same USB 2.0 port?
* Is your Wii USB 2.0?
* On average, exactly how big are the files you're storing on the drive?

freemedia2018 03-20-2019 08:59 AM

You might need one of those split USB cables that has a separate cable just for power.

Not saying that's what it is, but if you're concerned about low power, that's the only solution (other than a powered usb enclosure that plugs in to the wall, such as the ones that also do full-size HDDs) I'm aware of.

dracolich 03-20-2019 01:13 PM

Thank you for the quick replies. freemedia2018, I did mention that I have already used split USB cables. I called it Y-cable in my post. Out of the many USB cables I have tried at least three were the split type. It does work on a computer using a powered USB 2.0 hub in between. However, this will not work on the Wii. I tried.

jsbjsb001, on the Wii, it has one pair of USB 2.0 ports and nothing else connected. On at least three different computers, my main PC at home and two at my workplace, I have tried using both front and back ports. I am aware that FAT32 has more limits and caveats compared to others, however it is required for the Wii homebrew apps that access USB storage. One folder is 113GB of game rips with files split at 2GB, another is ~40GB of game rips that are 1.4GB each, and several folders that contain cover art, cfg files and other miscellany. I suspected at one time it might be the USB 2.0 ports, but that still comes back to compatibility of the hdd brand/series because the older 120GB Caviar drives and the Toshiba drives work in the same enclosures on the same 2.0 ports. Could it be the number of files 1-2GB?

jsbjsb001 03-21-2019 02:26 AM

Well, I don't have a Wii or a USB enclosure myself, so I can't really test it for you. But I do have a WD Blue HDD, but it's formatted with ext4, and not FAT32. I haven't had any problems with it yet, and it does have large files on it (video files - being the reason I bought it for).

I'd try using another drive formatted with FAT32 on your Wii, and see if you notice the same problems. If so, and you have no problems reading/writing files with your PC (or particularly any other machines), then I'd say it's possible that it's the way in which the Wii is writing files to it, and/or the Wii isn't properly un-mounting the drive, resulting in file corruption.

If other drives don't have the same problems; then it's a problem with either that particular drive and/or the filesystem on that particular drive.

It's possible that it could also be some kind of power issue as pointed out above.

Remember that hardware problems ain't always obvious, and it may well be failing very slowly, in a way that's just not obvious or badder enough for it's SMART status to pick up on. Google done a study on SMART, that from memory, found that SMART only picked up on failing drives around 60% of the time from memory. So SMART is by no means perfect.

capt ron 03-21-2019 04:36 PM

Sounds to me like the SATA > USB converter in the enclosure is problematic.

This could be a power problem, especially if the converter is powered off the data bus instead of drive power. The clue for me is that it works ok when plugged into a USB 3 port as they supply a little more current than a USB 2 port.

bodge99 03-21-2019 06:22 PM

Good advice above..

What I would do is this:-

Low level format & recertify the drive using the manufacturer's tools. This will prove the drive as good/bad.

Next, format the drive & replace your files with known good copies.

Now try to prove how and when file corruption occurs when connected to the Wii. Initially, use auxiliary power to the USB enclosure.
Repeat the tests with no auxiliary power.

If corruption still occurs in either instance then consider replacing the USB enclosure with a newer (powered) one.

I agree with Capt Ron, I would guess that your USB-SATA converter is degrading. I've seen this sort of behaviour before.

Good luck.

dracolich 03-22-2019 08:57 AM

Thank you all for the replies and some very good ideas.

Capt Ron, that is my guess as well given the clues so far, as well as the possibility that the Wii USB ports supply slightly less power than a computer. But it always helps to have more ideas from other great minds here :)
Indeed the enclosure I am using is quite old, a WD Passport from 2007-ish that originally came with a 120GB. I did mention also using a much newer Sabrent brand USB 2.0 enclosure. I see now it has a Moai MA6166A chip, and this has always been more power-hungry than the WD. Most disks won't even spin up unless it's using a split USB cable for auxiliary power; and when they do it disconnects easily, especially during large operations.

jsbjsb001, I just got a big enough Sandisk flash drive and copied the files from the WD drive. I found that, even though it appears that Windows chkdsk recovered the corrupted files, the files still do not work. I did md5 checksums and they do not match the backups. So, I am now having to replace those files from the backups. That's how I feel about SMART - just one of many tools to gather information, but not make an immediate assessment based on it alone.

bodge99, if the flash drive works well I do plan to reformat the WD drive and repurpose it. I do need a replacement for my quickly dying portable 1TB, and 500GB will suffice for that. :)
The corruption seems to occur any time the drive is disconnected without being properly unmounted first, whether from the Wii, Win7, Win10, or Linux.
The only spare externally-powered enclosure I have is for a 5.25" inch IDE drive and my disk is a 2.5" SATA. I could do it with an IDE-SATA adapter, but that will be two interface adapters between the system and the disk - a lot of room for something to go wrong. As I also mentioned previously, connecting to a powered USB 2.0 hub does work on a pc but the Wii cannot see devices on a hub.

bodge99 03-22-2019 10:56 AM

Hi,

The big clue here ..."The corruption seems to occur any time the drive is disconnected without being properly unmounted first, whether from the Wii, Win7, Win10, or Linux." It would appear that the Wii cannot unmount external drives properly/at all. Fat32 is easily corrupted and proper umount/unmount/safe removal procedures must be followed to avoid corruption.

I've just had a look at the Nintendo Wii site and saw this:

Quote:
You can expand the amount of available storage space with external USB storage devices.

Nintendo recommends using self-powered hard disk drives, i.e. devices that use an external power supply instead of drawing power through USB. Devices that draw their power from USB ports are known as "bus-powered" devices, and are not recommended for use with Wii. For the best results with storage devices, we recommend using a hard drive with its own power supply that connects to the Wii via the USB port on the console.

Please note that you cannot remove/connect a storage device while the power is on.
/Quote

I.e. It appears that caches are not flushed until power off.

Ho hum..

dracolich 03-22-2019 04:13 PM

I've seen some of those. There is another site, gbatemp, where gamers talk about their modded systems, peripherals, and homebrew. There are many topics there about usb drives and bus-powered vs external-powered. The gist is that some bus-powered drives do work, but always prefer external-powered. My problem on the Wii is when a game or the launcher app freezes requiring a hard reset. If that was the only time+place it occurred I wouldn't be here.

The bigger problem is when it is happening between computers. It's main purpose is for use on my Wii, but it gets used on computers more often for managing the files. For example the last time I formatted this disk and replaced all of the files, I used it on the Wii only once with no problem. I then connected it to my home pc to add some new files, about 100MB. No problem. It then sat usused/untouched for a few weeks. Took it to work to replace files in a folder with newer versions from a flash drive. Everything was fine except it refused to safely remove. I left it connected until Win10 shutdown, expecting that the shutdown process would release any locks and properly unmount the disk. At my next workstation I plugged it in and it had become corrupted.

I realize when I said "disconnected without being properly unmounted first" it may have implied that I unplug the drive. What I meant is the times when the os suddenly loses the connection, as if the drive or usb port lost power. I try to never unplug a usb disk without safely unmounting it first. I learned that the hard way with my first flash drive, a $100 BusLink 16MB :)

I've used many portable disks and flash drives during the past two decades, some FAT32 and some NTFS. Many of them have had times when they refuse to safely remove, usually related to portable software I had been using. As long as any processes related to files on the portable disk are stopped and/or the os has been shutdown, the drives are always okay...except this one. I'll find out soon how it behaves after being formatted NTFS and not so many large files.

dracolich 03-23-2019 07:37 AM

So last night I used the flash drive in the Wii and tested a couple more Wii games. All good. Tested a Gamecube game which uses a secondary loader... Poof! The drive's FAT disappeared! Upon insertion Windows said it needed to be formatted and chkdsk said the fs was RAW. So it seems on the Wii end of things, the Gamecube loader is the culprit.

I reformatted the drive to NTFS and left it overnight to recopy the Wii games since they should work on NTFS. Gamecube and some retro system emulators require FAT32. I'm not going to attempt Gamecube again unless I do it from a separate drive, and the retro stuff I have working beautifully on a RetroPie system.

I also reformatted the 500GB WD Blue drive to NTFS and put it in the same WD Passport enclosure. Today I will begin transferring the files from my dying 1TB and see how the Blue behaves.

dracolich 03-24-2019 07:58 AM

Ok. Yesterday while at work I copied everything from my 1TB to the clean NTFS 500GB. I started at one workstation and copied approx. 30GB of stuff. No big files, just a bunch of portable software. After that the list of drives showed this one using approx. 30GB, then I safely removed the drive.

After lunch I returned to the same workstation to continued copying. When I plug in the drive Win10 wanted to scan it for problems, so I let it scan and it said no problems were found. That's so annoying in Win10 - it tells you "problems were found", then you choose "scan and repair" and wait, then it tells you "Windows finished scanning. No problems were found." Oh, how I love to hate Win10 :)

I copied a few selected programs from my PortableApps.com folder. In ThunderbirdPortable Windows alerted of one file that could not be read and I chose to skip so it would continue copying. After that I proceeded to copy the remaining software folders which included texlive and MSYS2. I saved the remaining PortableApps.com items for later because it's so many. All appeared to copy successfully ... except the amount of used space shown in the drives list was only 34GB. I know it should have been closer to 200GB. Texlive and MSYS2 are 5-6GB each. :confused: It was safely removed again.

Later at home, in Win7, when I plugged it in Windows said it needed to be scanned. Again, no problems found. But why is Windows wanting to scan it if it was safely removed? I copied the remaining items from my PortableApps.com folder. An hour later it was finished, but the drive usage was still showing only 34GB used. Also, it should have taken more than only 1 hour to copy that much at USB 2.0 speed. I safely removed it, unplugged, plugged back in, and now the bad part. Windows completely freezes while trying to read the drive. When I unplug the drive Windows returns to normal.

I shut down this pc and plugged it into my Ubuntu laptop. No problem mounting the drive and browsing in Thunar. However, when I opened the ThunderbirdPortable directory instead of seeing files I was greeted with a Disk I/O error. :eek: At that point I unmounted and unplugged it.

jsbjsb001 03-24-2019 08:11 AM

Quote:

Originally Posted by dracolich (Post 5977205)
...I safely removed it, unplugged, plugged back in, and now the bad part. Windows completely freezes while trying to read the drive. When I unplug the drive Windows returns to normal.

I shut down this pc and plugged it into my Ubuntu laptop. No problem mounting the drive and browsing in Thunar. However, when I opened the ThunderbirdPortable directory instead of seeing files I was greeted with a Disk I/O error. :eek: At that point I unmounted and unplugged it.

Is this the same drive you were originally talking about, that was in your USB enclosure before? If so, it really sounds like it may well be a hardware problem with the drive/it's on it's way out. If it's a SATA drive, then you could try plugging it directly into your machine using a SATA cable, then see if you have the same problem. Also, you should then be able to check it with smartctl - post it's SMART status from that. It could also be your USB enclosure itself (as suggested before).

dracolich 03-24-2019 10:32 AM

Thank you. Yes, this is the same WD 500GB drive, and the same WD Passport enclosure. I chose that combination to determine if the issue lied in hardware or the FAT32 fs. I just booted my main pc into Slackware to get the smartctl results. You suggested connecting the drive internally but I chose to use the USB enclosure to further test its role in this. smartctl was not able to get results through this enclosure. My Toshiba 1TB drive in a Rosewill USB 3.0 enclosure gives results, a Toshiba 120GB drive in the aforementioned Sabrent enclosure gives results, the WD 500GB drive in this WD enclosure does not, the WD 500GB drive in the Sabrent enclosure did give results. As requested those results are posted below:

Code:

smartctl 6.5 2016-05-07 r4318 [i686-linux-4.4.172-smp] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:    Western Digital Blue Mobile
Device Model:    WDC WD5000LPVX-00V0TT0
Serial Number:    WD-WX61A1375924
LU WWN Device Id: 5 0014ee 658c78b47
Firmware Version: 01.01A01
User Capacity:    500,107,862,016 bytes [500 GB]
Sector Sizes:    512 bytes logical, 4096 bytes physical
Rotation Rate:    5400 rpm
Device is:        In smartctl database [for details use: -P show]
ATA Version is:  ACS-2 (minor revision not indicated)
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 1.5 Gb/s)
Local Time is:    Sun Mar 24 10:41:41 2019 EDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART Status not supported: Incomplete response, ATA output registers missing
SMART overall-health self-assessment test result: PASSED
Warning: This result is based on an Attribute check.

General SMART Values:
Offline data collection status:  (0x00)        Offline data collection activity
                                        was never started.
                                        Auto Offline Data Collection: Disabled.
Self-test execution status:      (  0)        The previous self-test routine completed
                                        without error or no self-test has ever
                                        been run.
Total time to complete Offline
data collection:                ( 8220) seconds.
Offline data collection
capabilities:                          (0x7b) SMART execute Offline immediate.
                                        Auto Offline data collection on/off support.
                                        Suspend Offline collection upon new
                                        command.
                                        Offline surface scan supported.
                                        Self-test supported.
                                        Conveyance Self-test supported.
                                        Selective Self-test supported.
SMART capabilities:            (0x0003)        Saves SMART data before entering
                                        power-saving mode.
                                        Supports SMART auto save timer.
Error logging capability:        (0x01)        Error logging supported.
                                        General Purpose Logging supported.
Short self-test routine
recommended polling time:          (  2) minutes.
Extended self-test routine
recommended polling time:          (  95) minutes.
Conveyance self-test routine
recommended polling time:          (  5) minutes.
SCT capabilities:                (0x7035)        SCT Status supported.
                                        SCT Feature Control supported.
                                        SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG    VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate    0x002f  200  200  051    Pre-fail  Always      -      0
  3 Spin_Up_Time            0x0027  147  145  021    Pre-fail  Always      -      1608
  4 Start_Stop_Count        0x0032  099  099  000    Old_age  Always      -      1547
  5 Reallocated_Sector_Ct  0x0033  200  200  140    Pre-fail  Always      -      0
  7 Seek_Error_Rate        0x002e  200  200  000    Old_age  Always      -      0
  9 Power_On_Hours          0x0032  100  100  000    Old_age  Always      -      494
 10 Spin_Retry_Count        0x0032  100  100  000    Old_age  Always      -      0
 11 Calibration_Retry_Count 0x0032  100  100  000    Old_age  Always      -      0
 12 Power_Cycle_Count      0x0032  100  100  000    Old_age  Always      -      468
192 Power-Off_Retract_Count 0x0032  200  200  000    Old_age  Always      -      94
193 Load_Cycle_Count        0x0032  194  194  000    Old_age  Always      -      20906
194 Temperature_Celsius    0x0022  121  098  000    Old_age  Always      -      22
196 Reallocated_Event_Count 0x0032  200  200  000    Old_age  Always      -      0
197 Current_Pending_Sector  0x0032  200  200  000    Old_age  Always      -      0
198 Offline_Uncorrectable  0x0030  100  253  000    Old_age  Offline      -      0
199 UDMA_CRC_Error_Count    0x0032  200  200  000    Old_age  Always      -      0
200 Multi_Zone_Error_Rate  0x0008  100  253  000    Old_age  Offline      -      0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline      Completed without error      00%      445        -
# 2  Short offline      Completed without error      00%      405        -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

Browsing the WD 500GB in the Sabrent enclosure in Thunar, ThunderbirdPortable now displays without an I/O error, but now MSYS2 has an error. Before opening the directory the properties shows only 43 items totalling 34MB. It should be 45000 totalling 1.6GB. I have another directory called /Tools/GNU. On the source disk the size of the directory is 53000 items totaling 1.7GB, but the copy is only 23000 items totaling 830MB. It looks like a lot of directories that contain lots of very small files did not copy completely.

I'll keep it in this enclosure for now, but I wonder if I should reformat it and recopy the stuff tomorrow to see how it goes. I try not to use this enclosure much because, as I mentioned previously, it is more power hungry requiring a second USB port for auxiliary power. But if I can get a good stable copy of my files I can move it into the Rosewill USB 3.0.

RandomTroll 03-24-2019 11:05 PM

I had problems with a new enclosure. I figured out the cable was bad, only by swapping in another.


All times are GMT -5. The time now is 04:25 AM.