ext2文件系统 - mke2fs
表 1. 各种数据块对应的文件寻址范围
块大小 | 直接寻址 | 间接寻址 | 二次间接寻址 | 三次间接寻址 |
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文件系统之mke2fs
上一遍博文的重点其实将ext2整体的组织框架,我们知道了ext2文件系统由块组组成,每个块组里面的组织形式.我们甚至直接把超级块和组描述符里面的内容,用十六进制形式展现了出来.这篇博文主要讲述如何 ...
- Linux 文件系统及 ext2 文件系统
linux 支持的文件系统类型 Ext2: 有点像 UNIX 文件系统.有 blocks,inodes,directories 的概念. Ext3: Ext2 的加强版,添加了日志的功 ...
- Linux ext2文件系统小结
本文来源:http://learn.akae.cn/media/ch29s02.html 有修改 1.ext2文件系统整体布局 一个磁盘可以划分成多个分区,每个分区必须先用格式化工具(例如某种mkfs ...
- linux之EXT2文件系统--理解block/block group/索引结点inode/索引位图
0. 文件系统和图书馆 在linux上操作文件,和在图书馆借书是非常相似的. 硬盘上的文件系统,好比图书馆的书架:而vfs则是图书馆的管理系统. 内核的工作: 1. 维护一个文件的目录树(dentry ...
- ext2文件系统了解
一个磁盘可以划分成多个分区,每个分区必须先用格式化工具(例如mkfs命令)格式化成某种格式的文件系统,然后才能存储文件,格式化的过程会在磁盘上写一些管理存储布局的信息.下以ext2文件系统为例说明文件 ...
- C语言实现简易EXT2文件系统,ext2文件系统体会-创建文件系统
§ 0x00 为什么学习ext2 这个文件系统是当初生产级别的: 实现最为简单. 与现代文件系统相比的缺点: 无事务: 不感知固态硬盘. 0x01 制作一个虚拟磁盘 通过dd命令实现. dd if=/ ...
- Linux EXT2文件系统结构分析(详情见附件)
Linux的第一个版本是基于Minix文件系统的.当 Linux成熟时,引入了扩展文件系统(Ext FS) ,它包含了几个重要的扩展,但提供的性能不令人满意.在 1994 年引入了第二扩展文件系统(s ...
- 转:ext2文件系统详解
第一部分磁盘的物理组成 磁盘的基本概念: 扇区为最小的物理存储单位,每个扇区为512字节. 将扇区组成一个圆,那就是柱面,柱面是分区的最小单位. 第一个扇区很重要,里面有硬盘主引导记录(Masterb ...
- ext显示服务器文件,使用linux的fsck.ext2命令检查及修复ext2文件系统
使用linux的fsck.ext2命令检查及修复ext2文件系统 发布时间:2020-07-18 13:40:16 来源:亿速云 阅读:138 作者:清晨 栏目:服务器 不懂使用linux的fsck. ...
最新文章
- CentOS7安装笔记:minio分布式集群搭建
- PMP知识点(二、整合管理)
- 【一起去大厂系列】针对left join以及limit的两条优化小技巧
- [转载]PHP 计算时间差
- 强迫症告辞!三星Galaxy S11这“凌乱”的后置5摄,感受下
- LVM (逻辑卷)的增加、扩容、缩小、删除操作
- codeproject
- 测试开发工程师必知必会
- MDIO总线简单介绍
- 批量PDF文件合并用什么软件?这两个宝藏软件赶快收藏起来
- win10彻底关闭更新
- 危化品柜颜色如何区分?
- muduo源码剖析——Singleton单例模式之懒汉模式与DCL双重检查
- 用C语言写俄罗斯方块
- python modis数据拼接_python调用HEG工具批量处理MODIS数据的方法及注意事项
- passport策略之passport-facebook使用facebook认证
- Native Instruments Supercharger GT Mac(仿真电子管压缩器)特别版
- 工作之余想线上学习软件测试靠谱么?
- 普尔世PULS电源维修PAS395电容充电器维修
- 字节跳动多篇论文入选 CVPR 2021,精选干货都在这里了
热门文章
- js转换html为pdf文件怎么打开方式,pdf.js实现在HTML下直接浏览pdf文档,无需插件即可实现...
- Android判断CPU是否为x86,如何判断. NET 程序集是否编译为 x86,x64或者任何 CPU_visual-studio_开发99编程知识库...
- 禁止服务器的协议,Windows 服务器禁用 SSL 2 和 SSL 3 协议
- toad for oracle xpert edition,Toad for oracle 软件产品模块对比,方便大家选型
- python 链式比较 2._特色的Python序列解包、链式赋值、链式比较
- java repaint_java repaint()无效
- python pandas聚合_Python Pandas分组聚合的实现方法
- 高压模块性相关的几个问题测量
- 第十六届智能车竞赛参赛队伍提问-2021-6-15
- 2021年春季学期-信号与系统-第五次作业参考答案-第五小题