我的问题应该源于我对ubi
和MTD
的误解。然而,我无法通过googling找到它(也没有找到一个好的教程)。
我只是想知道我的Nand闪存的总容量,所以我使用了df -h
Filesystem Size Used Available Use% Mounted on
ubi0:rootfs 1.8G 46.8M 1.8G 3% /
devtmpfs 375.4M 0 375.4M 0% /dev
tmpfs 503.5M 0 503.5M 0% /dev/shm
tmpfs 503.5M 436.0K 503.1M 0% /tmp
/dev/ubi0_0 1.8G 46.8M 1.8G 3% /mnt/nand
到目前为止,我的设备似乎有两个数字:ubi0_0
和ubi0:rootfs
在4 G
周围(对吗?)
据我所知,UBIFS
是在MTD
之上使用的文件集;因此,当我运行mtdinfo -a
时,我应该能够看到mtd
设备的信息和容量。我的问题是,我有4个MTD
设备,总容量为顺序2 GB
(大部分来自mtd0
**)。为什么* df -h
向我显示*‘2.18GB** **but** **
mtdinfo** **shows** **
2 GB`**:
# mtdinfo -a
Count of MTD devices: 4
Present MTD devices: mtd0, mtd1, mtd2, mtd3
Sysfs interface supported: yes
mtd0
Name: gpmi-nand
Type: nand
Eraseblock size: 524288 bytes, 512.0 KiB
Amount of eraseblocks: 4096 (2147483648 bytes, 2.0 GiB)
Minimum input/output unit size: 4096 bytes
Sub-page size: 4096 bytes
OOB size: 224 bytes
Character device major/minor: 90:0
Bad blocks are allowed: true
Device is writable: true
mtd1
Name: U-Boot
Type: nor
Eraseblock size: 65536 bytes, 64.0 KiB
Amount of eraseblocks: 12 (786432 bytes, 768.0 KiB)
Minimum input/output unit size: 1 byte
Sub-page size: 1 byte
Character device major/minor: 90:2
Bad blocks are allowed: false
Device is writable: false
mtd2
Name: env
Type: nor
Eraseblock size: 65536 bytes, 64.0 KiB
Amount of eraseblocks: 1 (65536 bytes, 64.0 KiB)
Minimum input/output unit size: 1 byte
Sub-page size: 1 byte
Character device major/minor: 90:4
Bad blocks are allowed: false
Device is writable: false
mtd3
Name: Kernel
Type: nor
Eraseblock size: 65536 bytes, 64.0 KiB
Amount of eraseblocks: 114 (7471104 bytes, 7.1 MiB)
Minimum input/output unit size: 1 byte
Sub-page size: 1 byte
Character device major/minor: 90:6
Bad blocks are allowed: false
Device is writable: true
#
发布于 2015-02-11 19:28:31
您的gpmi-nand
设备似乎被安装了两次,分别是/
和/mnt/nand
。您可以通过在/root
中创建一个文件来验证这一点;它也应该出现在/mnt/nand/root
中.因此,您实际上只有一个2GB分区挂载,这与mtdinfo
的S输出相匹配。
https://unix.stackexchange.com/questions/184284
复制相似问题