深入解析ext2文件系统之mke2fs
| 块大小 | 直接寻址 | 间接寻址 | 二次间接寻址 | 三次间接寻址 |
| 1024 | 12KB | 268KB | 64.26MB | 16.06GB |
| 2048 | 24KB | 1.02MB | 513.02MB | 265.5GB |
| 4096 | 48KB | 4.04MB | 4GB | ~ 4TB |
- linux-tods:/mnt/bean # mke2fs /dev/loop0
- mke2fs 1.41.9 (22-Aug-2009)
- Filesystem label=
- OS type: Linux
- Block size=1024 (log=0)
- Fragment size=1024 (log=0)
- 128016 inodes, 512000 blocks
- 25600 blocks (5.00%) reserved for the super user
- First data block=1
- Maximum filesystem blocks=67633152
- 63 block groups
- 8192 blocks per group, 8192 fragments per group
- 2032 inodes per group
- Superblock backups stored on blocks:
- 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
- Writing inode tables: done
- Writing superblocks and filesystem accounting information: done
- This filesystem will be automatically checked every 26 mounts or
- 180 days, whichever comes first. Use tune2fs -c or -i to override.
用户可以修改成4096,这样的话,总块数一会跟着变化从512000变成了128000.
- linux-tods:/mnt/bean # mke2fs -b 4096 /dev/loop0
- mke2fs 1.41.9 (22-Aug-2009)
- Filesystem label=
- OS type: Linux
- Block size=4096 (log=2)
- Fragment size=4096 (log=2)
- 128000 inodes, 128000 blocks
- 6400 blocks (5.00%) reserved for the super user
- First data block=0
- Maximum filesystem blocks=134217728
- 4 block groups
- 32768 blocks per group, 32768 fragments per group
- 32000 inodes per group
- Superblock backups stored on blocks:
- 32768, 98304
- Writing inode tables: done
- Writing superblocks and filesystem accounting information: done
- This filesystem will be automatically checked every 39 mounts or
- 180 days, whichever comes first. Use tune2fs -c or -i to override.
- linux-tods:/mnt/bean # mke2fs -m 10 /dev/loop0
- mke2fs 1.41.9 (22-Aug-2009)
- Filesystem label=
- OS type: Linux
- Block size=1024 (log=0)
- Fragment size=1024 (log=0)
- 128016 inodes, 512000 blocks
- 51200 blocks (10.00%) reserved for the super user
- First data block=1
- Maximum filesystem blocks=67633152
- 63 block groups
- 8192 blocks per group, 8192 fragments per group
- 2032 inodes per group
- Superblock backups stored on blocks:
- 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
- Writing inode tables: done
- Writing superblocks and filesystem accounting information: done
- This filesystem will be automatically checked every 23 mounts or
- 180 days, whichever comes first. Use tune2fs -c or -i to override.
-------------------------------------------------------------------------------------------------------
点击(此处)折叠或打开
- linux-tods:/mnt/bean # mke2fs -i 8192 /dev/loop0
- mke2fs 1.41.9 (22-Aug-2009)
- Filesystem label=
- OS type: Linux
- Block size=1024 (log=0)
- Fragment size=1024 (log=0)
- 64008 inodes, 512000 blocks
- 25600 blocks (5.00%) reserved for the super user
- First data block=1
- Maximum filesystem blocks=67633152
- 63 block groups
- ......
- linux-tods:/mnt/bean # dumpe2fs /dev/loop0
- Group 0: (Blocks 1-8192)
- Primary superblock at 1, Group descriptors at 2-3
- Reserved GDT blocks at 4-259
- Block bitmap at 260 (+259), Inode bitmap at 261 (+260)
- Inode table at 262-388 (+261)
- 7790 free blocks, 1005 free inodes, 2 directories
- Free blocks: 403-8192
- Free inodes: 12-1016
- Group 1: (Blocks 8193-16384)
- Backup superblock at 8193, Group descriptors at 8194-8195
- Reserved GDT blocks at 8196-8451
- Block bitmap at 8452 (+259), Inode bitmap at 8453 (+260)
- Inode table at 8454-8580 (+261)
- 7804 free blocks, 1016 free inodes, 0 directories
- Free blocks: 8581-16384
- Free inodes: 1017-2032
设成1524居然也可以,呵呵
- linux-tods:/mnt/bean # mke2fs -i 1524 /dev/loop0
- mke2fs 1.41.9 (22-Aug-2009)
- Filesystem label=
- OS type: Linux
- Block size=1024 (log=0)
- Fragment size=1024 (log=0)
- 344232 inodes, 512000 blocks
- 25600 blocks (5.00%) reserved for the super user
- First data block=1
- Maximum filesystem blocks=67633152
- 63 block groups
- 8192 blocks per group, 8192 fragments per group
- 5464 inodes per group
- Superblock backups stored on blocks:
最后一个PROBLEM,我想了很久也没想明白,请路过的高手如果知道答案,不吝赐教:
- Inode count: 128016
- Block count: 512000
- Reserved block count: 25600
- Free blocks: 493526
- Free inodes: 128005
- First block: 1
- Block size: 1024
深入解析ext2文件系统之mke2fs的更多相关文章
- 深入解析 ext2 文件系统
很久以来,就想写一篇关于ext 家族文件系统的文章,源于我刚工作的时候,曾经一不小心rm -rf,误删除了很多文件,当时真想有个数据恢复软件能帮我把数据回复了.当然学习数据恢复,首先要学习文件系统. ...
- 深入解析 ext2 文件系统 (转)
http://blog.chinaunix.net/uid-24774106-id-3266816.html 很久以来,就想写一篇关于ext 家族文件系统的文章,源于我刚工作的时候,曾经一不小心rm ...
- mke2fs 制作ext2文件系统image
方法1: 利用/dev/ram1: linux下有很多ram,我们用ram1,首先把ram1格式化成ext2文件系统[root@gucuiwen babylinux]# sudo mkfs.ext ...
- ext2文件系统 - mke2fs
上一遍博文的重点其实将ext2整体的组织框架,我们知道了ext2文件系统由块组组成,每个块组里面的组织形式.我们甚至直接把超级块和组描述符里面的内容,用十六进制形式展现了出来.这篇博文主要讲述如何 ...
- ext3是对ext2文件系统的一个扩展高性能日志文件系统
嵌入式开发者所做的最重要的决定之一就是部署哪种文件系统.有些文件系统性能比较高有些文件系统空间利用率比较高,还有一些文件系统设备故障或者意外断电后恢复数据比较方便. linux文件系统概念 分区 分区 ...
- ext2文件系统
2.1. 总体存储布局 我们知道,一个磁盘可以划分成多个分区,每个分区必须先用格式化工具(例如某种mkfs命令)格式化成某种格式的文件系统,然后才能存储文件,格式化的过程会在磁盘上写一些管理存储布局的 ...
- Ext2文件系统布局,文件数据块寻址,VFS虚拟文件系统
注:本分类下文章大多整理自<深入分析linux内核源代码>一书,另有参考其他一些资料如<linux内核完全剖析>.<linux c 编程一站式学习>等,只是为了更好 ...
- Linux ext2文件系统之初步思考
数据存放在磁盘中,磁盘最小存取单位sector(512Byte);文件系统中存储的最小单位是 块(Block),大小通常(1KB,2KB,4KB...), 一个block对应多个sector,因而可用 ...
- ext2文件系统了解
一个磁盘可以划分成多个分区,每个分区必须先用格式化工具(例如mkfs命令)格式化成某种格式的文件系统,然后才能存储文件,格式化的过程会在磁盘上写一些管理存储布局的信息.下以ext2文件系统为例说明文件 ...
随机推荐
- flex中文说明手册
http://help.adobe.com/zh_CN/Flex/4.0/UsingFlashBuilder/WS6f97d7caa66ef6eb1e63e3d11b6c4d0d21-7f07.htm ...
- c# 运行时替换某文件源代码(将XML 转换成 某个枚举并写入源文件)
var sr = new StreamReader(Server.MapPath("~/WEB-INF/rule.config")); XmlDocument doc = new ...
- DataGrid loadData loadFilter
<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title>Cl ...
- 使用CXF发布WebService服务简单实例
一.说明: 前面介绍了使用axis2来发布Webservice服务,现在介绍一种更popular,更高效的Webservice服务发布技术:CXF Apache CXF = Celtix + XFir ...
- hdu 2899 Strange fuction
http://acm.hdu.edu.cn/showproblem.php?pid=2899 Strange fuction Time Limit: 2000/1000 MS (Java/Others ...
- LeetCode292:Nim Game
You are playing the following Nim Game with your friend: There is a heap of stones on the table, eac ...
- Codeforces 588E. A Simple Task (线段树+计数排序思想)
题目链接:http://codeforces.com/contest/558/problem/E 题意:有一串字符串,有两个操作:1操作是将l到r的字符串升序排序,0操作是降序排序. 题解:建立26棵 ...
- 【转】Android 实现蘑菇街购物车动画效果
原文出处:http://blog.csdn.net/wangjinyu501/article/details/38400479 1.思路 目前想到两种方式实现这种效果,一是使用Tween动画,直截 ...
- js中有关滑动问题的一些理解
在做导航栏的时候,肯定会用到点击滑动的,但不知道大家有没有遇到过这种问题: $(window).animate({ scrollTop: "1000px" }) $(documen ...
- yum命令的使用
yum源的配置,请参考此文:RedHatLinux 本地yum源的配置.本文讲解如何使用yum命令. [root@serv01 ~]# yum --help Loaded plugins: produ ...