给大家带来Ext3和Reiserfs文件体系占用空间的对照
每一个开发团队都对他的发行版做过测试后放出的.那些国际知名的大品牌更是如此。Ext3文件体系和reiserfs文件体系如今linux体系上长短常盛行的两种。上面我们来对照一下这两种文件体系自己对硬盘空间的占用情形。由于我的硬盘分区已基础定好,不简单变动了,以是就利用文件的体例创立文件来举行对照──究竟我们这里对照的不是速率,而是空间──但是如许做不知是不是和实践设备上有区分。
(一)起首,我们必要一个有充足余暇空间的分区来做这个实行。我的余暇的空间还不到5GB,以是只好把实行的每一个最年夜分区做到2GB.我的实行中先是做100MB的“分区”的对照,然后是1GB分区的对照,最初是2GB分区的对照。我们所必要的工具也非常复杂:dd工具,用于较快地获得一个年夜文件;创立文件的工具mkfs.ext3和mkfs.reiserfs;df工具,用来检察分区占用情形。
这里提早申明我的体系的复杂情形:内核为2.6.23.1,本人编译的。命令交换有aliasll=ls-l.reiserfs版本是3.6的。
(二)如今就完工:
1.创立100M的文件:
ddif=/dev/zeroof=d-ext3fsbs=1Mcount=100
ddif=/dev/zeroof=d-reiserfsbs=1Mcount=100
2.创立文件体系:
2.1创立ext3文件体系:
togry@xiaowp:~/disks$sudomkfs.ext3d-ext3fs
mke2fs1.40.4(31-Dec-2007)
d-ext3fsisnotablockspecialdevice.
Proceedanyway?(y,n)y
Filesystemlabel=
OStype:Linux
Blocksize=1024(log=0)
Fragmentsize=1024(log=0)
25688inodes,102400blocks
5120blocks(5.00%)reservedforthesuperuser
Firstdatablock=1
Maximumfilesystemblocks=67371008
13blockgroups
8192blockspergroup,8192fragmentspergroup
1976inodespergroup
Superblockbackupsstoredonblocks:
8193,24577,40961,57345,73729
Writinginodetables:done
Creatingjournal(4096blocks):done
Writingsuperblocksandfilesystemaccountinginformation:done
Thisfilesystemwillbeautomaticallycheckedevery31mountsor
180days,whichevercomesfirst.Usetune2fs-cor-itooverride.
2.2创立reiserfs文件体系:
togry@xiaowp:~/disks$sudomkfs.reiserfsd-reiserfs
mkfs.reiserfs3.6.19(2003www.namesys.com)
Apairofcredits:
LycosEurope(www.lycos-europe.com)hadasupportcontractwithusthat
consistentlycameinjustwhenwewouldotherwisehavemissedpayroll,andthat
theykeptdoublingeveryyear.Muchthankstothem.
JeremyFitzhardingewrotetheteahash.ccodeforV3.ColinPlumbalso
contributedtothat.
d-reiserfsisnotablockspecialdevice
Use-ftoforceover
///////////////呵呵,不让我默许在文件上创立文件体系。
togry@xiaowp:~/disks$sudomkfs.reiserfsd-reiserfs-f
mkfs.reiserfs3.6.19(2003www.namesys.com)
Apairofcredits:
TheDefenseAdvancedResearchProjectsAgency(DARPA,www.darpa.mil)is
the
primarysponsorofReiser4.DARPAdoesnotendorsethisproject;itmer
ely
sponsorsit.
JeremyFitzhardingewrotetheteahash.ccodeforV3.ColinPlumba
lso
contributedtothat.
d-reiserfsisnotablockspecialdevice
Continue(y/n):y
Guessingaboutdesiredformat..Kernel2.6.23.1.build51isrunning.
Format3.6withstandardjournal
Countofblocksonthedevice:25600
Numberofblocksconsumedbymkreiserfsformattingprocess:8212
Blocksize:4096
Hashfunctionusedtosortnames:"r5"
JournalSize8193blocks(firstblock18)
JournalMaxtransactionlength1024
inodegenerationnumber:0
UUID:3bb7a2da-b78a-462f-9ea0-a004171c8667
Initializingjournal-0%....20%....40%....60%....80%....100%
Syncing..ok
Tellyourfriendstouseakernelbasedon2.4.18orlater,andespeciallyn
ota
kernelbasedon2.4.9,whenyouusereiserFS.Havefun.
ReiserFSissuccessfullycreatedond-reiserfs.
3.如许创立好文件体系以后,入手下手挂载它们,检察他们的可用空间吧。
togry@xiaowp:~/disks$sudomountd-ext3fsext/-text3-oloop
togry@xiaowp:~/disks$sudomountd-reiserfsrei/-treiserfs-oloop
togry@xiaowp:~/disks$df
文件体系1K-块已用可用已用%挂载点
……(此处将不干系的器材略往)
/home/togry/disks/d-ext3fs
991505664883667%/home/togry/disks/ext
/home/togry/disks/d-reiserfs
102392328406955233%/home/togry/disks/rei
哟!reiserfs文件体系居然占用了这么年夜的中央,三分之一都没有了。
4.创立两个1GB的文件举行对照。比拟后面,这里要大略一些。
drwxr-xr-x2togrytogry482008-01-1117:07ext
-rw-r――r――1togrytogry10737418242008-01-2220:53ext3
drwxr-xr-x2togrytogry482008-01-1117:07rei
-rw-r――r――1togrytogry10737418242008-01-2220:50reiserfs
个中etc3和reiserfs两个文件就是“设备”。
5.创立文件体系
togry@xiaowp:~/disks$sudomkfs.reiserfsreiserfs-f
mkfs.reiserfs3.6.19(2003www.namesys.com)
Apairofcredits:
EdwardShushkinwrotetheencryptionandcompressionfileplugins,andtheV3
journalrelocationcode.
LycosEurope(www.lycos-europe.com)hadasupportcontractwithusthat
consistentlycameinjustwhenwewouldotherwisehavemissedpayroll,andthat
theykeptdoublingeveryyear.Muchthankstothem.
reiserfsisnotablockspecialdevice
Continue(y/n):y
Guessingaboutdesiredformat..Kernel2.6.23.1.build51isrunning.
Format3.6withstandardjournal
Countofblocksonthedevice:262144
Numberofblocksconsumedbymkreiserfsformattingprocess:8219
Blocksize:4096
Hashfunctionusedtosortnames:"r5"
JournalSize8193blocks(firstblock18)
JournalMaxtransactionlength1024
inodegenerationnumber:0
UUID:2b05d990-54b3-49c7-a197-79807a173c5b
Initializingjournal-0%....20%....40%....60%....80%....100%
Syncing..ok
Tellyourfriendstouseakernelbasedon2.4.18orlater,andespeciallynota
kernelbasedon2.4.9,whenyouusereiserFS.Havefun.
ReiserFSissuccessfullycreatedonreiserfs.
togry@xiaowp:~/disks$sudomkfs.ext
mkfs.ext2mkfs.ext3
togry@xiaowp:~/disks$sudomkfs.ext3ext
ext/ext3
togry@xiaowp:~/disks$sudomkfs.ext3ext3
mke2fs1.40.4(31-Dec-2007)
ext3isnotablockspecialdevice.
Proceedanyway?(y,n)y
Filesystemlabel=
OStype:Linux
Blocksize=4096(log=2)
Fragmentsize=4096(log=2)
131072inodes,262144blocks
13107blocks(5.00%)reservedforthesuperuser
Firstdatablock=0
Maximumfilesystemblocks=268435456
8blockgroups
32768blockspergroup,32768fragmentspergroup
16384inodespergroup
Superblockbackupsstoredonblocks:
32768,98304,163840,229376
Writinginodetables:done
Creatingjournal(8192blocks):done
Writingsuperblocksandfilesystemaccountinginformation:done
Thisfilesystemwillbeautomaticallycheckedevery28mountsor
180days,whichevercomesfirst.Usetune2fs-cor-itooverride.
6.挂载文件体系以后检察空间的残剩情形
togry@xiaowp:~/disks$df
文件体系1K-块已用可用已用%挂载点
……
/home/togry/disks/ext3
1032088340929455684%/home/togry/disks/ext
/home/togry/disks/reiserfs
10485403284010157004%/home/togry/disks/rei
togry@xiaowp:~/disks$df-h
文件体系容量已用可用已用%挂载点
……
/home/togry/disks/ext3
1008M34M924M4%/home/togry/disks/ext
/home/togry/disks/reiserfs
1.0G33M992M4%/home/togry/disks/rei
仿佛文件空间的占用情形相称了。让我们再看看2GB文件体系里的情形:
7.创立文件:
ddif=/dev/zeroof=ext3bs=1Gcount=2
ddif=/dev/zeroof=reiserfsbs=1Gcount=2
看一下了局:
drwxr-xr-x2togrytogry482008-01-1117:07ext
-rw-r――r――1togrytogry21474836482008-01-2221:30ext3
drwxr-xr-x2togrytogry482008-01-1117:07rei
-rw-r――r――1togrytogry21474836482008-01-2221:35reiserfs
8.创立文件体系:
togry@xiaowp:~/disks$sudomkfs.ext3ext3
mke2fs1.40.4(31-Dec-2007)
ext3isnotablockspecialdevice.
Proceedanyway?(y,n)y
Filesystemlabel=
OStype:Linux
Blocksize=4096(log=2)
Fragmentsize=4096(log=2)
262144inodes,524288blocks
26214blocks(5.00%)reservedforthesuperuser
Firstdatablock=0
Maximumfilesystemblocks=536870912
16blockgroups
32768blockspergroup,32768fragmentspergroup
16384inodespergroup
Superblockbackupsstoredonblocks:
32768,98304,163840,229376,294912
Writinginodetables:done
Creatingjournal(16384blocks):done
Writingsuperblocksandfilesystemaccountinginformation:done
Thisfilesystemwillbeautomaticallycheckedevery25mountsor
180days,whichevercomesfirst.Usetune2fs-cor-itooverride.
togry@xiaowp:~/disks$sudomkfs.reiserfsreiserfs-f
mkfs.reiserfs3.6.19(2003www.namesys.com)
Apairofcredits:
BigStorage(www.bigstorage.com)contributestoourgeneralfundeverymonth,
andhasdonesoforquitealongtime.
LycosEurope(www.lycos-europe.com)hadasupportcontractwithusthat
consistentlycameinjustwhenwewouldotherwisehavemissedpayroll,andthat
theykeptdoublingeveryyear.Muchthankstothem.
reiserfsisnotablockspecialdevice
Continue(y/n):y
Guessingaboutdesiredformat..Kernel2.6.23.1.build51isrunning.
Format3.6withstandardjournal
Countofblocksonthedevice:524288
Numberofblocksconsumedbymkreiserfsformattingprocess:8227
Blocksize:4096
Hashfunctionusedtosortnames:"r5"
JournalSize8193blocks(firstblock18)
JournalMaxtransactionlength1024
inodegenerationnumber:0
UUID:0d3e668d-77e5-4b5d-a157-a3e937cbc7f4
Initializingjournal-0%....20%....40%....60%....80%....100%
Syncing..ok
Tellyourfriendstouseakernelbasedon2.4.18orlater,andespeciallynota
kernelbasedon2.4.9,whenyouusereiserFS.Havefun.
ReiserFSissuccessfullycreatedonreiserfs.
这回创立文件体系的工夫都比之前长了。
9.挂载文件体系,看了局:
togry@xiaowp:~/disks$sudomountext3ext-text3-oloop&&sudomountreiserfsrei-treiserfs-oloop
togry@xiaowp:~/disks$df
文件体系1K-块已用可用已用%挂载点
……
/home/togry/disks/ext3
20642086868018906724%/home/togry/disks/ext
/home/togry/disks/reiserfs
20970843284020642442%/home/togry/disks/rei
togry@xiaowp:~/disks$d
12下一页
学习python,无论你是打算拿他当主要开发语言,还是当辅助开发语言,你都应该学习他,因为有些时间我们耗不起。
给大家带来Ext3和Reiserfs文件体系占用空间的对照
看不懂man文档的人.在linux中,命令可分为系统基本命令和应用程序命令.系统基本命令是所有的unix类系统都支持的命令,走到哪都不变,只要是unix类系统上就肯定有.f-h
文件体系容量已用可用已用%挂载点
……
/home/togry/disks/ext3
2.0G68M1.9G4%/home/togry/disks/ext
/home/togry/disks/reiserfs
2.0G33M2.0G2%/home/togry/disks/rei
(三)综上所做的实行,我能够对照一定的说关于ext3文件体系,当分区增年夜时,它自己所利用的空间也随之较快的增加;而reiserfs体系的增加速率却远没有ext3文件体系那样快。别的因为reiserfs是真实的日记文件体系,以是它对照合用于常常对文件读和写的中央;而ext3文件体系也具有必定的日记功效,可是它的功能就没那末好了。而关于小的分区,好比/boot,利用ext3大概是ext2作为基础上是只读的分区就长短常幻想的
</P></p>上一页12
文件处理命令:file、mkdir、grep、dd、find、mv、ls、diff、cat、ln linux鸟哥的私房菜,第三版,基础篇,网上有pdf下的,看它的目录和每章的介绍就行了,这个绝对原创! 得到到草率的回答或者根本得不到任何Linux答案。越表现出在寻求帮助前为解决问题付出的努力,你越能得到实质性的帮助。 首先Linux是开源的,这也是最主要的原因,想学windows,Unix,对不起我们没源代码。也正是因为这样,Linux才能够像滚雪球一样越滚越大,发展到现在这种规模。 我学习Linux的心得体会 ,希望对大家的学习有所帮助,由于水平有限,本文难免有所欠缺,望请指正。 一些显而易见的小错误还是用vi改正比较方便。以后的大一点的程序就得在Linux下调试了,因为有的头文件在VC里面说找不到。? 这也正是有别的OS得以存在的原因,每个系统都有其自身的优点。? 编程学习及开发,Linux是免费,开源的操作系统,并且可开发工具相当多,如果您支持自由软件,一定要同广大热爱自由软件人士一同为其不懈努力。 随着实验课程的结束,理论课也该结束了,说实话教OS的这两位老师是我们遇到过的不错的老师(这话放这可能不太恰当).
页:
[1]