• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Is this a Sympton of a dying SD-Card?  (Read 5367 times)
odoll
Full Member
***

Karma: 0
Posts: 148


View Profile
« on: April 05, 2011, 03:10:14 AM »

@ll, I have a SheevaPlug running Debian Squeeze from a 4GB SD card for some month, now.
Code:
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mmcblk0p2         3249716   1096520   1988144  36% /
tmpfs                   257788         0    257788   0% /lib/init/rw
udev                    254952        72    254880   1% /dev
tmpfs                   257788         0    257788   0% /dev/shm
/dev/mmcblk0p1           97979     24505     68256  27% /boot

Lately I have the issue that the plug gets unusable after performing e.g. an "apt-get update":
Code:
root@Share:~# apt-get update
[...]
Fetched 130 kB in 0s (174 kB/s)
Reading package lists... Error!
E: Unable to synchronize mmap - msync (5: Input/output error)
E: Failed to truncate file - ftruncate (30: Read-only file system)
E: Problem renaming the file /var/cache/apt/pkgcache.bin.L131U2 to /var/cache/apt/pkgcache.bin - rename (30: Read-only file system)
E: The package lists or status file could not be parsed or opened.
I even can't reboot it remotely any longer:
Code:
root@Share:~# reboot
-bash: /sbin/reboot: Input/output error
Only solution is to pull the power plug out of the socket and power cycling it.

Might this behavior be caused by the SD card dying. How can I check its health?
Logged

pingtoo
Sr. Member
****

Karma: 15
Posts: 318


View Profile
« Reply #1 on: April 05, 2011, 06:01:26 AM »

I'll say it is probably dying if not at lease the filesystem on it is dirty. take the SD card to another PC have the filesystem repaired first. And while you have the SD card on the PC, make backup of it after filesystem repair.

Good luck Smiley
Logged

Good Luck Smiley

pietsnot
Newbie
*

Karma: 1
Posts: 41


View Profile
« Reply #2 on: April 05, 2011, 06:17:33 AM »

Might this behavior be caused by the SD card dying. How can I check its health?
this is a known issue:
http://plugcomputer.org/plugforum/index.php?topic=3880.0
Logged

[unbricked]2xguruplug-server+2xjtag>nslu2;debian squeeze; [4|8]gb mmc:rootFS+swapFS; sata-hd 2tb; Linux-kernel-2.6.35.12; U-Boot_2010.03-01266; iptables:FW+router+gw;dhcpd;sshd;sabnzbd;vsftpd;exim4;rTorrent; nfs[d]; autofs; xorg; icewm; iceweasel; xrdp; privoxy+tor; apache; smbd; mediatomb>pch-a110

ppmt
Full Member
***

Karma: 1
Posts: 129


View Profile
« Reply #3 on: April 05, 2011, 09:21:02 AM »

strangely enough I had a similar issue with my SD card. It has been up and running for about a month but yesterday morning when I connected I noticed that my SIP client was down!

Looking into it more the all system was complaining that the / partition was in read only mode

I extracted it from the plug to do a fsck on it but fsck failed because of "memory allocation failure" !

So basically I can't fix my SD and I have now reinstall the system on a USB key I have using ext2 only rather than ext4

What file system do you use?
Logged

pingtoo
Sr. Member
****

Karma: 15
Posts: 318


View Profile
« Reply #4 on: April 05, 2011, 09:24:54 AM »

Usually when fsck failed with not enough memory that mean swap is not set. fsck require large amount of memory because it does all the correction in memory before it write back to storage. simply setup a swap space usually will address fsck not enough memory problem.

Good luck Smiley
Logged

Good Luck Smiley

birdman
Sr. Member
****

Karma: 4
Posts: 443


View Profile WWW
« Reply #5 on: April 05, 2011, 04:55:51 PM »

I had an SD card fail after ~15 months of use.  The symptoms I saw were that writes "succeeded" (in that no error was reported), but nothing was actually written.  Somewhat disconcerting - it tests your sanity.
To fix it I switched to using a USB drive instead - only /boot is now on SD for me.
Logged

ppmt
Full Member
***

Karma: 1
Posts: 129


View Profile
« Reply #6 on: April 05, 2011, 07:31:36 PM »

pingtoo

My swap is about 4 Gig

I can actually see the real RAM (2Gig) disappearing as the fsck goes and then the PC slows down until it fails

You think 2Gig (RAM) + 4 Gig swap is not enough?

I don't see that behaviour with real harddisk when I check them. Does it have to do with the fact that SD card are different the harddisk?

I will try to add a spare partition to increase the swap.

thanks for the tip.
Logged

pingtoo
Sr. Member
****

Karma: 15
Posts: 318


View Profile
« Reply #7 on: April 05, 2011, 07:54:48 PM »

4G should be enough to fix a 2G file system. may be something I have not thought about yet.
Logged

Good Luck Smiley

odoll
Full Member
***

Karma: 0
Posts: 148


View Profile
« Reply #8 on: April 06, 2011, 04:15:38 AM »

tried to fix/check my SD card this morning, but when putting it back into the SheevaPlug it didn't come up again. My first guess was that I screwed the FSs, but at a second glance it was "just", that the PSU failed (just flashing LEDs).

So I put it into my second spare Plug, which boots, but it came up without any ethernet interface (ifconfig just report a lo; guess I have to check the uboot settings).

Luckily I still had a spare GuruPlug PSU from a friend lying around, so I soldered it into the broken SheevaPlug, which then came up nicely.

So I still have to monitor if that SD issue was triggered by a "weak" PSU, or if the issue persists ...
Logged

pingtoo
Sr. Member
****

Karma: 15
Posts: 318


View Profile
« Reply #9 on: April 06, 2011, 06:29:28 AM »

Check if you have eth1. some version of udev have a rule that will record the MAC address, so moving SD to a new plug will give you a new eth interface.

Good luck Smiley
Logged

Good Luck Smiley

odoll
Full Member
***

Karma: 0
Posts: 148


View Profile
« Reply #10 on: April 06, 2011, 07:19:06 AM »

no, when I do a "ifconfig" it just gives me something like:
Code:
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:982 errors:0 dropped:0 overruns:0 frame:0
          TX packets:982 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:74919 (73.1 KiB)  TX bytes:74919 (73.1 KiB)
no eth0 nor eth1 nor ... have to look into this
Logged

ppmt
Full Member
***

Karma: 1
Posts: 129


View Profile
« Reply #11 on: April 06, 2011, 07:24:41 AM »

4G should be enough to fix a 2G file system. may be something I have not thought about yet.

the file system of the SD card is about 6 Gig so it could be an issue
Logged

birdman
Sr. Member
****

Karma: 4
Posts: 443


View Profile WWW
« Reply #12 on: April 06, 2011, 01:59:55 PM »

the file system of the SD card is about 6 Gig so it could be an issue
Why would you need so much memory to fsck a file system?  What on Earth would you do if you ever needed to fsck a 1TB disk?
It only checks the meta-data, and it doesn't even need to keep all of that in memory at once anyway.
The "memory allocation failure" sounds like a bug.  It's found a problem on the disk, but is treating the data as real, so trying to allocate vast amounts of memory.,
Logged

ppmt
Full Member
***

Karma: 1
Posts: 129


View Profile
« Reply #13 on: April 07, 2011, 04:42:31 AM »

birdman: I had the same question about big file system. My disk at home is 250Gib Sad so hope it will not happen

The only thing I can think of is that SD are not Harddisk and might be treated differently by fsck but then agaain it is my hope !
Logged

Pages: [1]
Print
Jump to: