1

I have a board, running linux (RedHat, kernel: 2.4.32). The board has been up and running since long time. However suddenly, some errors are being observed in the logs, and the Compact Flash (present on the board) gets mounted as read-only.

Here are the relevant logs:

1) From output of "dmesg":

hda: write_intr error1: nr_sectors=2, stat=0x51
hda: write_intr: status=0x51 { DriveReady SeekComplete Error }
hda: write_intr: error=0x80 { BadSector }, LBAsect=35344, sector=33360
end_request: I/O error, dev 03:01 (hda), sector 33360
journal_bmap: journal block not found at offset 3191 on ide0(3,1)
Aborting journal on device ide0(3,1).
hda: write_intr error1: nr_sectors=2, stat=0x51
hda: write_intr: status=0x51 { DriveReady SeekComplete Error }
hda: write_intr: error=0x80 { BadSector }, LBAsect=2534, sector=550
end_request: I/O error, dev 03:01 (hda), sector 550
ext3_abort called.
EXT3-fs abort (device ide0(3,1)): ext3_journal_start: Detected aborted journal
Remounting filesystem read-only
EXT3-fs error (device ide0(3,1)) in start_transaction: Journal has aborted

2) "mount" confirms that the CF infact has been mounted as read-only:

/dev/hda1 on /mnt/compactFlash type ext3 (ro,mand,noatime,nodiratime)

It should be Read-Write (rw) normally.

3) In syslog, I observe errors related to failing I/O:

kernel: EXT3-fs unexpected failure: (((jh2bh(jh))->b_state & (1UL << BH_Uptodate)) != 0);
kernel: Possible IO failure.
kernel: EXT3-fs unexpected failure: (((jh2bh(jh))->b_state & (1UL << BH_Uptodate)) != 0);
kernel: Possible IO failure.

I looked up this error on google, (RedHat Mail Archives)and e2fsck was recommended. So, I performed an fsck, however, it tried to fix many errors, but many of my files on the flash end up in lost+found, and the board won't boot, after another restart.

Any Suggestions?

John Gardeniers
  • 27,262
  • 12
  • 53
  • 108

3 Answers3

3

Replace the Compact Flash card it's probably broken.

Lucas Kauffman
  • 16,818
  • 9
  • 57
  • 92
2

Get a new CompactFlash card to replace the dead card. They don't last forever, and from the sound of it, that one is almost certainly long past its useful life.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
  • Thanks Michael. That is what I was suspecting. There is just one more question, if I am able to somehow fix the errors using an e2fsck on the Flash, how reliable would it be to use in production? Thanks in advance. – PrayingMantis Oct 26 '12 at 06:44
  • 2
    What part of "dead" was unclear? Use in production? That card should never be used for anything again. – Michael Hampton Oct 26 '12 at 13:08
1

As others have said, replace the card. Compact Flash have a very limited write life. If you must use one ensure that you use it for read only if possible. Many systems using compact flash cards use ramdisk for volatile data and only write to the card when the system goes through a clean shutdown, to be read and put back into the ramdisk upon reboot.

John Gardeniers
  • 27,262
  • 12
  • 53
  • 108