[#5554] cat /proc/mtd doesn't always show ubifs partitions

Document created by Aaronwu Employee on Sep 4, 2013
Version 1Show Document
  • View in full screen mode

[#5554] cat /proc/mtd doesn't always show ubifs partitions

Submitted By: Mingquan Pan

Open Date

2009-09-23 23:30:36     Close Date

2009-09-24 04:03:13

Priority:

Medium     Assignee:

Nobody

Status:

Closed     Fixed In Release:

N/A

Found In Release:

2010R1     Release:

Category:

N/A     Board:

N/A

Processor:

BF537     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Assigned (Not Start)

Uboot version or rev.:

    Toolchain version or rev.:

09r1-rc9

App binary format:

N/A     

Summary: cat /proc/mtd doesn't always show ubifs partitions

Details:

 

cat /proc/mtd doesn't always show ubifs partitions. Sometimes the newly made volumn doesn't show by catting /proc/mtd, even the mtd device is formatted previously. this also happens to some existing volumns, and if you want to make the volumn again ,it would say that exists.

 

root:/> ubiformat /dev/mtd1

ubiformat: mtd1 (NAND), size 130023424 bytes (124.0 MiB), 131072 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes

libscan: scanning eraseblock 991 -- 100 % complete

ubiformat: 990 eraseblocks have valid erase counter, mean value is 8

ubiformat: bad eraseblocks: 679, 746

ubiformat: warning!: VID header and data offsets on flash are 512 and 2048, which is different to calculated offsets 2048 and 4096

ubiformat: use new offsets 512 and 2048? (yes/no)  no

ubiformat: formatting eraseblock 991 -- 100 % complete

root:/> cat /proc/mtd

dev:    size   erasesize  name

mtd0: 00400000 00020000 "linux kernel(nand)"

mtd1: 07c00000 00020000 "file system(nand)"                                                                                                               

 

root:/> ubiattach  /dev/ubi_ctrl -m 1

UBI: attaching mtd1 to ubi0

UBI: physical eraseblock size:   131072 bytes (128 KiB)

UBI: logical eraseblock size:    129024 bytes

UBI: smallest flash I/O unit:    2048

UBI: sub-page size:              512

UBI: VID header offset:          512 (aligned 512)

UBI: data offset:                2048

UBI: attached mtd1 to ubi0

UBI: MTD device name:            "file system(nand)"

UBI: MTD device size:            124 MiB

UBI: number of good PEBs:        990

UBI: number of bad PEBs:         2

UBI: max. allowed volumes:       128

UBI: wear-leveling threshold:    4096

UBI: number of internal volumes: 1

UBI: number of user volumes:     0

UBI: available PEBs:             977

UBI: total number of reserved PEBs: 13

UBI: number of PEBs reserved for bad PEB handling: 9

UBI: max/mean erase counter: 22/9

UBI: background thread "ubi_bgt0d" started, PID 226

UBI device number 0, total 990 LEBs (127733760 bytes, 121.8 MiB), available 977 LEBs (126056448 bytes, 120.2 MiB), LEB size 129024 bytes (126.0 KiB)

root:/>

root:/> ubimkvol /dev/ubi0 -s 30MiB -N ubifs0

Volume ID 0, size 244 LEBs (31481856 bytes, 30.0 MiB), LEB size 129024 bytes (126.0 KiB), dynamic, name "ubifs0", alignment 1

root:/> cat /proc/mtd

dev:    size   erasesize  name

mtd0: 00400000 00020000 "linux kernel(nand)"

mtd1: 07c00000 00020000 "file system(nand)"

root:/> mount -t ubifs ubi0:ubifs0 /mnt/

UBIFS: default file-system created

UBIFS: mounted UBI device 0, volume 0, name "ubifs0"

UBIFS: file system size:   30320640 bytes (29610 KiB, 28 MiB, 235 LEBs)

UBIFS: journal size:       1548288 bytes (1512 KiB, 1 MiB, 12 LEBs)

UBIFS: media format:       w4/r0 (latest is w4/r0)

UBIFS: default compressor: lzo

UBIFS: reserved for root:  1432118 bytes (1398 KiB)

root:/> cat /proc/mtd

dev:    size   erasesize  name

mtd0: 00400000 00020000 "linux kernel(nand)"

mtd1: 07c00000 00020000 "file system(nand)"

...

...

root:/> ubimkvol /dev/ubi0 -s 30MiB -N ubifs4

UBI error: ubi_create_volume: cannot create volume 4, error -17

ubimkvol: error!: cannot UBI create volume

          error 17 (File exists)

root:/> cat /proc/mtd

dev:    size   erasesize  name

mtd0: 00400000 00020000 "linux kernel(nand)"

mtd1: 07c00000 00020000 "file system(nand)"

root:/>

root:/> version

kernel:    Linux release 2.6.30.5-ADI-2010R1-pre-svn7256, build #28 Thu Sep 24 10:39:41 CST 2009

toolchain: bfin-uclinux-gcc release gcc version 4.1.2 (ADI svn)

user-dist: release svn-8797, build #14 Thu Sep 24 10:39:09 CST 2009

root:/>

 

Follow-ups

 

--- Mingquan Pan                                             2009-09-24 04:03:12

sorry, I find this is related to the item MTD_UBI_GLUEBI is not configured.

After it is selected, the volumn can be shown by cat /proc/mtd.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes