Author Topic: I/O error on sd-card  (Read 8436 times)

roter_planet

  • Newbie
  • *
  • Posts: 14
    • View Profile
I/O error on sd-card
« on: April 26, 2004, 09:40:02 am »
hi,

i don\'t know maybe this is a known bug, but i haven\'t figured something out about this. generally writing/reading with sd-card was possible. until now!
cd /mnt/card
ls
sends following error:
ls: ./home: input/output error
ls: ./usr: input/output error

and dmesg shows following error:
pxa_sd_wait response: response time out (cmd=07.....)
sd_write_multiple(239964): select error
sd flush : ERROR adr=122386 ...
[SD]-R 1d01e600 0400 ERROR!
EXT2-fs error (device mmcd(60,1)) : ext2_read_inode: unable to read inode block- inode=...

has anybody an idea to solve this problem or where are some posted infos about it?

thanks stephan

c760 running pdaxrom, sandisk 512sd, ibm microdrive

doublec

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
    • http://radio.weblogs.com/0102385/categories/zaurus/index.html
I/O error on sd-card
« Reply #1 on: April 26, 2004, 05:24:26 pm »
You need to unmount the SD coard and fsck it:

umount /mnt/card
e2fsck /dev/mmcda1
mount /mnt/card

You may need to eject and re-insert the card before unmounting it.  SD cards are notorious for getting mysterious I/O errors on many PDA\'s.

Chris.

roter_planet

  • Newbie
  • *
  • Posts: 14
    • View Profile
I/O error on sd-card
« Reply #2 on: April 27, 2004, 02:07:45 pm »
hii,

thanks. but I\'ve done this already. that dos not help.. after trying to mount the device
following error:
/dev/mmcda1: invalid argument
mount: you must specify the filesystem type

rescan with e2fsck shows:
e2fsck: invalid argument while trying to open /dev/mmcda1
the superblock could not be read or does not describe a correct ext2 filesystem.....
and so on!

any further  ideas ?

iin a forum i also read that these problems are typical fot the new sandisk sd-cards.
because they have a non-conform driver to talk with them.
ii don\'t know what\'s the truth?

stephan

doublec

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
    • http://radio.weblogs.com/0102385/categories/zaurus/index.html
I/O error on sd-card
« Reply #3 on: April 27, 2004, 08:05:26 pm »
Is it a new card? Or one that used to work?

I\'ve had exactly that error and the problem with e2fsck. When it occurs I immediately eject the card, wait a few seconds then re-insert it. Then:

umount /mnt/card
e2fsck /dev/mmcda1
mount /mnt/card

And it has always worked. If it  is still not working you may want to try reformatting it. Or try it in a card reader on a PC and see if anything is wrong with it.

nakor

  • Newbie
  • *
  • Posts: 15
    • View Profile
    • http://
I/O error on sd-card
« Reply #4 on: May 04, 2004, 03:15:09 pm »
Here\'s the fun error I get with my SD card when I run e2fsck /dev/mmcda1:

e2fsck: Invalid argument while trying to open /dev/mmcda1

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
       e2fsck -b 8193 <device>

I\'ve tried the later as well.

any suggestions?  I just got his card middle of last month and it had been working like a champ until I did a
mkfs.ext2 on it.

raduga

  • Full Member
  • ***
  • Posts: 129
    • View Profile
    • http://
I/O error on sd-card
« Reply #5 on: May 04, 2004, 03:24:25 pm »
Quote
Here\'s the fun error I get with my SD card when I run e2fsck /dev/mmcda1:

e2fsck: Invalid argument while trying to open /dev/mmcda1

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2  
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
       e2fsck -b 8193 <device>

I\'ve tried the later as well.

any suggestions?  I just got his card middle of last month and it had been working like a champ until I did a  
mkfs.ext2 on it.


Some of the Sandisk (and Lexar) cards have been reported to have problems after  reformatting with ext2;  some will not ever run reliably after that.

could you try this:

physically eject and reinsert the card
(then fsck, whatever you want)
then write some small files (less than a mb)
then write some larger files (over 10mb)

and see if you have any success.

