首页 | 资讯动态 | linux基础 | 系统管理 | 网络管理 | 编程开发 | linux数据库 | 服务器技术 | linux相关 | linux认证 | 嵌入式 | 下载中心 | 专题 | linux招聘 | HR | 镜像
OKLinux中文技术站
·设为首页
·加入收藏
·联系我们
系统管理: 中文环境 系统管理 桌面应用 内核技术 | Linux基础: 基础入门 安装配置 常用命令 经验技巧 软件应用 | Linux数据库: Mysql Postgre Oracle DB2 Sybase other
网络管理: 网络安全 网络应用 Linux服务器 环境配置 黑客安全 | 编程开发: PHP CC++ Python Perl Shell 嵌入式开发 java jsp | PHP技术: PHP基础 PHP技巧 PHP应用 PHP文摘
搜索中心 Linux招聘 Linux专题 Apache | Linux相关: 硬件相关 Linux解决方案 Linux认证 企业应用 其它Unix | 相关下载: 资料下载 参考手册 开发工具 服务器类 软路由 其它
 技术搜索:
会员中心 注册会员 高级搜索  
  → 当前位置:首页>系统管理>系统管理>正文

Ext3和Reiserfs文件系统占用空间的比较

http://www.oklinux.cn  2008-01-25  赛迪网 korn  会员收藏  游客收藏  【 】 
您查看的文章来源于http://www.oklinux.cn

Ext3文件系统和reiserfs文件系统现在linux系统上是非常流行的两种。下面我们来比较一下这两种文件系统本身对硬盘空间的占用情况。因为我的硬盘分区已经基本定好,不轻易更改了,所以就使用文件的方式创建文件来进行比较──究竟我们这里比较的不是速度,而是空间──然而这样做不知是否和实际设备上有区别。

(一)首先,我们需要一个有足够空闲空间的分区来做这个实验。我的空闲的空间还不到5GB,所以只好把实验的每个最大分区做到2GB。我的实验中先是做100MB的“分区”的比较,然后是1GB分区的比较,最后是2GB分区的比较。我们所需要的工具也十分简单:dd工具,用于较快地取得一个大文件;创建文件的工具mkfs.ext3和mkfs.reiserfs;df工具,用来查看分区占用情况。

这里提前说明我的系统的简单情况:内核为2.6.23.1,自己编译的。命令替换有alias ll='ls -l'。reiserfs版本是3.6的。

(二)现在就开工:

1.创建100M的文件:

dd if=/dev/zero of=d-ext3fs bs=1M count=100

dd if=/dev/zero of=d-reiserfs bs=1M count=100

2.创建文件系统:

2.1创建ext3文件系统:

togry@xiaowp:~/disks$ sudo mkfs.ext3 d-ext3fs 
mke2fs 1.40.4 (31-Dec-2007)
d-ext3fs is not a block special device.
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
25688 inodes, 102400 blocks
5120 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67371008
13 block groups
8192 blocks per group, 8192 fragments per group
1976 inodes per group
Superblock backups stored on blocks: 
8193, 24577, 40961, 57345, 73729

Writing inode tables: done 
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
2.2创建reiserfs文件系统:
togry@xiaowp:~/disks$ sudo mkfs.reiserfs d-reiserfs 
mkfs.reiserfs 3.6.19 (2003 www.namesys.com)

A pair of credits:
Lycos Europe (www.lycos-europe.com) had a support contract with us that
consistently came in just when we would otherwise have missed payroll, and that
they kept doubling every year. Much thanks to them.

Jeremy Fitzhardinge wrote the teahash.c code for V3. Colin Plumb also
contributed to that.

d-reiserfs is not a block special device
Use -f to force over
///////////////呵呵,不让我默认在文件上创建文件系统。
togry@xiaowp:~/disks$ sudo mkfs.reiserfs d-reiserfs -f
mkfs.reiserfs 3.6.19 (2003 www.namesys.com)

A pair of credits:
The Defense Advanced Research Projects Agency (DARPA, www.darpa.mil) is 
the
primary sponsor of Reiser4. DARPA does not endorse this project; it mer
ely 
sponsors it.

Jeremy Fitzhardinge wrote the teahash.c code for V3. Colin Plumb a
lso
contributed to that.


