UBIFS power-cut testing

Richard Weinberger richard.weinberger at gmail.com
Wed Mar 11 03:11:59 PDT 2015


On Wed, Mar 11, 2015 at 6:23 AM, Kurozaki m <kurozaki45 at gmail.com> wrote:
> I really need to do power-cut testing in my device but there is no
> documentation on how to do this, just references to integck and the
> debugfs tst_recovery file. Where can I find a guide on how to actually
> do power-cut testing for UBIFS?
>
> I have a couple of mtd partitions in my flash device, and one of them
> I use to store some critical files. The problem is that sometimes
> after power failure(I think) it gets corrupted(Master node gets
> corrupted) and I'm not able to recover. What I did is I created a
> backup volume in the same UBI device so that I have both a data and
> backup volume, the critical files are backed up and kept in sync by an
> init script and in case corruption occurs I recreate the data
> partition and recover the files.
>
> I want to be able to test that my script actually works by doing
> power-cut testing emulations, but I have no idea where to begin. I
> cross compiled integck for my device and set the corresponding
> environment variables, but when I run it all I see is:
>
> pid is 2907
>
> and then nothing happens.

To trigger a powercut UBIFS has a debufs knob called "tst_recovery".

HTH!

-- 
Thanks,
//richard



More information about the linux-mtd mailing list