UBI error: ubi_create_volume: cannot create volume 1, error -28

5931 단어
플랫폼: AT91SAM9G25EK 전체 nand mtd 구역은 각각 mtd0 mtd1 mtd2
mtd0
kernel uboot bstrap 저장
mtd1
ubifs ubi volume 1
mtd2
ubi volume 1

[    2.489000] UBI: attaching mtd2 to ubi1
[    2.493000] UBI: physical eraseblock size:   131072 bytes (128 KiB)
[    2.499000] UBI: logical eraseblock size:    126976 bytes
[    2.504000] UBI: smallest flash I/O unit:    2048
[    2.509000] UBI: VID header offset:          2048 (aligned 2048)
[    2.515000] UBI: data offset:                4096
[    2.786000] UBI: max. sequence number:       34
[    2.806000] UBI: attached mtd2 to ubi1
[    2.809000] UBI: MTD device name:            "usrdata"
[    2.815000] UBI: MTD device size:            91 MiB
[    2.819000] UBI: number of good PEBs:        728
[    2.824000] UBI: number of bad PEBs:         0
[    2.828000] UBI: number of corrupted PEBs:   0
[    2.833000] UBI: max. allowed volumes:       128
[    2.837000] UBI: wear-leveling threshold:    4096
[    2.842000] UBI: number of internal volumes: 1
[    2.846000] UBI: number of user volumes:     1
[    2.851000] UBI: available PEBs:             56
[    2.855000] UBI: total number of reserved PEBs: 672
[    2.860000] UBI: number of PEBs reserved for bad PEB handling: 7
[    2.866000] UBI: max/mean erase counter: 2/1
[    2.870000] UBI: image sequence number:  -661745834
[    2.875000] UBI: background thread "ubi_bgt1d" started, PID 465
[    2.913000] <span style="color:#ff0000;">UBI error: ubi_create_volume: cannot create volume 1, error -28
ubimkvol: UBI_IOCMKVOL: No space left on device</span>
[    2.995000] UBIFS: mounted UBI device 1, volume 0, name "appdata"
[    3.001000] UBIFS: file system size:   82661376 bytes (80724 KiB, 78 MiB, 651 LEBs)
[    3.009000] UBIFS: journal size:       4190208 bytes (4092 KiB, 3 MiB, 33 LEBs)
[    3.016000] UBIFS: media format:       w4/r0 (latest is w4/r0)
[    3.022000] UBIFS: default compressor: lzo
[    3.026000] UBIFS: reserved for root:  3904300 bytes (3812 KiB)

파일 시스템을 마운트한 후 mtd2를 ubivolume로 포맷하여 마운트한 결과 마운트에 실패했습니다. 알림 공간이 부족합니다.
이상하네.전체 구역의 90M 크기로 아무것도 없기 때문이다.
df 보기, mnt/data도 마운트되었습니다.원인은 도대체 무엇입니까??4M 크기의 파일을 만든 후 df는 다음과 같이 표시됩니다. 정상적인 것 같습니다.
[root@(none) /]# df
Filesystem           1K-blocks      Used Available Use% Mounted on
ubi0:rootfs              26836      2240     24596   8% /
devtmpfs                 62648         0     62648   0% /dev
ubi1_0                   73972      4424     65736   6% /mnt/data
인쇄부터 시작하세요.
전체 포맷 mtd2를 ubi 시스템 형식으로 하는 섹션 단계는 3개입니다.
우선attach 다음makevolume, 마지막mount, rcS의 시작 스크립트와 관련된 세 줄 명령은 다음과 같습니다.
#attach mtd2 to be ubi volume
ubiattach /dev/ubi_ctrl -m 2
#make ubi1 size=80MiB dynamic
ubimkvol /dev/ubi1  -N usrdata -s 83886080 -t dynamic
#mount ubit ---> /mnt/data
mount -t ubifs ubi1_0 /mnt/data
인쇄 정보 알림의 오류에 대해 말하자면 문제는 두 번째 단계인 ubimkvol에 나타난다. 다음은 위의 인쇄 부분을 캡처하여 분석한다.
[    2.809000] UBI: MTD device name:            "usrdata"<span style="white-space:pre">	</span>// usrdata ubi vol, !!
[    2.815000] UBI: MTD device size:            91 MiB<span style="white-space:pre">	</span>// mtd   
[    2.819000] UBI: number of good PEBs:        728 //728 ÷ 8 = 91MiB  
[    2.824000] UBI: number of bad PEBs:         0 //   
[    2.828000] UBI: number of corrupted PEBs:   0//   , , 
[    2.833000] UBI: max. allowed volumes:       128// vol 
[    2.837000] UBI: wear-leveling threshold:    4096// 
[    2.842000] UBI: number of internal volumes: 1//
[    2.846000] UBI: number of user volumes:     1
[    2.851000] UBI: available PEBs:             56// mtd 56 , !!!!??? !
[    2.855000] UBI: total number of reserved PEBs: 672// 672

문제는 명백한데, PEB에서 나온 수량은 왜 56개만 사용할 수 있습니까?
다시 부팅해서 uboot에서 nand erase로 mtd2를 지우면 OK.
지우기 후 다시 시작한 인쇄 정보는 다음과 같습니다.
[    2.486000] UBI: attaching mtd2 to ubi1
[    2.490000] UBI: physical eraseblock size:   131072 bytes (128 KiB)
[    2.496000] UBI: logical eraseblock size:    126976 bytes
[    2.502000] UBI: smallest flash I/O unit:    2048
[    2.506000] UBI: VID header offset:          2048 (aligned 2048)
[    2.512000] UBI: data offset:                4096
[    2.650000] UBI: empty MTD device detected
[    2.654000] UBI: max. sequence number:       0
[    2.659000] UBI: create volume table (copy #1)
[    2.668000] UBI: create volume table (copy #2)
[    2.682000] UBI: attached mtd2 to ubi1
[    2.685000] UBI: MTD device name:            "usrdata"
[    2.691000] UBI: MTD device size:            91 MiB
[    2.695000] UBI: number of good PEBs:        728
[    2.700000] UBI: number of bad PEBs:         0
[    2.704000] UBI: number of corrupted PEBs:   0
[    2.709000] UBI: max. allowed volumes:       128
[    2.713000] UBI: wear-leveling threshold:    4096
[    2.718000] UBI: number of internal volumes: 1
[    2.722000] UBI: number of user volumes:     0
[    2.727000] UBI: available PEBs:             717
[    2.731000] UBI: total number of reserved PEBs: 11
[    2.736000] UBI: number of PEBs reserved for bad PEB handling: 7
[    2.742000] UBI: max/mean erase counter: 0/0
[    2.746000] UBI: image sequence number:  1705172159
[    2.751000] UBI: background thread "ubi_bgt1d" started, PID 464
[    3.248000] UBIFS: default file-system created
[    3.290000] UBIFS: mounted UBI device 1, volume 0, name "usrdata"
[    3.296000] UBIFS: file system size:   72376320 bytes (70680 KiB, 69 MiB, 570 LEBs)
[    3.304000] UBIFS: journal size:       3555328 bytes (3472 KiB, 3 MiB, 28 LEBs)
[    3.311000] UBIFS: media format:       w4/r0 (latest is w4/r0)
[    3.317000] UBIFS: default compressor: lzo
[    3.321000] UBIFS: reserved for root:  3418512 bytes (3338 KiB)

좋은 웹페이지 즐겨찾기