d-reiserfs is not a block special device
Continue (y/n):y
Guessing about desired format.. Kernel 2.6.23.1.build51 is running.
Format 3.6 with standard journal
Count of blocks on the device: 25600
Number of blocks consumed by mkreiserfs formatting process: 8212
Blocksize: 4096
Hash function used to sort names: "r5"
Journal Size 8193 blocks (first block 18)
Journal Max transaction length 1024
inode generation number: 0
UUID: 3bb7a2da-b78a-462f-9ea0-a004171c8667
Initializing journal - 0%....20%....40%....60%....80%....100%
Syncing..ok

Tell your friends to use a kernel based on 2.4.18 or later, and especially n
ot a
kernel based on 2.4.9, when you use reiserFS. Have fun.

ReiserFS is successfully created on d-reiserfs.

3.这样创建好文件系统之后,开始挂载它们,查看他们的可用空间吧。

togry@xiaowp:~/disks$ sudo mount d-ext3fs ext/ -t ext3 -o loop

togry@xiaowp:~/disks$ sudo mount d-reiserfs rei/ -t reiserfs -o loop

togry@xiaowp:~/disks$ df

文件系统 1K-块 已用 可用 已用% 挂载点

......(此处将不相干的东西略去)

/home/togry/disks/d-ext3fs

99150 5664 88366 7% /home/togry/disks/ext

/home/togry/disks/d-reiserfs

102392 32840 69552 33% /home/togry/disks/rei

哟!reiserfs文件系统竟然占用了这么大的地方,三分之一都没有了。

4.创建两个1GB的文件进行比较。相比前面,这里要简略一些。

drwxr-xr-x 2 togry togry 48 2008-01-11 17:07 ext

-rw-r--r-- 1 togry togry 1073741824 2008-01-22 20:53 ext3

共3页: 上一页 1 [2] [3] 下一页

上一篇:Java语言深入--java调用C/C 的过程   下一篇:J2SE综合--怎样取得class文件的路径

收藏于收藏夹】 【评论】 【推荐】 【打印】 【关闭
相关文档
·利用U盘加载控制器驱动来安装Linux系统
·Root用户以telnet方式登录Linux系统
·系统管理:修复Linux系统的Root密码
·详细分析Linux系统计算机死机的故障原因
·详细讲解安装配置Jboss的方法
·Ubuntu Linux系统中安装VirtualBox方法
·在Centos5下安装配置VNC的方法详细介绍
·Ubuntu Linux 6.06 LTS下安装Samba服务
·如何来清除Linux系统命令的历史记录
·Fedora Linux 8配置SAMBA服务的详细过程
·使用Linux Fdisk命令调整磁盘的分区结构
·Linux系统下的休眠与待机
·Linux系统下挂载SAN资源
·在Linux系统下创建删除新用户
·Centos 5.1安装NTFS读写支持
·Ubuntu Linux系统下Apache SSL配置方法
发表评论
密码: 匿名评论
评论内容:

(不超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规)
 
  最新文档
·VirtualBox为Ubuntu系统配置共享文件夹
·Ubuntu下安装Netgear WG511v2 无线网卡
·Redhat Enterprise Linux磁带机简单操
·Linux系统下创建DBCA报错的解决方法
·Fedora和XP双系统中网卡Realtek冲突问
·Ubuntu开机自动挂载Win分区
·ubuntu8.04如何访问其它分区
·Fedora 9的安全措施
· 移动Linux系统中的TMP分区
·双Linux和多Linux系统的安装方法介绍
·轻松设置Wine程序的中文显示
·Linux系统下强大的杀毒软件:Avast
  阅读排行
·在Linux系统下查看端口的使用情况及启
·在Linux操作系统下查看磁盘空间的好方
·使用源代码将 Glibc 升级到 2.6
·Useradd和Adduser添加用户工具使用方法
·Linux系统的头文件和库文件搜索路径
·Linux下推荐的常用应用程序列表
·Linux环境进程间通信——信号(上)
·设置GRUB默认启动系统及Menu.lst参数介
·Linux系统挂载U盘和硬盘光驱的问题
·Df命令:查看Linux磁盘剩余空间方法介
·什么是Linux?Linux与UNIX之间的关系
·Linux系统利用Crontab命令实现定时重启
·使用 ActiveScaffold 增强 Ruby on Rai
·Linux系统下常用命令及账户管理
·新手入门:手把手教你如何写Makefile
网摘收藏: