linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* corrupted ubi after reboot while busy
@ 2008-03-27  7:05 Hamish Moffatt
  2008-03-27 13:39 ` Artem Bityutskiy
  0 siblings, 1 reply; 4+ messages in thread
From: Hamish Moffatt @ 2008-03-27  7:05 UTC (permalink / raw)
  To: linux-mtd

I'm trying UBI for the first time; I have the kernel 2.6.24 with UBI
backported from 2.6.25-rc7.

I created a static volume (on NAND) and wrote a JFFS2 image to it with 
ubiupdatevol. mount succeeded, but the image was built wrongly so the
jffs2 garbage collector thread to fix it. I then rebooted the system
while this was running (using a proper reboot, which succeeded).

After rebooting, I can't attach the UBI volume at all:

Jan  1 00:16:34 elaraboot user.err kernel: [  994.310000] UBI error: validate_vid_hdr: inconsistent VID header at PEB 664                         
Jan  1 00:16:34 elaraboot user.err kernel: [  994.320000] UBI error: cannot attach mtd7                                                           
Jan  1 00:16:34 elaraboot user.err kernel: [  994.320000] UBI error: cannot initialize UBI, error -22 

I don't understand how a corrupt volume can cause the whole UBI to be
unusable?

As an aside, is a static volume not read-only?

thanks
Hamish
-- 
Hamish Moffatt VK3SB <hamish@debian.org> <hamish@cloud.net.au>

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

* Re: corrupted ubi after reboot while busy
  2008-03-27  7:05 corrupted ubi after reboot while busy Hamish Moffatt
@ 2008-03-27 13:39 ` Artem Bityutskiy
  2008-03-28  0:05   ` Hamish Moffatt
  0 siblings, 1 reply; 4+ messages in thread
From: Artem Bityutskiy @ 2008-03-27 13:39 UTC (permalink / raw)
  To: Hamish Moffatt; +Cc: linux-mtd

Hi,

On Thu, 2008-03-27 at 18:05 +1100, Hamish Moffatt wrote:
> I'm trying UBI for the first time; I have the kernel 2.6.24 with UBI
> backported from 2.6.25-rc7.
> 
> I created a static volume (on NAND) and wrote a JFFS2 image to it with 
> ubiupdatevol. mount succeeded, but the image was built wrongly so the
> jffs2 garbage collector thread to fix it.
Strange, the volume should be read-only, what could the GC thread do to
it?

>  I then rebooted the system
> while this was running (using a proper reboot, which succeeded).
> 
> After rebooting, I can't attach the UBI volume at all:
> 
> Jan  1 00:16:34 elaraboot user.err kernel: [  994.310000] UBI error: validate_vid_hdr: inconsistent VID header at PEB 664                         
> Jan  1 00:16:34 elaraboot user.err kernel: [  994.320000] UBI error: cannot attach mtd7                                                           
> Jan  1 00:16:34 elaraboot user.err kernel: [  994.320000] UBI error: cannot initialize UBI, error -22 

Could you please enable UBI debugging (just UBI debugging, not any of
debugging messages), and try to attach the MTD device again? Then send
me the UBI output which you may take with dmesg?

> I don't understand how a corrupt volume can cause the whole UBI to be
> unusable?

In this case UBI finds that the VID header contains some "insane" data,
it's not just corruption which would be detected by CRC checking (which
is OK in your case). This is why UBI refuses to keep going. This might
me a bug though, the debugging should help.

> As an aside, is a static volume not read-only?
It should be, but I never tried.

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

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

* Re: corrupted ubi after reboot while busy
  2008-03-27 13:39 ` Artem Bityutskiy
@ 2008-03-28  0:05   ` Hamish Moffatt
  2008-03-28  6:21     ` Artem Bityutskiy
  0 siblings, 1 reply; 4+ messages in thread
From: Hamish Moffatt @ 2008-03-28  0:05 UTC (permalink / raw)
  To: Artem Bityutskiy; +Cc: linux-mtd

On Thu, Mar 27, 2008 at 03:39:38PM +0200, Artem Bityutskiy wrote:
> On Thu, 2008-03-27 at 18:05 +1100, Hamish Moffatt wrote:
> > I'm trying UBI for the first time; I have the kernel 2.6.24 with UBI
> > backported from 2.6.25-rc7.
> > 
> > I created a static volume (on NAND) and wrote a JFFS2 image to it with 
> > ubiupdatevol. mount succeeded, but the image was built wrongly so the
> > jffs2 garbage collector thread to fix it.
> Strange, the volume should be read-only, what could the GC thread do to
> it?

That's what I thought.

> >  I then rebooted the system
> > while this was running (using a proper reboot, which succeeded).
> > 
> > After rebooting, I can't attach the UBI volume at all:
> > 
> > Jan  1 00:16:34 elaraboot user.err kernel: [  994.310000] UBI error: validate_vid_hdr: inconsistent VID header at PEB 664                         
> > Jan  1 00:16:34 elaraboot user.err kernel: [  994.320000] UBI error: cannot attach mtd7                                                           
> > Jan  1 00:16:34 elaraboot user.err kernel: [  994.320000] UBI error: cannot initialize UBI, error -22 
> 
> Could you please enable UBI debugging (just UBI debugging, not any of
> debugging messages), and try to attach the MTD device again? Then send
> me the UBI output which you may take with dmesg?

I will try. I already erased the device to try something else, but I
will try to reproduce it.


thanks
Hamish
-- 
Hamish Moffatt VK3SB <hamish@debian.org> <hamish@cloud.net.au>

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

* Re: corrupted ubi after reboot while busy
  2008-03-28  0:05   ` Hamish Moffatt
@ 2008-03-28  6:21     ` Artem Bityutskiy
  0 siblings, 0 replies; 4+ messages in thread
From: Artem Bityutskiy @ 2008-03-28  6:21 UTC (permalink / raw)
  To: Hamish Moffatt; +Cc: linux-mtd

On Fri, 2008-03-28 at 11:05 +1100, Hamish Moffatt wrote:
> On Thu, Mar 27, 2008 at 03:39:38PM +0200, Artem Bityutskiy wrote:
> > On Thu, 2008-03-27 at 18:05 +1100, Hamish Moffatt wrote:
> > > I'm trying UBI for the first time; I have the kernel 2.6.24 with UBI
> > > backported from 2.6.25-rc7.
> > > 
> > > I created a static volume (on NAND) and wrote a JFFS2 image to it with 
> > > ubiupdatevol. mount succeeded, but the image was built wrongly so the
> > > jffs2 garbage collector thread to fix it.
> > Strange, the volume should be read-only, what could the GC thread do to
> > it?
> 
> That's what I thought.

Actually, static volumes are protected by CRC checksums on the UBI
level, so UBI checks CRC of whole volume when you open it for the first
time, which may take time. What is the size of your static volume?

JFFS2 has its own data integrity checksums, so static volumes are not
really necessary. I'd suggest using a dynamic volume instead.

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

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

end of thread, other threads:[~2008-03-28  6:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-27  7:05 corrupted ubi after reboot while busy Hamish Moffatt
2008-03-27 13:39 ` Artem Bityutskiy
2008-03-28  0:05   ` Hamish Moffatt
2008-03-28  6:21     ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).