快速业务通道

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

作者 佚名技术 来源 Linux系统 浏览 发布时间 2012-05-05
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.
Empire CMS,phome.net

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号