* [Ubifs] Reboot -> "recovery needed"?
@ 2011-06-25 11:34 Gilles
2011-06-28 7:33 ` Artem Bityutskiy
0 siblings, 1 reply; 11+ messages in thread
From: Gilles @ 2011-06-25 11:34 UTC (permalink / raw)
To: linux-mtd
Hello
The root filesystem lives in a partition on a NAND, and I noticed
that after running "reboot", at the next boot, I get this message:
===============
...
UBIFS: recovery needed
UBIFS: recovery completed
UBIFS: mounted UBI device 0, volume 0, name "rootfs"
UBIFS: file system size: 251596800 bytes (245700 KiB, 239 MiB, 1950
LEBs)
UBIFS: journal size: 9033728 bytes (8822 KiB, 8 MiB, 71 LEBs)
UBIFS: media format: w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root: 0 bytes (0 KiB)
VFS: Mounted root (ubifs filesystem) on device 0:10.
===============
Is this the way Ubifs works, or should I run a command prior to
"reboot"?
Thank you.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Ubifs] Reboot -> "recovery needed"?
2011-06-25 11:34 [Ubifs] Reboot -> "recovery needed"? Gilles
@ 2011-06-28 7:33 ` Artem Bityutskiy
2011-06-28 11:19 ` Gilles
0 siblings, 1 reply; 11+ messages in thread
From: Artem Bityutskiy @ 2011-06-28 7:33 UTC (permalink / raw)
To: Gilles; +Cc: linux-mtd
On Sat, 2011-06-25 at 13:34 +0200, Gilles wrote:
> Hello
>
> The root filesystem lives in a partition on a NAND, and I noticed
> that after running "reboot", at the next boot, I get this message:
>
> ===============
> ...
> UBIFS: recovery needed
> UBIFS: recovery completed
> UBIFS: mounted UBI device 0, volume 0, name "rootfs"
> UBIFS: file system size: 251596800 bytes (245700 KiB, 239 MiB, 1950
> LEBs)
> UBIFS: journal size: 9033728 bytes (8822 KiB, 8 MiB, 71 LEBs)
> UBIFS: media format: w4/r0 (latest is w4/r0)
> UBIFS: default compressor: lzo
> UBIFS: reserved for root: 0 bytes (0 KiB)
> VFS: Mounted root (ubifs filesystem) on device 0:10.
> ===============
>
> Is this the way Ubifs works, or should I run a command prior to
> "reboot"?
Your reboot command does not unmount the file-system, so from UBIFS's
point of view you do unclean reboot, and UBIFS needs to do recovery.
--
Best Regards,
Artem Bityutskiy
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Ubifs] Reboot -> "recovery needed"?
2011-06-28 7:33 ` Artem Bityutskiy
@ 2011-06-28 11:19 ` Gilles
2011-06-28 11:22 ` Artem Bityutskiy
0 siblings, 1 reply; 11+ messages in thread
From: Gilles @ 2011-06-28 11:19 UTC (permalink / raw)
To: linux-mtd
On Tue, 28 Jun 2011 10:33:34 +0300, Artem Bityutskiy
<dedekind1@gmail.com> wrote:
>Your reboot command does not unmount the file-system, so from UBIFS's
>point of view you do unclean reboot, and UBIFS needs to do recovery.
Thanks for the info. I'll see if I can edit the source code to
"reboot" to unmount the root filesystem, or replace "reboot" with
another application or script.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Ubifs] Reboot -> "recovery needed"?
2011-06-28 11:19 ` Gilles
@ 2011-06-28 11:22 ` Artem Bityutskiy
2011-06-28 11:25 ` Gilles
0 siblings, 1 reply; 11+ messages in thread
From: Artem Bityutskiy @ 2011-06-28 11:22 UTC (permalink / raw)
To: Gilles; +Cc: linux-mtd
On Tue, 2011-06-28 at 13:19 +0200, Gilles wrote:
> On Tue, 28 Jun 2011 10:33:34 +0300, Artem Bityutskiy
> <dedekind1@gmail.com> wrote:
> >Your reboot command does not unmount the file-system, so from UBIFS's
> >point of view you do unclean reboot, and UBIFS needs to do recovery.
>
> Thanks for the info. I'll see if I can edit the source code to
> "reboot" to unmount the root filesystem, or replace "reboot" with
> another application or script.
I think it may be enough to re-mount read-only, and probably it is
impossible to unmount in many cases. But I am not 100% sure.
--
Best Regards,
Artem Bityutskiy
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Ubifs] Reboot -> "recovery needed"?
2011-06-28 11:22 ` Artem Bityutskiy
@ 2011-06-28 11:25 ` Gilles
2011-06-28 11:38 ` Artem Bityutskiy
0 siblings, 1 reply; 11+ messages in thread
From: Gilles @ 2011-06-28 11:25 UTC (permalink / raw)
To: linux-mtd
On Tue, 28 Jun 2011 14:22:38 +0300, Artem Bityutskiy
<dedekind1@gmail.com> wrote:
>> Thanks for the info. I'll see if I can edit the source code to
>> "reboot" to unmount the root filesystem, or replace "reboot" with
>> another application or script.
>
>I think it may be enough to re-mount read-only, and probably it is
>impossible to unmount in many cases. But I am not 100% sure.
So I could rename "reboot" something else, then write a shell script
named "reboot" that will first remount the Ubifs partition ro, and
then call the real "reboot"?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Ubifs] Reboot -> "recovery needed"?
2011-06-28 11:25 ` Gilles
@ 2011-06-28 11:38 ` Artem Bityutskiy
2011-06-28 11:50 ` Gilles
0 siblings, 1 reply; 11+ messages in thread
From: Artem Bityutskiy @ 2011-06-28 11:38 UTC (permalink / raw)
To: Gilles; +Cc: linux-mtd
On Tue, 2011-06-28 at 13:25 +0200, Gilles wrote:
> On Tue, 28 Jun 2011 14:22:38 +0300, Artem Bityutskiy
> <dedekind1@gmail.com> wrote:
> >> Thanks for the info. I'll see if I can edit the source code to
> >> "reboot" to unmount the root filesystem, or replace "reboot" with
> >> another application or script.
> >
> >I think it may be enough to re-mount read-only, and probably it is
> >impossible to unmount in many cases. But I am not 100% sure.
>
> So I could rename "reboot" something else, then write a shell script
> named "reboot" that will first remount the Ubifs partition ro, and
> then call the real "reboot"?
I think it is not that simple - if there is any file open for writing -
remount will fail with EBUSY. So you'd first need to shut down apps,
then do that. You should probably refer standard boot scripts to see
what they do.
On the other hand, as long as your reboot command runs sync, it is
harmless to not unmount UBIFS.
--
Best Regards,
Artem Bityutskiy
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Ubifs] Reboot -> "recovery needed"?
2011-06-28 11:38 ` Artem Bityutskiy
@ 2011-06-28 11:50 ` Gilles
2011-06-28 12:14 ` Artem Bityutskiy
0 siblings, 1 reply; 11+ messages in thread
From: Gilles @ 2011-06-28 11:50 UTC (permalink / raw)
To: linux-mtd
On Tue, 28 Jun 2011 14:38:04 +0300, Artem Bityutskiy
<dedekind1@gmail.com> wrote:
>I think it is not that simple - if there is any file open for writing -
>remount will fail with EBUSY. So you'd first need to shut down apps,
>then do that. You should probably refer standard boot scripts to see
>what they do.
>
>On the other hand, as long as your reboot command runs sync, it is
>harmless to not unmount UBIFS.
It looks like it does:
There a several files returned when searching with "reboot*", but it
looks like /usr/src/uClinux-dist-2010R1-RC5/user/sysutils/reboot.c is
the one:
http://blackfin.uclinux.org/gf/project/uclinux-dist/scmsvn/?action=browse&path=%2Ftrunk%2Fuser%2Fsysutils%2Freboot.c&view=markup
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Ubifs] Reboot -> "recovery needed"?
2011-06-28 11:50 ` Gilles
@ 2011-06-28 12:14 ` Artem Bityutskiy
2011-06-28 12:33 ` Gilles
0 siblings, 1 reply; 11+ messages in thread
From: Artem Bityutskiy @ 2011-06-28 12:14 UTC (permalink / raw)
To: Gilles; +Cc: linux-mtd
On Tue, 2011-06-28 at 13:50 +0200, Gilles wrote:
> On Tue, 28 Jun 2011 14:38:04 +0300, Artem Bityutskiy
> <dedekind1@gmail.com> wrote:
> >I think it is not that simple - if there is any file open for writing -
> >remount will fail with EBUSY. So you'd first need to shut down apps,
> >then do that. You should probably refer standard boot scripts to see
> >what they do.
> >
> >On the other hand, as long as your reboot command runs sync, it is
> >harmless to not unmount UBIFS.
>
> It looks like it does:
>
> There a several files returned when searching with "reboot*", but it
> looks like /usr/src/uClinux-dist-2010R1-RC5/user/sysutils/reboot.c is
> the one:
>
> http://blackfin.uclinux.org/gf/project/uclinux-dist/scmsvn/?action=browse&path=%2Ftrunk%2Fuser%2Fsysutils%2Freboot.c&view=markup
Then you do not have to worry about UBIFS recovery - it will be quick
and will do almost nothing - just check that everything is all-right and
mark the master node as clean.
--
Best Regards,
Artem Bityutskiy
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Ubifs] Reboot -> "recovery needed"?
2011-06-28 12:14 ` Artem Bityutskiy
@ 2011-06-28 12:33 ` Gilles
2011-06-28 12:43 ` Artem Bityutskiy
0 siblings, 1 reply; 11+ messages in thread
From: Gilles @ 2011-06-28 12:33 UTC (permalink / raw)
To: linux-mtd
On Tue, 28 Jun 2011 15:14:27 +0300, Artem Bityutskiy
<dedekind1@gmail.com> wrote:
>Then you do not have to worry about UBIFS recovery - it will be quick
>and will do almost nothing - just check that everything is all-right and
>mark the master node as clean.
What is the command for this? Google says that it's part of the Ubifs
source code:
www.spinics.net/lists/stable-commits/msg11702.html
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Ubifs] Reboot -> "recovery needed"?
2011-06-28 12:33 ` Gilles
@ 2011-06-28 12:43 ` Artem Bityutskiy
2011-06-28 12:45 ` Gilles
0 siblings, 1 reply; 11+ messages in thread
From: Artem Bityutskiy @ 2011-06-28 12:43 UTC (permalink / raw)
To: Gilles; +Cc: linux-mtd
On Tue, 2011-06-28 at 14:33 +0200, Gilles wrote:
> On Tue, 28 Jun 2011 15:14:27 +0300, Artem Bityutskiy
> <dedekind1@gmail.com> wrote:
> >Then you do not have to worry about UBIFS recovery - it will be quick
> >and will do almost nothing - just check that everything is all-right and
> >mark the master node as clean.
>
> What is the command for this? Google says that it's part of the Ubifs
> source code:
>
> www.spinics.net/lists/stable-commits/msg11702.html
This all is done automatically by UBIFS, you do not have to worry. Just
make sure you sync before reboot.
--
Best Regards,
Artem Bityutskiy
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Ubifs] Reboot -> "recovery needed"?
2011-06-28 12:43 ` Artem Bityutskiy
@ 2011-06-28 12:45 ` Gilles
0 siblings, 0 replies; 11+ messages in thread
From: Gilles @ 2011-06-28 12:45 UTC (permalink / raw)
To: linux-mtd
On Tue, 28 Jun 2011 15:43:33 +0300, Artem Bityutskiy
<dedekind1@gmail.com> wrote:
>This all is done automatically by UBIFS, you do not have to worry. Just
>make sure you sync before reboot.
Ok, problem solved then. Thank you for your help.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2011-06-28 12:45 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-25 11:34 [Ubifs] Reboot -> "recovery needed"? Gilles
2011-06-28 7:33 ` Artem Bityutskiy
2011-06-28 11:19 ` Gilles
2011-06-28 11:22 ` Artem Bityutskiy
2011-06-28 11:25 ` Gilles
2011-06-28 11:38 ` Artem Bityutskiy
2011-06-28 11:50 ` Gilles
2011-06-28 12:14 ` Artem Bityutskiy
2011-06-28 12:33 ` Gilles
2011-06-28 12:43 ` Artem Bityutskiy
2011-06-28 12:45 ` Gilles
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox