self-administered fsck

Discussion about U-Boot and the kernel.

self-administered fsck

Postby garyj » Mon Nov 07, 2011 4:52 pm

Judging from posts[1], it is currently impossible to fsck a root drive booted from u-boot (you must fsck the drive by physically mounting it from another box, or by booting off of usb first, right?).

Is this how it is supposed to be? Are there any viable workarounds? For example, having a small ro root partition and then doing fsck on a secondary mounted partition?

I ask because I am deploying a number of goflex homes to remote locations, and won't be able to physically fsck them when they need it.

Thanks,
Gary

[1] viewtopic.php?f=29&t=1374&p=7938&hilit=fsck#p7938 , viewtopic.php?f=18&t=1476&p=8366&hilit=fsck#p8366
garyj
 
Posts: 7
Joined: Fri Aug 19, 2011 6:17 pm

Re: self-administered fsck

Postby hydro » Tue Nov 08, 2011 10:54 am

I usually don't check filesystems on my DockStar, but I tried to make it run fsck at boot time now.
Before doing so dmesg reported (twice, if I remember correctly)
$this->bbcode_second_pass_code('', '
EXT4-fs (sdc2): warning: maximal mount count reached, running e2fsck is recommended
')
tune2fs -l /dev/sdc2
$this->bbcode_second_pass_code('', '
Filesystem created: Tue Mar 1 16:07:19 2011
Last mount time: Thu Jan 1 01:00:08 1970
Last write time: Thu Jan 1 01:00:04 1970
Mount count: 35
Maximum mount count: 27
Last checked: Tue Oct 4 16:13:00 2011
')
So I changed the fstab for the root partition to
$this->bbcode_second_pass_code('', '
LABEL=root / ext4 defaults,noatime,nodiratime 0 1
')
and rebooted. Now dmesg still claims (only once)
$this->bbcode_second_pass_code('', '
EXT4-fs (sdc2): warning: maximal mount count reached, running e2fsck is recommended
')
But mount count has changed
$this->bbcode_second_pass_code('', '
Filesystem created: Tue Mar 1 16:07:19 2011
Last mount time: Thu Jan 1 01:00:13 1970
Last write time: Thu Jan 1 01:00:09 1970
Mount count: 1
Maximum mount count: 27
Last checked: Tue Oct 4 16:13:00 2011
')
So I assume a filesystem check was executed. The last checked date (made on another box) remains unchanged because at the time of fsck running openntpd wasn't started yet. After rebooting one more time the "maximal mount" error in dmesg was gone, too. Seems to be caused by the root partition being mounted twice on every reboot:
$this->bbcode_second_pass_code('', '
Filesystem created: Tue Mar 1 16:07:19 2011
Last mount time: Thu Jan 1 01:00:08 1970
Last write time: Thu Jan 1 01:00:05 1970
Mount count: 3
Maximum mount count: 27
Last checked: Tue Oct 4 16:13:00 2011
')
VDR on DockStar / Pogoplug E02: http://linux.bplaced.net/
hydro
 
Posts: 210
Joined: Wed Jun 15, 2011 2:03 pm
Location: Germany


Return to U-Boot/Kernel

Who is online

Users browsing this forum: No registered users and 11 guests