LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices

Reply
 
Search this Thread
Old 10-19-2012, 01:50 AM   #1
PrayingMantis
LQ Newbie
 
Registered: Nov 2011
Distribution: WindRiver, RedHat
Posts: 17

Rep: Reputation: Disabled
Read Only File system


Hi Guys,

I am using RedHat (kernel: 2.4.32) on my embedded device.

The device which uses a CF, mounted as Read-Write, becomes read-only with the following error in dmesg:

Code:
_intr: status=0x51 { DriveReady SeekComplete Error }
hda: write_intr: error=0x80 { BadSector }, LBAsect=35540, sector=33556
end_request: I/O error, dev 03:01 (hda), sector 33556
hda: write_intr error1: nr_sectors=4, stat=0x51
hda: write_intr: status=0x51 { DriveReady SeekComplete Error }
hda: write_intr: error=0x80 { BadSector }, LBAsect=35542, sector=33558
end_request: I/O error, dev 03:01 (hda), sector 33558
hda: write_intr error1: nr_sectors=2, stat=0x51
hda: write_intr: status=0x51 { DriveReady SeekComplete Error }
hda: write_intr: error=0x80 { BadSector }, LBAsect=35544, sector=33560
end_request: I/O error, dev 03:01 (hda), sector 33560
attempt to access beyond end of device
03:01: rw=1, want=603316511, limit=499472
attempt to access beyond end of device
03:01: rw=1, want=1419531931, limit=499472
attempt to access beyond end of device
03:01: rw=1, want=453756917, limit=499472
attempt to access beyond end of device
03:01: rw=1, want=1924671130, limit=499472
attempt to access beyond end of device
03:01: rw=1, want=99783895, limit=499472
attempt to access beyond end of device
03:01: rw=1, want=1448032459, limit=499472
attempt to access beyond end of device
03:01: rw=1, want=1955962354, limit=499472
hda: write_intr error1: nr_sectors=4, stat=0x51
hda: write_intr: status=0x51 { DriveReady SeekComplete Error }
hda: write_intr: error=0x80 { BadSector }, LBAsect=35290, sector=33306
end_request: I/O error, dev 03:01 (hda), sector 33306
hda: write_intr error1: nr_sectors=2, stat=0x51
hda: write_intr: status=0x51 { DriveReady SeekComplete Error }
hda: write_intr: error=0x80 { BadSector }, LBAsect=35292, sector=33308
end_request: I/O error, dev 03:01 (hda), sector 33308
hda: write_intr error1: nr_sectors=4, stat=0x51
hda: write_intr: status=0x51 { DriveReady SeekComplete Error }
hda: write_intr: error=0x80 { BadSector }, LBAsect=35326, sector=33342
end_request: I/O error, dev 03:01 (hda), sector 33342
hda: write_intr error1: nr_sectors=2, stat=0x51
hda: write_intr: status=0x51 { DriveReady SeekComplete Error }
hda: write_intr: error=0x80 { BadSector }, LBAsect=35328, sector=33344
end_request: I/O error, dev 03:01 (hda), sector 33344
attempt to access beyond end of device
03:01: rw=1, want=1802612460, limit=499472
attempt to access beyond end of device
03:01: rw=1, want=2013165295, limit=499472
attempt to access beyond end of device
03:01: rw=1, want=2093294207, limit=499472
attempt to access beyond end of device
03:01: rw=1, want=99743100, limit=499472
attempt to access beyond end of device
03:01: rw=1, want=25160966, limit=499472
attempt to access beyond end of device
03:01: rw=1, want=1186893051, limit=499472
hda: write_intr error1: nr_sectors=12, stat=0x51
hda: write_intr: status=0x51 { DriveReady SeekComplete Error }
hda: write_intr: error=0x80 { BadSector }, LBAsect=35334, sector=33350
end_request: I/O error, dev 03:01 (hda), sector 33350
hda: write_intr error1: nr_sectors=10, stat=0x51
hda: write_intr: status=0x51 { DriveReady SeekComplete Error }
hda: write_intr: error=0x80 { BadSector }, LBAsect=35336, sector=33352
end_request: I/O error, dev 03:01 (hda), sector 33352
hda: write_intr error1: nr_sectors=8, stat=0x51
hda: write_intr: status=0x51 { DriveReady SeekComplete Error }
hda: write_intr: error=0x80 { BadSector }, LBAsect=35338, sector=33354
end_request: I/O error, dev 03:01 (hda), sector 33354
hda: write_intr error1: nr_sectors=6, stat=0x51
hda: write_intr: status=0x51 { DriveReady SeekComplete Error }
hda: write_intr: error=0x80 { BadSector }, LBAsect=35340, sector=33356
end_request: I/O error, dev 03:01 (hda), sector 33356
hda: write_intr error1: nr_sectors=4, stat=0x51
hda: write_intr: status=0x51 { DriveReady SeekComplete Error }
hda: write_intr: error=0x80 { BadSector }, LBAsect=35342, sector=33358
end_request: I/O error, dev 03:01 (hda), sector 33358
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
hda: write_intr error1: nr_sectors=2, stat=0x51
hda: write_intr: status=0x51 { DriveReady SeekComplete Error }
hda: write_intr: error=0x80 { BadSector }, LBAsect=34770, sector=32786
end_request: I/O error, dev 03:01 (hda), sector 32786
hda: write_intr error1: nr_sectors=4, stat=0x51
hda: write_intr: status=0x51 { DriveReady SeekComplete Error }
hda: write_intr: error=0x80 { BadSector }, LBAsect=1986, sector=2
end_request: I/O error, dev 03:01 (hda), sector 2
hda: write_intr error1: nr_sectors=2, stat=0x51
hda: write_intr: status=0x51 { DriveReady SeekComplete Error }
hda: write_intr: error=0x80 { BadSector }, LBAsect=1988, sector=4
end_request: I/O error, dev 03:01 (hda), sector 4
hda: write_intr error1: nr_sectors=2, stat=0x51
hda: write_intr: status=0x51 { DriveReady SeekComplete Error }
hda: write_intr: error=0x80 { BadSector }, LBAsect=34754, sector=32770
end_request: I/O error, dev 03:01 (hda), sector 32770
hda: write_intr error1: nr_sectors=2, stat=0x51
hda: write_intr: status=0x51 { DriveReady SeekComplete Error }
hda: write_intr: error=0x80 { BadSector }, LBAsect=34760, sector=32776
end_request: I/O error, dev 03:01 (hda), sector 32776
hda: write_intr error1: nr_sectors=4, stat=0x51
hda: write_intr: status=0x51 { DriveReady SeekComplete Error }
hda: write_intr: error=0x80 { BadSector }, LBAsect=34766, sector=32782
end_request: I/O error, dev 03:01 (hda), sector 32782
hda: write_intr error1: nr_sectors=2, stat=0x51
hda: write_intr: status=0x51 { DriveReady SeekComplete Error }
hda: write_intr: error=0x80 { BadSector }, LBAsect=34768, sector=32784
end_request: I/O error, dev 03:01 (hda), sector 32784
EXT3-fs error (device ide0(3,1)): ext3_readdir: bad entry in directory #12293: rec_len is smaller than minimal - offset=0, inode=1262895942, rec_len=0, name_len=27
EXT3-fs error (device ide0(3,1)): ext3_readdir: bad entry in directory #14338: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0, name_len=0
EXT3-fs error (device ide0(3,1)): ext3_readdir: bad entry in directory #12293: rec_len is smaller than minimal - offset=0, inode=1262895942, rec_len=0, name_len=27
EXT3-fs error (device ide0(3,1)): ext3_readdir: bad entry in directory #14338: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0, name_len=0
EXT3-fs error (device ide0(3,1)): ext3_readdir: bad entry in directory #12293: rec_len is smaller than minimal - offset=0, inode=1262895942, rec_len=0, name_len=27
EXT3-fs error (device ide0(3,1)): ext3_readdir: bad entry in directory #14338: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0, name_len=0
EXT3-fs error (device ide0(3,1)): ext3_readdir: bad entry in directory #14338: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0, name_len=0
EXT3-fs error (device ide0(3,1)): ext3_readdir: bad entry in directory #14338: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0, name_len=0
EXT3-fs error (device ide0(3,1)): ext3_readdir: bad entry in directory #12293: rec_len is smaller than minimal - offset=0, inode=1262895942, rec_len=0, name_len=27
EXT3-fs error (device ide0(3,1)): ext3_readdir: bad entry in directory #14338: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0, name_len=0
This happens not just on a single board, but many.

