• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Root File System Data Corruption  (Read 2680 times)
restamp
Global Moderator
Sr. Member
*****

Karma: 4
Posts: 273


View Profile
« on: January 17, 2011, 11:05:05 PM »

I'm not sure if this is a software/kernel issue, a hardware issue, or even a peripheral device issue, but I've noticed that on my SheevaPlug, after running a while (many days), Unix will not boot cleanly.  Instead, I get dumped into single user mode and am forced to fsck the file system manually, and there is often significant corruption found.  I'm running an old Ubuntu 9.04 load on an SDcard with an ext2 file system and cbxbiker61's kernels (several of them, it doesn't seem to matter which one).  While running, the system is very stable, but when I boot -- regardless of whether it is a controlled 'shutdown -r now' boot or a power fail restart -- it rarely comes up cleanly the first time.  I don't think this is a one-of-a-kind problem, because I have also noticed some corruption, albeit less severe, on my Dockstar system running Debian Squeeze (root fs there is ext3 on a HD).

Here's an oddity I have observed on the SheevaPlug:  If I run
Code:
# sync; tune2fs -l /dev/mmcblk0p1 | grep state
I always see a 'not clean' state, whereas if I run this on my Ubuntu desktop's root fs, it always shows 'clean'.

Anyone else seeing a problem with file system corruption?  Any ideas?
Logged

cbxbiker61
Global Moderator
Sr. Member
*****

Karma: 38
Posts: 497


View Profile
« Reply #1 on: January 17, 2011, 11:54:05 PM »

Anyone else seeing a problem with file system corruption?  Any ideas?

If I'm not mistaken (It was quite a while ago that I ran into a similar situation) it may be caused by the filesystem not getting unmounted properly due to the filesystem type not being specified in the fstab.  So what I did was to specify the filesytem type and I haven't had problems since.

/dev/mmcblk0p1 / ext2 rw,noatime 1 1

I think the fstab used to have:

rootfs / rootfs rw 0 0

Maybe you could look into it a bit, but I think the shutdown scripts need the filesystem type or they don't unmount properly.
Logged

restamp
Global Moderator
Sr. Member
*****

Karma: 4
Posts: 273


View Profile
« Reply #2 on: January 18, 2011, 12:32:08 AM »

Thanks cbxbiker61.  That seems to have resolved at least half the problem.  You were quite correct.  I had (leftover from day 1)
Code:
rootfs / rootfs rw,relatime,errors=remount-ro 0 1
in /etc/fstab.  I changed it to
Code:
/dev/mmcblk0p1 / ext2 rw,relatime,errors=remount-ro 0 1
and rebooted after 37 days of up-time.  The system rebooted cleanly which it almost assuredly would not have done prior to this change.

I'm still seeing the 'not clean' indicator from tune2fs, though, so I'm left wondering how it will respond to a power fail restart.  I'll have to give that a try at a later date.  Perhaps the 'clean' vs. 'not clean' is a side effect of ext2 vs. ext3, as all my other root file systems are ext3.

In any event, on the basis of one test, at least clean reboots appear to work now, and that's a major hurdle.  Thanks again!
Logged

Pages: [1]
Print
Jump to: