Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

3 Answers 3

Replace the Compact Flash card it's probably broken.

share|improve this answer

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.

share|improve this answer
    
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 6: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

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.