fsck.ubifs?

Artem Bityutskiy dedekind1 at gmail.com
Tue Feb 9 06:52:04 EST 2010


On Mon, 2010-02-01 at 11:17 -0500, Jon Ringle wrote:
> I have my ubi0 partitioned with two static volumes: kernel and
> squashfs, and one dynamic volume: ubifs.

OK.

> One of the tests that I do to test for recovery from corruption is
> perform a flash_erase on random blocks on the mtd device that ubi0 is
> on and reboot. During bootup, I am able to easily detect corruption in
> the static ubi volumes with the crc checksum and these images are
> automatically reflashed.

OK.

> However, if there is corruption in the ubifs, quite often ubifs mounts
> successfully and only when trying to access files are problems being
> reported. Is there any kind of fsck.ubifs type of utility that can be
> used to help with this problem?

Unfortunately we did not implement any fsck.ubifs.

In your situation, the easiest think to do is to try to read all files
in the FS and make sure they can be read.

In general, UBIFS is very recoverable FS, and it can recover from many
errors nicely, so that only minimum of data is lost. See the
"recoverability" part here:

http://www.linux-mtd.infradead.org/doc/ubifs.html#L_overview

But we did not implement any utility which could do this.

And I think it is much much easier to doe the recovery in the kernel.
Probably some mount option like 'recover' could be introduced to do
this. But again, we did not implement this.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)




More information about the linux-mtd mailing list