|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
每一个开发团队都对他的发行版做过测试后放出的.那些国际知名的大品牌更是如此。
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,无论你是打算拿他当主要开发语言,还是当辅助开发语言,你都应该学习他,因为有些时间我们耗不起。 |
|