Also check out this thread: (where I\'m trying to resolve the assorted SD io issues)

http://www.zaurususergroup.com/index.php?n...iewtopic&t=3787

roter_planet

  • Newbie
  • *
  • Posts: 14
    • View Profile
I/O error on sd-card
« Reply #6 on: May 06, 2004, 01:44:15 pm »
i have still the same problems with my sd-card. it\'s matter if msdos or ext2 fs is on it.
i had also that error which nakor described.  

pdaxrom.org offered a new sd-module ipk.

 does anybody knows how to setup it and if it helps? i think it must be a module which needs to be integrated with insmod or modprobe. or ist it a simple application?
how to get rid of the sharp_mmcsd_m.o module, which is allways running? even if no card is inserted.

has anybody experiences with lexar 512mb sd-cards?

thanks for any reply.

stephan

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
I/O error on sd-card
« Reply #7 on: May 06, 2004, 04:16:05 pm »
Curiously enough pdaXrom didn\'t like my MMC card and I used to get the same kind of io errors whenever I tried to install anything. Then I\'d have to stick it in my 5500 (running OZ) which was able to fix the problem (pdaXrom wasn\'t able to fix it).

I\'m now running OZ which seems to do this less often (like just once in a month, rather than twice a week. BTW my 5500 never suffered). I don\'t know why, but would be interested to find out.


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

edi800

  • Newbie
  • *
  • Posts: 30
    • View Profile
    • http://www.edi800.org
I/O error on sd-card
« Reply #8 on: May 06, 2004, 07:09:53 pm »
Actually I had a similar experience with a Sandisk 256MB SD card.
At first it worked OK, but then I formatted it as ext2, put many small files on it and then it broke. At least I thought so for two months.

I could not see files on it, writing and reading failed. I couldn\'t even format it on a PC card reader. But I found a solution:

umount /mnt/card
fdisk /dev/mmcda1

when I printed the partition table using \'p\' I saw only garbage. So I used the \"o\" option to create a new empty partition table. And wrote the table to the card.
Afterwards I created an empty FAT16 partition and wrote it again to the card. Then I was able to format it again using a PC card reader.

The card works since then :-)

cmisip

  • Sr. Member
  • ****
  • Posts: 256
    • View Profile
    • http://home.mchsi.com/~cmisip/index.htm
I/O error on sd-card
« Reply #9 on: May 06, 2004, 08:16:50 pm »
You can try mke2fs with the read write tests. Of course you will lose all data in it. I use ext3 so the command for me is:

mke2fs -c -c -j /dev/mmcda1

To see if you have any bad blocks.   This solved the problem for me with SD card not being able to be formatted.
Zaurus 5600
Zynergy Rootfs 1.1
Custom zImage

How Do You Do That in Linux

DrWowe

  • Hero Member
  • *****
  • Posts: 696
    • View Profile
    • http://
I/O error on sd-card
« Reply #10 on: May 06, 2004, 08:51:44 pm »
Quote
mke2fs -c -c -j /dev/mmcda1


You can also use e2fsck -c -c which is non-destructive (it reads, tests, and then rewrites the original data)

stinga

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • http://
I/O error on sd-card
« Reply #11 on: May 17, 2004, 06:41:46 pm »
I have had similar problems with my Lexar 256MB SD card.
After finishing a complete e2fsck -c -c  check on the card I found that I have one bad block, block 0!
Can anyone confirm that the card is basically screwed, since I can not get fdisk to write anything to block 0( without the first 4 blocks you can not write a filesystem) ?

I have tried both mmcsd modules (5500), even attempted to zero out the first block using dd, but with block 0 bad it fails to read the card.
Just seeing if there are any fdisk tricks that I haven\'t yet attempted on my 2 week old SD card  

mh

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • http://
I/O error on sd-card
« Reply #12 on: June 01, 2004, 06:03:22 am »
Hi all

I am experiencing exactly the same problems with my brand new Sandisk 215MB SD card (SANDISK SECURE DIGITAL ULTRA II (SD) 512MB)

I just called the local hepdesk here in Sweden and they accepted to replace the faulty SD card without even discussing what had happened. Maybe it is a known error?  :-/ The card worked fine the first two weeks and then it just failed, no unclean eject or similar... This is the symptoms I experience when running the card.