e2fsck returns a lot of "inode" related errors, and I think if I try to fix them using fsck, it might destory the data I have.

Any Suggestions?

Thanks.

Last edited by onebuck; 10-21-2012 at 06:02 AM. Reason: change vbcode to 'code' to clean post
 
Old 10-19-2012, 03:15 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,203

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
I don't know anything about CF, but you'd better look real close at your mount options. And your filesystem options - check out the manpage for tune2fs.
As for fsck - there is always the possibly it is going to munge data; it's designed to ensure the consistency of filesystems (metadata), not the contents there-in. Most of the time most of us might be lucky, but you can never be sure. Short answer is I never trust the filesystem after something like you are seeing - I reformat it and restore in-toto.

Last edited by syg00; 10-19-2012 at 03:16 AM. Reason: clean-up
 
Old 10-19-2012, 03:44 AM   #3
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,211

Rep: Reputation: 306Reputation: 306Reputation: 306Reputation: 306
By CF you mean a CompactFlash memory card? Did you used the same card on these different boards or all have own card? If the same then most probably card is broken, they have limited write cycles. Also using a journaling with ext3 is not a good option for theses devices (too many writes). You need to use system or configure it that it does not need to write to disk too many data (get rid of logs, mount /var in memory, etc).

Last edited by eSelix; 10-19-2012 at 03:45 AM.
 
