Kulim13 / alt-f

Automatically exported from code.google.com/p/alt-f
0 stars 0 forks source link

md0 is always checked at reboot #99

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. boot

What is the expected output? What do you see instead?
I expect /mnt/md0 to be mounted.

I see that it's being checked (from the status screen) and /mnt/md0 is empty.

What Alt-F version are you using? Have you flashed it?
Alt-F 0.1RC2

What is the box hardware revision level? A1, B1 or C1? (look at the label
at the box bottom)
B1

What is your disk configuration? Standard, RAID (what level)...
RAID Level 0, two 2tb drives, migrated from D-Link firmware 1.09.

What operating system are you using on your computer? Using what browser?
Chrome on Windows 7

Please provide any additional information below.

Here is the content of /var/log/boot.log:

Jun 22 23:39:20 syslogd started: BusyBox v1.19.3
Jun 22 23:39:21 root: fsck 1.41.14 (22-Dec-2010) fsck.minix: BusyBox v1.19.3 
(2012-02-21 15:37:53 WET) /dev/mtdblock0 is clean, check is skipped
Jun 23 00:39:21 root: FIXME: Waiting 3 sec for kernel enumeration to finish...
Jun 23 00:39:24 root: FIXME: stop waiting.
Jun 23 00:39:42 hot: Start fscking sda4
Jun 23 00:39:42 hot: Finish fscking sda4: fsck 1.41.14 (22-Dec-2010) /dev/sda4: 
clean, 271/128520 files, 302841/514080 blocks
Jun 23 00:39:43 hot: Start fscking md0
Jun 23 00:39:44 hot: sdb4 waiting to be fscked
Jun 23 00:39:44 root: IP from flash-defaults
Jun 23 00:39:44 udhcpc: Deconfiguring eth0
Jun 23 00:39:47 udhcpc: udhcpc environment:
Jun 23 00:39:47 udhcpc:    opt58=0000a8c0
Jun 23 00:39:47 udhcpc:    router=192.168.1.1
Jun 23 00:39:47 udhcpc:    subnet=255.255.255.0
Jun 23 00:39:47 udhcpc:    opt59=00012750
Jun 23 00:39:47 udhcpc:    METHOD=dhcp
Jun 23 00:39:47 udhcpc:    MODE=start
Jun 23 00:39:47 udhcpc:    interface=eth0
Jun 23 00:39:47 udhcpc:    dns=208.67.222.222
Jun 23 00:39:47 udhcpc:    208.67.220.220
Jun 23 00:39:47 udhcpc:    IF_MTU=1500
Jun 23 00:39:47 udhcpc:    ADDRFAM=inet
Jun 23 00:39:47 udhcpc:    serverid=192.168.1.1
Jun 23 00:39:47 udhcpc:    IF_CLIENT=udhcpc
Jun 23 00:39:47 udhcpc:    PATH=/sbin:/usr/sbin:/bin:/usr/bin
Jun 23 00:39:47 udhcpc:    ip=192.168.1.48
Jun 23 00:39:47 udhcpc:    lease=86400
Jun 23 00:39:47 udhcpc:    mask=24
Jun 23 00:39:47 udhcpc:    IFACE=eth0
Jun 23 00:39:47 udhcpc:    PWD=/
Jun 23 00:39:47 udhcpc:    opt53=05
Jun 23 00:39:48 udhcpc: Updating /etc/hosts
Jun 23 00:39:48 udhcpc: Updating /etc/httpd.conf
Jun 23 00:39:48 udhcpc: Updating /etc/samba/smb.conf
Jun 23 00:39:48 udhcpc: Updating default route
Jun 23 00:39:48 udhcpc: Updating /etc/resolv.conf
Jun 23 00:39:48 udhcpc: adding dns 208.67.222.222
Jun 23 00:39:48 udhcpc: adding dns 208.67.220.220
Jun 23 00:39:48 syslogd exiting

Original issue reported on code.google.com by ash...@elrefaey.com on 22 Jun 2012 at 11:56

Attachments:

GoogleCodeExporter commented 9 years ago
And this is what I see after the disk check has completed (it took a good 
couple of hours).
The disk is mounted and I can see all the files but it's read-only.
Your help is much appreciated.

Original comment by ash...@elrefaey.com on 23 Jun 2012 at 12:03

Attachments:

GoogleCodeExporter commented 9 years ago
-Is Alt-F flashed?
-how do you reboot/powerdow the box?
-has a power-cut happened?
-go to disk utilities and submit the number of days/mounts for automatic fsck

Regarding the RO issue, search the Alt-F forum (or closed  issues) for fsck and 
ro, this issue has already been discussed.

Original comment by Joao.fs....@gmail.com on 23 Jun 2012 at 1:47

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thanks for the prompt reply.

- Yes Alt-F is flashed (i.e. running INSTEAD OF D-Link firmware.

- I reboot either using Alt-F or using the reboot command in ssh.

- No power-cut happened.

- Number of days/mounts for automatic fsck is shown in last attached file 
(screenshot4.jpg). It is showing as: -319 mounts or -603 days

- RO issue is not a problem, I've updated /etc/fstab or can unmount and 
re-mount as RW. The main issue is that fsck wants to check the disk every time 
I boot the box.

Original comment by ash...@elrefaey.com on 23 Jun 2012 at 2:05

GoogleCodeExporter commented 9 years ago
I've had a look at the output of "tune2fs -l /dev/md0" and it appears the mount 
count has not been reset for a while, even after fsck was completed (assumingly 
successfully) a few times!.

tune2fs 1.41.14 (22-Dec-2010)
Filesystem volume name:   <none>
Last mounted on:          <not available>
Filesystem UUID:          2305ca66-24be-4fcf-8874-ad99540a43c1
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:              243933184
Block count:              975703712
Reserved block count:     0
Free blocks:              288181899
Free inodes:              243787288
First block:              0
Block size:               4096
Fragment size:            4096
Reserved GDT blocks:      791
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8192
Inode blocks per group:   512
Filesystem created:       Tue May  4 13:08:24 2010
Last mount time:          Sat Jun 23 15:15:28 2012
Last write time:          Sat Jun 23 15:15:28 2012
Mount count:              380
Maximum mount count:      60
Last checked:             Tue May  4 13:08:24 2010
Check interval:           15379200 (5 months, 4 weeks)
Next check after:         Fri Oct 29 13:08:24 2010
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:      caef0c46-c703-4457-846b-ac6a715841f6
Journal backup:           inode blocks

Original comment by ash...@elrefaey.com on 23 Jun 2012 at 2:42

GoogleCodeExporter commented 9 years ago
I have unmounted and re-mounted /dev/md0 and the mount count was increased by 1 
as expected.

Not the trick is to reset it to zero.

Any idea? - I've asked my friend google but he doesn't seem to know ;-)

Original comment by ash...@elrefaey.com on 23 Jun 2012 at 2:46

GoogleCodeExporter commented 9 years ago
I think I know what the problem is now. It appears that my file system has 
never been checked and that because of previous unclean shutdowns, it contains 
errors and needs repairing. Perhaps the automatic check does not repair file 
system errors when found.

I'm now running "fsck -V -p /dev/md0" to automatically repair errors and 
hopefully this will result in a successful ending for fsck, which will 
hopefully reset the mount count.

I will keep updating the issue as I make progress.

Original comment by ash...@elrefaey.com on 23 Jun 2012 at 2:55

GoogleCodeExporter commented 9 years ago
Automatic fsck will not work, that's what is done on a normal check. When that 
fails, fs is mounted ro. You have to force check.

Reseting check count: Disk->utilities

Original comment by Joao.fs....@gmail.com on 23 Jun 2012 at 4:33

GoogleCodeExporter commented 9 years ago
unrelated: your 2nd/3th screen shots show that SMART is disable. Did you did it 
deliberately?

Original comment by Joao.fs....@gmail.com on 23 Jun 2012 at 4:36

GoogleCodeExporter commented 9 years ago
No I didn't disable SMART deliberately - I noticed it's like that.

Do you know how I can enable it please?

Original comment by ash...@elrefaey.com on 23 Jun 2012 at 4:59

GoogleCodeExporter commented 9 years ago
Regarding comment #8, fsck seems to force check when run interactively.
Please see attached screenshot5.jpg.

Original comment by ash...@elrefaey.com on 23 Jun 2012 at 5:01

Attachments:

GoogleCodeExporter commented 9 years ago
Regarding comment #8 again, I can't find any option to reset check count in 
Disk -> Utilities.

There is something in Disk --> Filesystems "Set mounted filesystems to be 
checked every".

1. The two values have been changed to 1000.
2. I ran "tune2fs -l /dev/md0" which showed this:
tune2fs 1.41.14 (22-Dec-2010)
Filesystem volume name:   <none>
Last mounted on:          <not available>
Filesystem UUID:          2305ca66-24be-4fcf-8874-ad99540a43c1
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype 
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:              243933184
Block count:              975703712
Reserved block count:     0
Free blocks:              288181899
Free inodes:              243787288
First block:              0
Block size:               4096
Fragment size:            4096
Reserved GDT blocks:      791
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8192
Inode blocks per group:   512
Filesystem created:       Tue May  4 13:08:24 2010
Last mount time:          Sat Jun 23 18:27:07 2012
Last write time:          Sat Jun 23 18:32:58 2012
Mount count:              382
Maximum mount count:      996
Last checked:             Tue May  4 13:08:24 2010
Check interval:           86054400 (33 months, 6 days)
Next check after:         Thu Jan 24 12:08:24 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:      caef0c46-c703-4457-846b-ac6a715841f6
Journal backup:           inode blocks

3. When I rebooted the box, it IS checking md0 again!!!!

By the way, when I ran fsck interactively, it stopped due to a problem reading 
from one of the disks and asked me to run it MANUALLY without the -p option.

Original comment by ash...@elrefaey.com on 23 Jun 2012 at 5:47

GoogleCodeExporter commented 9 years ago
https://groups.google.com/forum/m/?fromgroups#!topic/alt-f/6vkvAl9z2nQ

Original comment by Joao.fs....@gmail.com on 23 Jun 2012 at 6:02

GoogleCodeExporter commented 9 years ago
Thanks very much. I will try "fsck -fyC /dev/md0" and see how it goes ;-)

Original comment by ash...@elrefaey.com on 23 Jun 2012 at 6:16

GoogleCodeExporter commented 9 years ago
It took a few hours but worked like a charm!
The mount count is finally zero :-)

When I rebooted, md0 was checked again (!!!!) but it only took a few seconds to 
finish so all good now.

Thanks very much for your help again.

Original comment by ash...@elrefaey.com on 23 Jun 2012 at 11:26

GoogleCodeExporter commented 9 years ago
> When I rebooted, md0 was checked again (!!!!)

fsck always runs at boot/mount time; if the filesystem is marked as clean and 
the programmed number of mount/days count have not elapsed, it just quits, 
otherwise a real fsck is performed.

If a filesystem issue develops (such as a bug) and even so the filesystem is 
properly unmounted, the filesystem is marked as clean and fsck will not notice 
the issue.

So, do you really want your filesystem to remain in the limbo during 1000 
days/mounts? Not a wise decision ;-)

As for the SMART issue, it is better to open a new issue (such as "enable 
automatic/on-demand SMART enable")

Closed, as this was an user issue, not Alt-F and issue.
Nevertheless, a "ForceFix" option was added under Filesystem Operations for the 
next release, as this problem arises from time to time.

Original comment by whoami.j...@gmail.com on 25 Jun 2012 at 2:07