When I checked for badblocks all blocks from 438025 and to the end of the disk are corrupt (bad). (I think it is something like 10% of the total). Block 0 also seems to be inconsistent, sometimes it works and sometimes not.

When copying large amounts of small files to the disk it fails fatally after some time, no files can be read after the failue.

# cp /mnt/cf/card-backup/cramfs/zsdk-1.0.5.1.cramfs  .
cp: unable to open `./zsdk-1.0.5.1.cramfs\': Input/output error
# dmesg
pxa_sd_wait_response: responce time out (cmd=07 MMC_STAT=0x2142)
sd_write_multiple(239964) : select error
sd flush : ERROR adr = 122368 (0x1de00) , len = 1024 (0x400)
[SD]-R 1501e200 0400 ERROR!
EXT3-fs error (device mmcd(60,1)): read_inode_bitmap: Cannot read inode bitmap - block_group = 42, inode_bitmap = 344066
EXT3-fs error (device mmcd(60,1)) in ext3_new_inode: IO failure
pxa_sd_wait_response: responce time out (cmd=07 MMC_STAT=0x2142)
sd_write_multiple(239964) : select error
sd flush : ERROR adr = 122368 (0x1de00) , len = 1024 (0x400)

Anyhow, I have to wait until I get the new card to see if it performes better or if the same applies for that.

Anyone got a Sandisk Ultra II 512MB card that works?

/MH

wirawan0

  • Guest
I/O error on sd-card
« Reply #13 on: June 09, 2004, 10:59:44 am »
Uh oh... seems like I also had the same problem. I have had my SD card  (Lexar 256MB, 32x) for 2 months. Once it arrived, I \"mkfs.ext2\" it without doing the fdisk ritual first (i.e. without changing the partition type to EXT2). Oh, well. I didn\'t realize it needed to to be done until yesterday. Anyway, the card worked fine with the EXT2 filesystem for these days, until 2 days ago when I tried to untar an archive, and it gives a lot of I/O error. See here for some kernel error messages it gave:

http://www.zaurususergroup.com/index.php?n...iewtopic&t=4778

After that error happened, I thought first it was a software error (i.e. merely filesystem error). I tried to e2fsck it. Once \"fixed\", trying to write to the card would result in same kind of errors again (pxa_sd_wait_response error and so on). At that time one of the inode that was problematic was 40432. It always happened there, so I thought, well, may be this is a bad sector. Tried to reformat the card doesn\'t help (fdisk + mke2fs). Then I reformatted the card under Windows 2000 (to vfat16). To make the long story short, writing data to the card with FAT16 partition would result in errors, too (of course, I don\'t know what they are since Windows doesn\'t tell you them). So now the card seems to be completely unusable. Everytime I tried to re-format the card with fdisk+mke2fs in my zaurus, it won\'t do it. It seemed to be successful, but at the same time dmesg shows a lot of errors (pxa_sd_wait_response et al., again).

All I want to do right now is to return the card and obtain a replacement or a refund (!).

* Does anyone know how to \"recondition\" the card, if somehow I\'ve messed it up? Is the hardware truly NOT reusable anymore?

* Do you know why the EXT2 partition caused too much problems with SD card, as posted many times in this forum? It seemed too illogical to me that it should happen. After all, whether it\'s FAT16 or EXT2, they are on the software level, and has nothing to do with the hardware.

ScottYelich

  • Hero Member
  • *****
  • Posts: 992
    • View Profile
    • http://www.zaurususergroup.com/modules.php?opmodload&namephpWiki&filei
I/O error on sd-card
« Reply #14 on: June 09, 2004, 02:44:03 pm »
Quote
has anybody experiences with lexar 512mb sd-cards?

thanks for any reply.

stephan


Yes... mine does exactly what you say here.  Most of the time you can
umount, e2fsck, mount...
sometimes, though, you will need to power off the Z... etc.

it\'s a royal pain.  In my mind sd on z is 100% useless.  
That is with a 512mb sd.

I have a 256mb lexar -- and it hasn\'t shown any problems... yet.

I bought 2 512mb sandisk -- I haven\'t formatted them.  I will format one
ext2 and then compare their use and lives.

Scott