Old 10-19-2012, 03:58 AM   #4
PrayingMantis
LQ Newbie
 
Registered: Nov 2011
Distribution: WindRiver, RedHat
Posts: 17

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by eSelix View Post
By CF you mean a CompactFlash memory card? Did you used the same card on these different boards or all have own card? If the same then most probably card is broken, they have limited write cycles. Also using a journaling with ext3 is not a good option for theses devices (too many writes). You need to use system or configure it that it does not need to write to disk too many data (get rid of logs, mount /var in memory, etc).
Hi eSelix,

Thank you for your reply.

Yes I am using a Compact Flash (64M) on my boards, and each board has its own CF Card. I tried to google about these errors and realised the problem might be the Compact Flash is nearing its end. Another reason might be the power supply (I'm not quite sure).

However, the problem is not just with a single board, it is reproducible with many of them.

Any suggestions?

Thanks Again.
 
Old 10-19-2012, 04:04 AM   #5
PrayingMantis
LQ Newbie
 
Registered: Nov 2011
Distribution: WindRiver, RedHat
Posts: 17

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
I don't know anything about CF, but you'd better look real close at your mount options. And your filesystem options - check out the manpage for tune2fs.
As for fsck - there is always the possibly it is going to munge data; it's designed to ensure the consistency of filesystems (metadata), not the contents there-in. Most of the time most of us might be lucky, but you can never be sure. Short answer is I never trust the filesystem after something like you are seeing - I reformat it and restore in-toto.
Hi Syg,

Thank you for replying.

I mount the Compact Flash using (MS_MANDLOCK | MS_NOATIME | MS_NODIRATIME), on my board.

The mount is done by a linuxrc script (in initrd) during boot, and the CF is mounted as /var on my board.

Do you think reflashing is the only option left, to recover from this error?

In the meanwhile I will read the man pages for tune2fs.

Thanks again.
 
Old 10-20-2012, 04:14 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,203

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
I would mkfs without question. Maybe you'll have to look at running without a journal - can be done on ext3, but ext4 might be a better option these days.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Read Only File System? Can't read superblock! haughjd Linux - Software 4 01-15-2008 08:27 AM
web server (fedora core 5) became read-only file system after i upload a file nggs8411 Linux - Server 1 03-26-2007 09:23 AM
How to read .chm file in fedora, can't mount ntfs file system ishti_du Linux - Newbie 12 03-06-2007 03:27 AM
'Read-only file system' when untar a tar.bz2 file yinglcs Linux - General 1 02-18-2006 09:12 PM
Change from Read only to Read Write File System? justiceisblind Linux - Newbie 3 03-03-2002 07:23 PM


All times are GMT -5. The time now is 05:37 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration