Compact Flash mounted Read Only

PrayingMantis asked:

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?

My 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.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.