mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] automatic root-fs fsck at boottime with autorepair
@ 2015-01-22 11:11 Marc Michalewicz
  2015-01-22 15:59 ` Tim Sander
  0 siblings, 1 reply; 6+ messages in thread
From: Marc Michalewicz @ 2015-01-22 11:11 UTC (permalink / raw)
  To: ptxdist

Hello,

how can I configure an automatic filesystemcheck of the root filesystem at boottime ?

The rootf seems to be mounted via udev, in /etc/fstab i could not find anything.
So is it possible ? On one webpage I found "inserting fsck -Aa into /etc/init.d/rcS" before the "mount -a" but this applys only to filesystems which are mounted
via /etc/fstab I think.

I am using a quite old version ptxdist-2011.07.0.

Any help highly appreciated.

Marc


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] automatic root-fs fsck at boottime with autorepair
  2015-01-22 11:11 [ptxdist] automatic root-fs fsck at boottime with autorepair Marc Michalewicz
@ 2015-01-22 15:59 ` Tim Sander
  2015-01-26 13:51   ` Michael Olbrich
  0 siblings, 1 reply; 6+ messages in thread
From: Tim Sander @ 2015-01-22 15:59 UTC (permalink / raw)
  To: ptxdist

Hi Marc
> how can I configure an automatic filesystemcheck of the root filesystem at
> boottime ?
I think you need an initrd image for that?

Tim

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] automatic root-fs fsck at boottime with autorepair
  2015-01-22 15:59 ` Tim Sander
@ 2015-01-26 13:51   ` Michael Olbrich
  2015-04-21  9:58     ` Marc Michalewicz
  2015-04-22  9:14     ` Marc Michalewicz
  0 siblings, 2 replies; 6+ messages in thread
From: Michael Olbrich @ 2015-01-26 13:51 UTC (permalink / raw)
  To: ptxdist

On Thu, Jan 22, 2015 at 04:59:45PM +0100, Tim Sander wrote:
> > how can I configure an automatic filesystemcheck of the root filesystem at
> > boottime ?
> I think you need an initrd image for that?

No, the rootfs can be checked and fixed, if it is mounted read-only.
Systemd will do this automatically. For a busybox init you need to add the
check yourself.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] automatic root-fs fsck at boottime with autorepair
  2015-01-26 13:51   ` Michael Olbrich
@ 2015-04-21  9:58     ` Marc Michalewicz
  2015-06-25  6:10       ` Bruno Thomsen
  2015-04-22  9:14     ` Marc Michalewicz
  1 sibling, 1 reply; 6+ messages in thread
From: Marc Michalewicz @ 2015-04-21  9:58 UTC (permalink / raw)
  To: ptxdist

Hi,

thanks for your hint; the issue is still open and I have no clue what to do next
although your answer helped a little bit.

But how/where do I have to install the check ?
Can you detail your idea a little bit more ?

I tried "fsck.ext3 -p /dev/mmvblk0p1" on the line before "mount -a ..." in rcS but this 
did not work: 
"fsck.ext3: No such file or directory while trying to open /dev/mmcblk0p1"


Just fyi in the syslog I found these lines:

Apr 21 11:50:11 [..] [ 1.854104] EXT3-fs: barriers not enabled 
Apr 21 11:50:11 [..] [12.856129] kjournald starting.  Commit interval 5 seconds 
Apr 21 11:50:11 [..] [12.856223] EXT3-fs (mmcblk0p1): warning: maximal mount count reached, running e2fsck is recommended
Apr 21 11:50:11 [..] [13.091387] EXT3-fs (mmcblk0p1): using internal journal 
Apr 21 11:50:11 [..] [13.091398] EXT3-fs (mmcblk0p1): recovery complete 
Apr 21 11:50:11 [..] [13.093917] EXT3-fs (mmcblk0p1): mounted filesystem with ordered data mode

What does all this mean in detail - especially "recovery complete" ?
so another question would be: do you think a (automatic) fsck is needed at all ?
We just encountered an issue in a mysqld-logfile upon an unexpected power-off but 
this was actually not an issue of the filesystem. Anyway I thought a fsck might be helpful sometimes.

Thanks for any help,

Marc


On Mon, 26 Jan 2015, Michael Olbrich wrote:

> On Thu, Jan 22, 2015 at 04:59:45PM +0100, Tim Sander wrote:
>>> how can I configure an automatic filesystemcheck of the root filesystem at
>>> boottime ?
>> I think you need an initrd image for that?
>
> No, the rootfs can be checked and fixed, if it is mounted read-only.
> Systemd will do this automatically. For a busybox init you need to add the
> check yourself.
>
> Michael
>
> -- 
> Pengutronix e.K.                           |                             |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
>
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
>

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] automatic root-fs fsck at boottime with autorepair
  2015-01-26 13:51   ` Michael Olbrich
  2015-04-21  9:58     ` Marc Michalewicz
@ 2015-04-22  9:14     ` Marc Michalewicz
  1 sibling, 0 replies; 6+ messages in thread
