[ale] Somewhat OT - MicroSD linux/android - flakey

Ron Frazier (ALE) atllinuxenthinfo at techstarship.com
Mon Oct 28 11:42:19 EDT 2013


Hi Neal,

I did some recent research into SSD's which also would apply to flash memory cards.  As Mike T said, the devices do wear out.  At one point, I was teaching at Lanier Tech for a period of time.  I always told the students never to have their memory stick be their only copy of their work.  Sometimes, the files vanish.

(Ron grimaces as he remembers the single copy of some of his data on the tablet's memory card.)
  
A flash memory cell is essentially a capacitor with an insulator on top.  To store your data bits, the controller forces a charge through the insulator and into the capacitor.  To read the data bits, the controller reads the state of charge in the memory cell.

The failure mode is interesting, and somewhat unnerving.

The controller will automatically spread the wear across all the various cells.  Cheaper devices may have less effective wear leveling and error correction systems and cheaper memory cells.  Thus, a $ 20 16 GB memory card may be more prone to failure or have less longevity than a $ 200 128 GB SSD.

Every time the data is written to the cell, and the charge is forced through the insulator, it somewhat destroys the insulator.

At some point, you will have written and erased so much data in each memory cell that its insulator is no longer capable of retaining the charge in the cell reliably or for long periods of time.  In this case, your data can vanish.

In some cases, the controller will do data scrubbing in the background and refresh any weak cells or reallocate them, but only if the device has that feature and only if it's powered on.

This is the scary part.  When an SSD has reached the end of it's design life, and you've written to every cell a few thousand times, the data retention time with power off goes WAY down.  A new SSD may retain data with power off for years.  A "used up" SSD, with all of its charge cell insulators thoroughly beaten up by usage, may only retain data with power off for 30 DAYS.

This is why I don't like the idea of an SSD as a backup drive, which may sit dormant for a long time, and I'm still not totally comfortable with them as a main drive.

By the way, most writes to a storage device are never verified.  The OS just assumes that the data was stored.

But, you may write data to the device, and even read it back to verify it, and the data may just vanish or become corrupt later.

Here's what you could do to test and possibly rejuvenate your memory card.

Take the card and attach it to your PC.  Copy all the data out to a folder on the pc.

Do one of the following:

A) Run a badblocks read only test on the card.  This will allow the controller to read every cell and find any weak ones that it may wish to remove from service.  This would not reduce the card's longevity.

B) Run a badblocks nondestructive read write test on the card.  This will read every cell on the card, write random data (I think) to it, read it, compare it, and write the original data back.  This will even more thoroughly flush out any weak cells the controller doesn't like.  This will use up probably 2 of the complete write passes from the card's longevity, but will insure that any weak cells that the controller can identify will no longer be used.

You may wish to format the card before putting it back in service.  Then you can put its data back on it from the folder in the pc.  At this point, the card be as reliable as it can.

It is STILL possible that it is nearing the end of its life and the data retention capability will be too low.

It may not be worth this trouble for a cheap memory card.  But, the same procedures can be used on SSD's which are much more expensive.  Just for the record, if buying an SSD, I would look for SLC or MLC memory, but not TLC, so called compute quality chips, and a generous amount of overprovisioning.  It may be hard to determine whether these features are in use on a memory card.

Regarding contacts, I have occasionally seen a scenario where connectors on an audio headphone cable which are continuously mated will get flaky, presumably because the spring tension is getting low on the contacts.  On a few occasions, I have disconnected the connectors and let them sit about a week.  This presumably allows the spring tension to return a bit.  Sometimes, afterwards, the connection is more reliable.

This might be effective (to remove the card for a while) on your phone, but I don't know for sure.

Sincerely,

Ron



Neal Rhodes <neal at mnopltd.com> wrote:

>Somewhat OT.  
>
>My HTC Rezound has had a Kingston SDC4/16GB microSDHC Flash Card -
>16GB,
>Class 4, Adapter in it for about 2 years now.  Worked fine.  
>
>Last couple of months, it has occasionally decided there is no SD card.
>Reboot doesn't help.   Taking the phone apart, sliding card in and out
>usually helps, but not always.  
>
>Thus far, every time I've pulled it out and stuck it in the little
>adapter carrier, and stuck that in the front of my HP running Centos
>(see, not totally OT) it has read just fine. 
>
>HTC has not provided much insight, they just say maybe the SD card is
>intermittently shot, and get another Class 4 or class 6 card.  That
>would be cheap and the best answer. 
>
>The less attractive answer is the SD contacts in the phone are going
>south. 
>
>Anybody got experience with an SD that is iffy in a phone, but not iffy
>in a desktop? 
>
>Any Vendors better than others? 
>
>
>Neal Rhodes
>MNOP Ltd
>
>



--

Sent from my Android Acer A500 tablet with bluetooth keyboard and K-9 Mail.
Please excuse my potential brevity if I'm typing on the touch screen.

(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 email messages very quickly.)

Ron Frazier
770-205-9422 (O)   Leave a message.
linuxdude AT techstarship.com
Litecoin: LZzAJu9rZEWzALxDhAHnWLRvybVAVgwTh3
Bitcoin: 15s3aLVsxm8EuQvT8gUDw3RWqvuY9hPGUU




More information about the Ale mailing list