All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: Johan Borkhuis <maillist@borkhuis.com>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: Re: UBIFS automatic recovery
Date: Fri, 13 May 2016 15:57:32 +0200	[thread overview]
Message-ID: <5735DD4C.4030409@nod.at> (raw)
In-Reply-To: <ca3ebf4848d4ed80b1f98b3677dc765e.squirrel@www.borkhuis.com>

Johan,

Am 13.05.2016 um 12:27 schrieb Johan Borkhuis:
>> This should not happen. Either the UBIFS is broken and not mountable
>> or it can recover.
>> Something else seems to interact here.
> 
> This was also what I was expecting, and why I was surprised when units
> started to recover.

Maybe a temporary issue with your NAND.

>>> When it fails it shows the following during a mount (also shown
>>> sometimes for LEB 3 and 6):
>>> UBIFS: recovery needed
>>> UBIFS error (pid 640): ubifs_recover_log_leb: unrecoverable log
>>> corruption
>>> in LEB 5
>>>
>>> Another UBIFS message I see during a failed mount is:
>>> UBIFS error (pid 637): ubifs_recover_master_node: dumping first master
>>> node
>>>
>>> As long the mount fails the same message is repeated.
>>
>> UBIFS must not break due to power cuts.
>> So, something else is broken.
>> Do both MTD and UBI tests pass?
> 
> You mean the kernel startup? Or some specific MTD/UBI test tools?
> On startup there is no difference in the console-output between a good and
> bad startup, so MTD and UBI are initialised correctly. The first sign is
> the fact that a mount fails.

In the kernel tree we have a set of tests, MTD tests.
See CONFIG_MTD_TESTS.
UBI tests are part of the mtd-utils source package.

>>> Or is there another way to fix/repair a broken partition without loosing
>>> the data that is stored on it?
>>
>> No. What you need is figuring out *why* UBIFS breaks while doing
>> power cuts. Both UBI and UBIFS are power cut aware by design.
>> In most cases UBIFS suffers from MTD problems. May it a faulty driver
>> or bad hardware...
> 
> We are using a Micon 2Mb flash chip and the kernel sources from TI. The
> output during boot:
> omap2-nand driver initializing
> NAND device: Manufacturer ID: 0x2c, Chip ID: 0xca (Micron )
> Creating 6 MTD partitions on "omap2-nand.0":

*maybe* a driver issue.
First of all you need to find out what exactly is broken.
i.e. analyze the contents of the NAND upon failure.

Thanks,
//richard

  reply	other threads:[~2016-05-13 13:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-13  8:47 UBIFS automatic recovery Johan Borkhuis
2016-05-13  9:11 ` Richard Weinberger
2016-05-13 10:27   ` Johan Borkhuis
2016-05-13 13:57     ` Richard Weinberger [this message]
2016-05-16  7:23   ` Iwo Mergler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5735DD4C.4030409@nod.at \
    --to=richard@nod.at \
    --cc=linux-mtd@lists.infradead.org \
    --cc=maillist@borkhuis.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.