Nand闪存; MTD;全民基本收入;整体空间

Nand闪存; MTD;全民基本收入;整体空间

我的问题应该源于我对ubi和的误解MTD。但是,我无法通过谷歌搜索找到答案(并且没有找到好的教程)。

我只是想知道我的Nand Flash的总容量,所以我使用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 

到目前为止一切顺利,我的设备似乎有 2 个 nand :总共ubi0_0大约ubi0:rootfs4 G(我对吗 ?)

据我所知,是一个在;UBIFS之上使用的文件系统。MTD因此,当我运行时mtdinfo -a,我应该能够看到mtd设备信息和容量。我的问题是,我有 4 台MTD设备,总容量为2 GB(大部分来自mtd0)。为什么df -h显示我2 * 1.8 GBmtdinfo显示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                                           

# 

答案1

您的gpmi-nand设备似乎安装了两次,如//mnt/nand。您可以通过在中创建文件来验证这一点/root;它也应该出现在/mnt/nand/root... 所以你实际上只安装了一个 2GB 分区,它与mtdinfo的输出匹配。

相关内容