From: Marc Michalewicz @ 2015-04-22  9:14 UTC (permalink / raw)
  To: ptxdist

[-- Attachment #1: Type: text/plain, Size: 2261 bytes --]

Hi,

thanks for your hint; the issue is still open and I have no clue what to do next
although your answer helped a little bit.

But how or where do I have to install the check ?
Could you please detail your idea a little bit more ?

I tried "fsck.ext3 -p /dev/mmvblk0p1" on the line before "mount -a ..." in 
rcS but this did not work:

=> "fsck.ext3: No such file or directory while trying to open /dev/mmcblk0p1"

Just fyi in the syslog I found these lines:

Apr 21 11:50:11 [..] [ 1.854104] EXT3-fs: barriers not enabled 
Apr 21 11:50:11 [..] [12.856129] kjournald starting.  Commit interval 5 seconds 
Apr 21 11:50:11 [..] [12.856223] EXT3-fs (mmcblk0p1): warning: maximal mount count reached, running e2fsck is recommended
Apr 21 11:50:11 [..] [13.091387] EXT3-fs (mmcblk0p1): using internal journal 
Apr 21 11:50:11 [..] [13.091398] EXT3-fs (mmcblk0p1): recovery complete 
Apr 21 11:50:11 [..] [13.093917] EXT3-fs (mmcblk0p1): mounted filesystem with ordered data mode

What does all this mean in detail - especially "recovery complete" ?

Another question in this context: do you think a (automatic) fsck is needed at all with ext3 ?

Thanks for any help,

Marc


-- 
Wir feiern das 10-jährige Jubiläum / We celebrate the 10th anniversary

Railtec Systems GmbH
Marc Michalewicz
Sonnenbergstrasse 19
CH-6052 Hergiswil

Tel: +41 41 632 5531
Fax: +41 41 632 5539

www.railtec-systems.ch


On Mon, 26 Jan 2015, Michael Olbrich wrote:

> On Thu, Jan 22, 2015 at 04:59:45PM +0100, Tim Sander wrote:
>>> how can I configure an automatic filesystemcheck of the root filesystem at
>>> boottime ?
>> I think you need an initrd image for that?
>
> No, the rootfs can be checked and fixed, if it is mounted read-only.
> Systemd will do this automatically. For a busybox init you need to add the
> check yourself.
>
> Michael
>
> -- 
> Pengutronix e.K.                           |                             |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
>
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
>

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] automatic root-fs fsck at boottime with autorepair
  2015-04-21  9:58     ` Marc Michalewicz
@ 2015-06-25  6:10       ` Bruno Thomsen
  0 siblings, 0 replies; 6+ messages in thread
From: Bruno Thomsen @ 2015-06-25  6:10 UTC (permalink / raw)
  To: ptxdist


Hi Marc,


> Just fyi in the syslog I found these lines:
>
> Apr 21 11:50:11 [..] [ 1.854104] EXT3-fs: barriers not enabled 
> Apr 21 11:50:11 [..] [12.856129] kjournald starting.  Commit interval 5 seconds 
> Apr 21 11:50:11 [..] [12.856223] EXT3-fs (mmcblk0p1): warning: maximal mount count reached, running e2fsck is recommended
> Apr 21 11:50:11 [..] [13.091387] EXT3-fs (mmcblk0p1): using internal journal 
> Apr 21 11:50:11 [..] [13.091398] EXT3-fs (mmcblk0p1): recovery complete 
> Apr 21 11:50:11 [..] [13.093917] EXT3-fs (mmcblk0p1): mounted filesystem with ordered data mode
>
> We just encountered an issue in a mysqld-logfile upon an unexpected power-off but 
> this was actually not an issue of the filesystem. Anyway I thought a fsck might be helpful sometimes.

You are using the ext3 filesystem in a unsafe manner (default) that can cause data corruption.
Enable barriers and change data mode to journal. The downside to safety is lower R/W performance.

/Bruno

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-06-25  4:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-22 11:11 [ptxdist] automatic root-fs fsck at boottime with autorepair Marc Michalewicz
2015-01-22 15:59 ` Tim Sander
2015-01-26 13:51   ` Michael Olbrich
2015-04-21  9:58     ` Marc Michalewicz
2015-06-25  6:10       ` Bruno Thomsen
2015-04-22  9:14     ` Marc Michalewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox