February 5th, 2017, 07:16 AM
I'm working on the TS-7553.
After having stability issues with the XNAND flash, I recently moved all (most) writing to the SD-Card, syslogd and a simple DB implemented in a file.
At some point the writing fails and the SD-Card, after reset, is remounted READ-ONLY.
After reset I got the following:
[ 1180.660000] FAT: Filesystem panic (dev nbd6)
[ 1180.660000] clusters badly computed (22 != 21)
[ 1180.660000] File system has been set read-only
Last edited by Rami Rosenbaum; February 5th, 2017 at 10:16 AM.
February 6th, 2017, 04:12 PM
It sounds like your file system has gotten corrupted. There are a lot of ways for this to happen, the most common reason being unexpected power loss in Linux. Filesystems, and databases in particular, keep a lot of their contents in RAM to help speed up various activities since fixed media is generally orders of magnitude slower to read or write. The trouble with this standard Linux practice is that most embedded systems can and do lose power without notice, causing anything that was cached in RAM to be lost - resulting in a corrupted filesystem due to partial and missing data when the system boots.
A possible short-term remedy is to run fsck on the media and see if it can bring the SD back to normal operation. I also notice it looks like you are using a FAT filesystem. This is not a well favored filesystem to Linux. I recommend switching to ext2 or ext3.
Michael Peters, Technologic Systems | voice: (480) 837-5200
16525 East Laser Drive | fax: (480) 837-5300
Fountain Hills, AZ 85268 | web: www.embeddedARM.com
February 7th, 2017, 07:25 AM
Thanks for the quick reply.
Indeed - the FS has gotten corrupted.
I agree with every word you wrote, and yes, we're using the default FAT32 FS.
Due to a change is design (XNAND failure), we started using SD-Cards, and have users push new cards to remote systems.
We failed to reformat the cards to ext3 on boot, in the TS-7553 (help will be appreciated), and doing it here and sending to remote systems is currently out of scope...
The interesting issue is that the corruption happens not in power-loss!!!
I'm running a simple test-app', which writes to syslog in a loop (syslog points to the SD-Card), and after some time (20 min - 4 hours) the FS crashes:
[ 44.530000] nbd6: Other side returned error (1)
[ 44.530000] end_request: I/O error, dev nbd6, sector 2
[ 44.530000] EXT3-fs: unable to read superblock