public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* can't mount ubifs on volume smaller than 265 LEBs/32MiB
@ 2008-04-04  4:12 Hamish Moffatt
  2008-04-04  5:06 ` Artem Bityutskiy
  2008-04-04  5:25 ` Artem Bityutskiy
  0 siblings, 2 replies; 6+ messages in thread
From: Hamish Moffatt @ 2008-04-04  4:12 UTC (permalink / raw)
  To: linux-mtd

I need a ubifs on a small volume (around 16MiB or less) but I've found
that I can't get the volume to mount if it's that small.

With a LEB size of 126kb, any file system < 265 LEBs won't mount,
failing in validate_sb.

# ubimkvol /dev/ubi0 -N config -S 264
Volume ID 2, size 264 LEBs (34062336 bytes, 32.5 MiB), LEB size 129024 bytes (126.0 KiB), dynamic, name "config", alignment 1
# mount /rw
mount: mounting ubi0:config on /rw failed: Invalid argument

# dmesg
[...]
[ 1191.360000] UBIFS error (pid 2804): validate_sb: bad superblock

# ubirmvol /dev/ubi0 -n 2
# ubimkvol /dev/ubi0 -N config -S 265
Volume ID 2, size 265 LEBs (34191360 bytes, 32.6 MiB), LEB size 129024 bytes (126.0 KiB), dynamic, name "config", alignment 1
# mount /rw

My ubifs is about 1 week old from git.

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

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

* Re: can't mount ubifs on volume smaller than 265 LEBs/32MiB
  2008-04-04  4:12 can't mount ubifs on volume smaller than 265 LEBs/32MiB Hamish Moffatt
@ 2008-04-04  5:06 ` Artem Bityutskiy
  2008-04-04  6:48   ` Artem Bityutskiy
  2008-04-04  8:48   ` Artem Bityutskiy
  2008-04-04  5:25 ` Artem Bityutskiy
  1 sibling, 2 replies; 6+ messages in thread
From: Artem Bityutskiy @ 2008-04-04  5:06 UTC (permalink / raw)
  To: Hamish Moffatt; +Cc: linux-mtd

On Fri, 2008-04-04 at 15:12 +1100, Hamish Moffatt wrote:
> With a LEB size of 126kb, any file system < 265 LEBs won't mount,
> failing in validate_sb.
Hmm...

> # ubimkvol /dev/ubi0 -N config -S 264
> Volume ID 2, size 264 LEBs (34062336 bytes, 32.5 MiB), LEB size 129024 bytes (126.0 KiB), dynamic, name "config", alignment 1
> # mount /rw
> mount: mounting ubi0:config on /rw failed: Invalid argument
> 
> # dmesg
> [...]
> [ 1191.360000] UBIFS error (pid 2804): validate_sb: bad superblock

I'll look at this shortly, thanks for the report. As a suggestion, if
you have problems with UBIFS and going to send a bug-report, try to
enable debugging, reproduce the problem and send dmesg. With debugging
enabled it prints more useful information and makes it easier to
identify and fix the issue.

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

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

* Re: can't mount ubifs on volume smaller than 265 LEBs/32MiB
  2008-04-04  4:12 can't mount ubifs on volume smaller than 265 LEBs/32MiB Hamish Moffatt
  2008-04-04  5:06 ` Artem Bityutskiy
@ 2008-04-04  5:25 ` Artem Bityutskiy
  1 sibling, 0 replies; 6+ messages in thread
From: Artem Bityutskiy @ 2008-04-04  5:25 UTC (permalink / raw)
  To: Hamish Moffatt; +Cc: linux-mtd


On Fri, 2008-04-04 at 15:12 +1100, Hamish Moffatt wrote:
> I need a ubifs on a small volume (around 16MiB or less) but I've found
> that I can't get the volume to mount if it's that small.
> 
> With a LEB size of 126kb, any file system < 265 LEBs won't mount,
> failing in validate_sb.
> 
> # ubimkvol /dev/ubi0 -N config -S 264
> Volume ID 2, size 264 LEBs (34062336 bytes, 32.5 MiB), LEB size 129024 bytes (126.0 KiB), dynamic, name "config", alignment 1
> # mount /rw
> mount: mounting ubi0:config on /rw failed: Invalid argument
> 
> # dmesg
> [...]
> [ 1191.360000] UBIFS error (pid 2804): validate_sb: bad superblock
> 
> # ubirmvol /dev/ubi0 -n 2
> # ubimkvol /dev/ubi0 -N config -S 265
> Volume ID 2, size 265 LEBs (34191360 bytes, 32.6 MiB), LEB size 129024 bytes (126.0 KiB), dynamic, name "config", alignment 1
> # mount /rw

Cannot reproduce this with nandsim.

$ sudo modprobe nandsim first_id_byte=0x20 second_id_byte=0xaa
third_id_byte=0x00 fourth_id_byte=0x15

$ sudo modprobe ubi mtd=0

$ sudo ubimkvol /dev/ubi0 -N config -S 264
Volume ID 0, size 264 LEBs (34062336 bytes, 32.5 MiB), LEB size 129024
bytes (126.0 KiB), dynamic, name "config", alignment 1

$ sudo mount -t ubifs ubi0:config /mnt/ubifs/

Could you please enable debugging, retry and send me dmesg output? Or
any suggestion what I could do to reproduce the problem?

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

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

* Re: can't mount ubifs on volume smaller than 265 LEBs/32MiB
  2008-04-04  5:06 ` Artem Bityutskiy
@ 2008-04-04  6:48   ` Artem Bityutskiy
  2008-04-07  1:31     ` Hamish Moffatt
  2008-04-04  8:48   ` Artem Bityutskiy
  1 sibling, 1 reply; 6+ messages in thread
From: Artem Bityutskiy @ 2008-04-04  6:48 UTC (permalink / raw)
  To: Hamish Moffatt; +Cc: linux-mtd

On Fri, 2008-04-04 at 08:06 +0300, Artem Bityutskiy wrote:
> I'll look at this shortly, thanks for the report. As a suggestion, if
> you have problems with UBIFS and going to send a bug-report, try to
> enable debugging, reproduce the problem and send dmesg. With debugging
> enabled it prints more useful information and makes it easier to
> identify and fix the issue.

Adrian said he fixed a validation bug recently, so you should update and
the problem will probably go away.

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

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

* Re: can't mount ubifs on volume smaller than 265 LEBs/32MiB
  2008-04-04  5:06 ` Artem Bityutskiy
  2008-04-04  6:48   ` Artem Bityutskiy
@ 2008-04-04  8:48   ` Artem Bityutskiy
  1 sibling, 0 replies; 6+ messages in thread
From: Artem Bityutskiy @ 2008-04-04  8:48 UTC (permalink / raw)
  To: Hamish Moffatt; +Cc: linux-mtd

On Fri, 2008-04-04 at 08:06 +0300, Artem Bityutskiy wrote:
> I'll look at this shortly, thanks for the report. As a suggestion, if
> you have problems with UBIFS and going to send a bug-report, try to
> enable debugging, reproduce the problem and send dmesg. With debugging
> enabled it prints more useful information and makes it easier to
> identify and fix the issue.

Just wrote a short HOWTO entry:
http://www.linux-mtd.infradead.org/doc/ubifs.html#L_how_send_bugreport

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

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

* Re: can't mount ubifs on volume smaller than 265 LEBs/32MiB
  2008-04-04  6:48   ` Artem Bityutskiy
@ 2008-04-07  1:31     ` Hamish Moffatt
  0 siblings, 0 replies; 6+ messages in thread
From: Hamish Moffatt @ 2008-04-07  1:31 UTC (permalink / raw)
  To: Artem Bityutskiy; +Cc: linux-mtd

On Fri, Apr 04, 2008 at 09:48:57AM +0300, Artem Bityutskiy wrote:
> On Fri, 2008-04-04 at 08:06 +0300, Artem Bityutskiy wrote:
> > I'll look at this shortly, thanks for the report. As a suggestion, if
> > you have problems with UBIFS and going to send a bug-report, try to
> > enable debugging, reproduce the problem and send dmesg. With debugging
> > enabled it prints more useful information and makes it easier to
> > identify and fix the issue.
> 
> Adrian said he fixed a validation bug recently, so you should update and
> the problem will probably go away.

Thanks. I confirm that with the latest code from the git-v2.6.24 tree, I
can mount the 16MiB (131 LEB) volume.

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

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

end of thread, other threads:[~2008-04-07  1:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-04  4:12 can't mount ubifs on volume smaller than 265 LEBs/32MiB Hamish Moffatt
2008-04-04  5:06 ` Artem Bityutskiy
2008-04-04  6:48   ` Artem Bityutskiy
2008-04-07  1:31     ` Hamish Moffatt
2008-04-04  8:48   ` Artem Bityutskiy
2008-04-04  5:25 ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox