Tux

...making Linux just a little more fun!

Stubborn or Fried Memory card?

Ben Okopnik [ben at okopnik.com]


Tue, 26 Apr 2011 09:56:37 -0400

On Tue, Apr 26, 2011 at 02:36:47PM +1000, Amit Saha wrote:

> 
> Disk /dev/sdc: 6469 MB, 6469189632 bytes
> 200 heads, 62 sectors/track, 1018 cylinders, total 12635136 sectors
> Units = sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disk identifier: 0x00000000
^^^^^^^^^^

> Disk /dev/sdc doesn't contain a valid partition table
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Presuming that it did have one, and had a reasonable identifier, it looks like your card's not readable. Assuming that there's no "protect" switch on it - you did look for one, right? - I suspect that it has failed. That is, it can be read enough to determine its physical characteristics - I don't know how the two processes differ, I only know that they do - but you can't access its storage. In other words, it's junk.

> Anything else I can try? Any info appreciated.

Try a raw read.

# See if you can copy the first 512 bytes
sudo dd if=/dev/sdc of=/tmp/mbr bs=512 count=1
 
# If that succeeds, then back it up, quick!
sudo dd if=/dev/sda of=/tmp/sdc_backup.raw bs=4096

Ben

-- 
                       OKOPNIK CONSULTING
        Custom Computing Solutions For Your Business
Expert-led Training | Dynamic, vital websites | Custom programming
  443-250-7895   http://okopnik.com   http://twitter.com/okopnik


Top    Back


Ben Okopnik [ben at linuxgazette.net]


Tue, 26 Apr 2011 22:05:11 -0400

On Wed, Apr 27, 2011 at 09:52:32AM +1000, Amit Saha wrote:

> On Tue, Apr 26, 2011 at 11:56 PM, Ben Okopnik <ben@okopnik.com> wrote:
> >
> > Try a raw read.
> >
> > ```
> > # See if you can copy the first 512 bytes
> > sudo dd if=/dev/sdc of=/tmp/mbr bs=512 count=1
> 
> Pass.

The first block is OK, at least...

> >
> > # If that succeeds, then back it up, quick!
> > sudo dd if=/dev/sda of=/tmp/sdc_backup.raw bs=4096
> > '''
> 
> Fail. Sigh. Looks like its fried indeed.

Oh, that sucks. You could try 'conv=noerror' as an argument to 'dd', just to see if you can recover something - but in my experience with flash media, once you lose a block, you've lost it all. As (I think) René mentioned, these gadgets (or the relevant circuitry, anyway) do their own error correction, so by the time you actually see errors, things are well beyond the recovery stage. I can't decide whether the pre-ECC approach (which required a hard format every 6 months or so) or the current approach (complete and utter brain and heart death before you see even a single failure) is "better", for whatever that means... I only know what the OEMs went with, the "state of the state". Which is "don't expect anything good if you haven't backed up."

-- 
* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *


Top    Back


Ben Okopnik [ben at linuxgazette.net]


Wed, 27 Apr 2011 16:52:28 -0400

On Wed, Apr 27, 2011 at 03:40:14PM -0500, John Karns wrote:

> On Tue, Apr 26, 2011 at 9:05 PM, Ben Okopnik
> 
> > things are well beyond the recovery stage. I can't decide whether the
> > pre-ECC approach (which required a hard format every 6 months or so) or
> > the current approach (complete and utter brain and heart death before
> > you see even a single failure) is "better", for whatever that means... I
> > only know what the OEMs went with, the "state of the state". Which is
> > "don't expect anything good if you haven't backed up."
> 
> Too bad they didn't implement something analogous to the IDE early
> failure detection system S.M.A.R.T. for these devices!

I like the idea behind S.M.A.R.T., but it's something that needs to be applied at the system level, not at the user level, where they seem to have left it. Users either don't know about it, have heard of it and think it's too technical, or know how to handle it and simply forget. S.M.A.R.T. is quite nifty - but I feel like it's dying a lonely death due to incorrect positioning (or lack of implementation by vendors and such.) That's a shame.

-- 
* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *


Top    Back


Ben Okopnik [ben at linuxgazette.net]


Wed, 27 Apr 2011 23:22:37 -0400

On Thu, Apr 28, 2011 at 08:04:54AM +1000, Jason Wigg wrote:

> On 28 April 2011 06:52, Ben Okopnik <ben@linuxgazette.net> wrote:
> > I like the idea behind S.M.A.R.T., but it's something that needs to be
> > applied at the system level, not at the user level, where they seem to
> > have left it. Users either don't know about it, have heard of it and
> > think it's too technical, or know how to handle it and simply forget.
> > S.M.A.R.T. is quite nifty - but I feel like it's dying a lonely death
> > due to incorrect positioning (or lack of implementation by vendors and
> > such.) That's a shame.
> 
> Applying S.M.A.R.T. more at operating system level would be nice, but
> I've noticed it does seem to be checked at bios level quite a lot.

Yeah, there's some implementation at that level, and it's always nice to see. I just wish it was universal; it's such a nicely-designed system, and would be of great help in many situations (would prevent a lot of data loss.)

> For instance, just last week my motherboard started prompting me every
> time I booted that one of my HDDs could be nearing failure, it's now
> replaced without any lost data.

Isn't that lovely? That's how it should be - and easily could be, if vendors would get off their butts and make a couple of tiny, essentially no-cost changes.

> One can also use smartd to regularly check hard drives.  That requires
> the user to check the system log for errors every now and then though.

Actually, there are some Linux utilities (that I should remember to set up sometime soon...) that pop up S.M.A.R.T.-triggered messages right on your desktop. I don't recall the names at the moment, but they're part of pretty much every distro out there.

-- 
* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *


Top    Back


Ben Okopnik [ben at linuxgazette.net]


Wed, 27 Apr 2011 23:35:01 -0400

On Thu, Apr 28, 2011 at 12:17:45AM +0200, René Pfeiffer wrote:

> On Apr 28, 2011 at 0804 +1000, Jason Wigg appeared and said:
> > [...]
> > Applying S.M.A.R.T. more at operating system level would be nice, but
> > I've noticed it does seem to be checked at bios level quite a lot.
> > For instance, just last week my motherboard started prompting me every
> > time I booted that one of my HDDs could be nearing failure, it's now
> > replaced without any lost data.
> 
> Some admins couple S.M.A.R.T. with old-fashioned tools:
> http://www.gonemovies.com/WWW/MyWebFilms/Oorlog/BootThomsen2.jpg

[laugh]

> It sounds funny, but some disks give clear audio signals when failing.
> Hearing what my data does has saved documents, too. :)

I wouldn't rely on it always happening, but - yep, HDs quite often do let you know that they're about to fail. If you hear your drive doing something that it wasn't doing before, and it does so on a consistent (or even worse, progressive) basis, you should PAY ATTENTION.

[ Cue the MAYTAG.EXE program of days past... ]

-- 
* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *


Top    Back