View Single Post
Posts: 9 | Thanked: 4 times | Joined on Nov 2010 @ Italy
#8
Hello everyone,

I'd like to revive this thread to ask some info.
After the last update I received (busybox), I got a corrupted /home (mmcblk0p2). I get the same type of errors in dmesg:

Code:
Nokia-N900-42-11:~# dmesg | grep error
[    2.702301] onenand_bbt_wait: ecc error = 0x2222, controller error 0x2400
[   20.503662] EXT3-fs warning: mounting fs with errors, running e2fsck is recommended
[   27.489013] journal_bmap: journal block not found at offset 12 on mmcblk0p2
[   27.489044] Aborting journal on device mmcblk0p2.
[   27.499572] __journal_remove_journal_head: freeing b_committed_data
[   28.321105] ext3_abort called.
[   28.321136] EXT3-fs error (device mmcblk0p2): ext3_journal_start_sb: Detected aborted journal
[   28.321166] Remounting filesystem read-only

[   28.823242] EXT3-fs error (device mmcblk0p2): ext3_journal_start_sb: Detected aborted journal
The solution proposed in the last post didn't work. Here are the answers:

Code:
Nokia-N900-42-11:~# tune2fs -O ^has_journal /dev/mmcblk0p2
tune2fs 1.41.3.maemo0 (12-Oct-2008)
The needs_recovery flag is set.  Please run e2fsck before clearing
the has_journal flag.
Nokia-N900-42-11:~#

Nokia-N900-42-11:~# tune2fs -j /dev/mmcblk0p2
tune2fs 1.41.3.maemo0 (12-Oct-2008)
The filesystem already has a journal.
Nokia-N900-42-11:~#
I read somewhere I could get a fsck on boot. Here is the dumpe2fs:

Code:
Nokia-N900-42-11:~# dumpe2fs -h /dev/mmcblk0p2
dumpe2fs 1.41.3.maemo0 (12-Oct-2008)
Filesystem volume name:   RX-51_2009SE_1.2
Last mounted on:          <not available>
Filesystem UUID:          a5361279-079d-43dd-988e-dd73c7e61882
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery sparse_super large_file
Filesystem flags:         unsigned_directory_hash
Default mount options:    (none)
Filesystem state:         clean with errors
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              131072
Block count:              524288
Reserved block count:     26214
Free blocks:              384775
Free inodes:              105782
First block:              0
Block size:               4096
Fragment size:            4096
Reserved GDT blocks:      127
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8192
Inode blocks per group:   512
Filesystem created:       Thu Jan  1 01:00:02 1970
Last mount time:          Thu Sep  5 21:14:39 2013
Last write time:          Thu Sep  5 21:14:39 2013
Mount count:              75
Maximum mount count:      1
Last checked:             Tue Jul  2 09:04:03 2013
Check interval:           86400 (1 day)
Next check after:         Wed Jul  3 09:04:03 2013
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               256
Required extra isize:     28
Desired extra isize:      28
Journal inode:            8
Default directory hash:   half_md4
Directory Hash Seed:      56b9927d-a890-419f-92e3-d561bf20d9ed
Journal backup:           inode blocks
Journal size:             4112k

I set the check time with the following commands:

Code:
Nokia-N900-42-11:~# tune2fs -c 1 /dev/mmcblk0p2
tune2fs 1.41.3.maemo0 (12-Oct-2008)
Setting maximal mount count to 1
Nokia-N900-42-11:~#

Nokia-N900-42-11:~# tune2fs -i 1d /dev/mmcblk0p2
tune2fs 1.41.3.maemo0 (12-Oct-2008)
Setting interval between checks to 86400 seconds
Nokia-N900-42-11:~#
I restarted the device a number of time but the "Last checked" value does not change.

1rst question
What values should I use? Is the automatic fsck at boot even supposed to be performed on a corrupted partition?

2nd question
running a fsck on a mounted filesystem could break it:

Code:
Nokia-N900-42-11:~# fsck /dev/mmcblk0p2
fsck 1.41.3.maemo0 (12-Oct-2008)
e2fsck 1.41.3.maemo0 (12-Oct-2008)
/dev/mmcblk0p2 is mounted.

WARNING!!!  Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage.

Do you really want to continue (y/n)? no

check aborted.
Nokia-N900-42-11:~#
How would this happen? Is there any way to kill almost any process to prevent any write, and perform the fsck, albeit with risk?

Thank you!