ext2,ext3,reiserf,JFS,XFS,我到底该选什么文件系统(ZT)

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
surran
帖子: 101
注册时间: 2009-06-07 15:58

ext2,ext3,reiserf,JFS,XFS,我到底该选什么文件系统(ZT)

#1

帖子 surran » 2009-07-11 12:22

ext2,ext3,reiserf,JFS,XFS,我到底该选什么文件系统(磁盘格式)

这里讲的是个人使用问题,大牛们有空帮忙改改。

事情的起因是这样,给Ubuntu 9.04增加了个80GB的硬盘,用gparted分区格式化,因为观念中一直有个reiserfs的影子,所以没怎么考虑就选了reiserfs,把整个硬盘格式化成一个区。加载到挂载点上(warehouse),修改/etc/fstab。可以正常使用了,随便拷点东西,3GB,还不错。

然后,突发奇想,放狗一搜,看到这篇:
Linux各种文件系统(ext3,ReiserFS,jfs,xfs)的性能
感谢翻译。

动摇,从名字上就能看出,当仓库用的地方,万一有个好歹的,岂止是肠子悔青,于是马上格成ext3。

但,我还什么都没干,80GB的硬盘就被占用了4GB的空间,一部720p啊。

一边等回帖一边继续放狗。
题外话,ubuntu的fstab里面用UUID来指定挂载的磁盘,UUID就是磁盘的编号(反正我这么理解的),那么如何查看UUID捏?

代码: 全选

ls -l /dev/disk/by-uuid
其实在*nix系统里面,分区好像没什么实际意义,“区”这个名称,只是用来沿袭来自windows的使用习惯而已。
除了搜到上面那篇的原文外(06年的,确实老了。),还得到这篇,觉得对个人用户比较有意义,转过来。
which to use: ext3, JFS, XFS, ReiserFS?
全文如下:翻译烂,将就看。
which to use: ext3, JFS, XFS, ReiserFS?

* From: Hugo Vanwoerkom <hvw59601@xxxxxxxxx>
* Date: Sat, 19 Jan 2008 09:17:54 -0600

Douglas A. Tutty wrote:

On Fri, Jan 18, 2008 at 04:11:17PM -0500, Jimmy Wu wrote:

I am trying to decide on which file systems to use for a Debian
install on a personal laptop. It's a Thinkpad T61 with one 160 GB HD.
I've looked around on Google, and come up with a lot of frustratingly
conflicting advice. For example, an article from
debian-administration touts XFS as the best in performance. But other
sites mention that XFS may be more vulnerable to corruption on a
crash/power outage than the other file systems. Then, people disagree
on the performance of ext3 vs ReiserFS.


Part of the confusion is the "religious" nature of the issue, part is
the changing nature and experience of the filesystems in question.
Here's a summary (sorry, no references):

对于这个问题的举棋不定,一部分是因为对于文件系统有虔诚的宗教信仰般的情结,一部分是来自改变“信仰”以及实际使用而带来的疑惑所致,下面小结一下:

ext2 = long-time default linux fs. bugs have been worked out. Inspired
by UNIX ffs (fast filesystem) with decades of history. Note that
decades ago, drives were puny compared to today.

ext2 使用了相当长时间的linux默认磁盘格式,bug已经修补了一堆。它由UNIX文件格式ffs(fast filesystem)演化而来,至今已有20年历史。请注意,20年前的硬件驱动程序跟今天的比起来只是小巫见大巫。

ext3 = ext2 + metadata(default) journaling. Therefore slower than ext2.

exit3 ext2+日志系统(metadata),于是比ext2慢。

Reiserfs = designed by one person who has had some kind of problems (I
haven't looked into it). If damage occurs (e.g. unclean shutdown), may
not be able to fix the damage and loses data.

Reiserfs 由某个问题男设计。(译者:据说那家伙已经被抓了,现在监狱里面,没机会继续开发reiserfs了。)如果发生如非正常关机这样的状况,也许无法运功疗伤,要丢失数据了。

XFS = desiged by SGI for smooth data transfer of large image /
multi-media files (streaming video editing) on IRIX (their in-house
UNIX). Great for sequential access to large files. Origionally
propriatary for Irix, ported to Linux. Irix is no more. I don't know
who is following XFS to ensure problems don't arise.

XFS 由SGI设计,为了在IRIX上平滑地传输大型文件或者多媒体文件(比如:编辑流媒体文件)。在频繁访问大文件方面表现牛逼。属于IRIX专利,移植到linux。
IRIX已不在,真不知道谁来继续XFS,谁来保证使用安全。

JFS = designed by IBM for large databases, focus on fast checks after an
unclean shutdown to get the server back up fast. To do that safely,
note that speed is less of an issue than for the target for XFS. It was
origionally written for OS/2 and then ported by IBM for AIX (their
in-house UNIX). I used to use JFS until a thread somewhere around 6
months ago when we heard from the Debian maintainer for the JFS utils
that IBM had stopped active development and at that time only had one
person watching JFS for bugs on a very part-time basis. That IBM
employee said that he could no longer recommend JFS for production
environments. After this, I changed back to ext3.

JFS 由IBM为大型数据库设计(译者:看到IBM就觉得牛逼),着力于在非正常关机后能够快速地检测,以使服务器快速恢复。为安全地进行如上操作,相比XFS的设计目的而言,速度就靠边了。它最初是为了OS/2编写的,后来移植到了AIX上。我过去一直用JFS,直到6个月前的某天看到一个帖子。帖子说:IBM已经停止了JFS的开发,转而由个把人利用点业余时间看着JFS,记一下bug情况。而那个IBM指派的“负责人”表示,他再也不推荐JFS用于生产环境。
从此,我改用ext3。

In an attempt to get some definitive answers, I threw together some of
the statements I've seen, and all I am asking for is verification (a
simple true/false is enough for most of them).
So, here goes:

为了得到点明确的答案,我把所查到的部分集中起来。我想要的是 求真务实。(给个对/错就行)

(1) ext3 mounts and unmounts slowly, resulting in increased boot times.

(1)ext3 挂载和卸载慢,结果导致启动时间延长。

Mounts of an intact filesystem should be visually instantaneous. If the
filesystem was not cleanly shutdown, you should be worried more about
data integrity than speed of cleaning.

应该说挂载一个文件系统时的速度快慢是易于察觉的。但如果系统非正常关机,相比于恢复的速度,大概你更关心数据的完整性。

(2) Neither JFS nor XFS can be made smaller, although they can be
extended if needed.

(2)JFS和XFS格式的空间能被划分得很小很小,而一旦需要,它们随时能被扩大。


Minor detail. How many times do you try to shrink a filesystem. If you
do need to, make a tarball or, using LVM, make a new LV and copy the
data over, then remove the old LV.

最没意义的细节。能有多少次需要折腾文件系统?!如果真需要,先打个tar包,然后用LVM,建一个新的LVM并把数据包复制过去,最后删掉旧的LV。

(3) JFS performance degrades on larger filesystems, but is least CPU
intensive for smaller file systems.

(3)JFS 在大一点的文件系统上表现欠佳,但在小一点的文件系统上有一点CPU增强效果。

Depends on what you mean by performance and what you mean by larger
filesystems. The larger the filesystem, the larger the journal and the
more backup superblocks that need to be kept in sync.

要看你怎么定义"表现"和“大文件系统”了。系统越大,日志文件越大,需要进行扫描和备份的superblock更多。

(4) ReiserFS can be flaky on a system crash.

(4)ReiserFS在系统崩溃时会分崩离析。

ReiserFS is always flaky.

ReiserFS总是分崩离析。

(5) ReiserFS is the best choice for /var.

(5)ReiserFS是/var的最佳选择。

I used ReiserFS for about a week before my system got corrupted and I
had to reinstall. I wouldn't use it on anything.

在我的系统瘫患到不得不重装之前的1周里,我用的就是ReiserFS。我再也不用它了。

(6) On a continuum, XFS offers the best performance, ext3 offers the
most data integrity / chances of recovering from a crash, and JFS is
in the middle.

(6)综合看来,XFS有最佳磁盘表现,ext3提供了最好的数据完整性和灾难恢复可能,而JFS居于它们之间。

Apples, Oranges, and Pears.(这哥们打不出 囧 字,可怜)

囧……

(7) Mixing too many file systems in one system will degrade performance

(7)在一个系统里混合使用太多的磁盘格式将降低系统性能。

No. If you had a system for editing video, you could use ext2 except
for, e.g. /var/tmp on which you could have XFS (especially on its own
disk or raid0 array).

No。如果你有一个用于编辑视频的系统,除了如/var/tmp这样的地方用XFS外,你可以考虑使用ext2。(特别是系统盘或raid0阵列)

(8) Is there any advantage to using ext2 for /boot rather than ext3?

(8)把/boot弄成ext2是不是比弄成ext3更有好处?

Only in once instance: where drive space is limited you need a separate
/boot, using ext2 instead of ext3 saves the space for the journal.
Since the kernel doesn't change that often, you could leave /boot
mounted ro except when updating the kernel. In this case, a journal
doesn't really help unless you get a crash in the midst of a kernel
update.

只有一种情况:磁盘空间有限,你需要把/boot分开放置,用ext2而不是ext3可以省点日志空间。
由于kernel不经常变化,除了升级kernel之外的时间,你都可以把/boot加载成ro模式(Read Only)。在这种设置下,日志文件并不起作用,除非你升级kernel的时候系统崩了。

Bottom line for your situation:

Use ext3. If you want the ability to change the size of partitions, use
LVM. For a laptop, you may want to put everything in encrypted
partitions (with a separate /boot).

(这是个回帖,上面部分是别人给的建议,下面这段是发帖人的留言)
But all of that still gives me no reason to change all of my ext2 partitions to something else.

Hugo
后面还有个挺有价值的回帖
* From: "Paul Johnson" <baloo@xxxxxxxxx>
* Date: Sat, 19 Jan 2008 09:04:41 -0800

ext3 isn't noticably slower for user-environments, you can convert to
ext3 without reformatting, and ext2 has very poor crash recovery
compared to 3. tune2fs -j <device> and it'll convert your ext2 to
ext3.
怎么选,看自己的需求了,反正我留在ext3。

坛子里高人给了个方法,解决占用空间大的问题。

代码: 全选

sudo tune2fs -m 1 /dev/sdX
我现在只被占了940MB,据说不是系统盘,就不影响ext3的数据安全性能。(听起来,还是有影响嘛?!)
上次由 surran 在 2009-07-11 15:38,总共编辑 1 次。
ballakay
帖子: 157
注册时间: 2007-06-29 23:18
来自: 重庆大学机械学院

Re: ext2,ext3,reiserf,JFS,XFS,我到底该选什么文件系统(ZT)

#2

帖子 ballakay » 2009-07-11 13:35

个人推荐ext4!很好很强大!9.04之前的版本最好用ext3!
头像
jandyzhu
帖子: 3331
注册时间: 2008-04-02 13:26
来自: 上海
联系:

Re: ext2,ext3,reiserf,JFS,XFS,我到底该选什么文件系统(ZT)

#3

帖子 jandyzhu » 2009-07-11 19:30

如果不知道选什么,就选ext3。
头像
leeaman
帖子: 30702
注册时间: 2007-02-02 18:14
系统: debian sid

Re: ext2,ext3,reiserf,JFS,XFS,我到底该选什么文件系统(ZT)

#4

帖子 leeaman » 2009-07-11 19:47

呵呵,好像除了ext都没有人维护了 :em20
醉了星星,醉月亮●●●●●The Long Way To Go(*^_^*)
头像
HuntXu
帖子: 5776
注册时间: 2007-09-29 3:09

Re: ext2,ext3,reiserf,JFS,XFS,我到底该选什么文件系统(ZT)

#5

帖子 HuntXu » 2009-07-11 19:50

半年ext4路过...确实很好很强大...
HUNT Unfortunately No Talent...
头像
qiang_liu8183
论坛版主
帖子: 10699
注册时间: 2006-09-10 22:36
系统: Arch Debian
来自: 北京

Re: ext2,ext3,reiserf,JFS,XFS,我到底该选什么文件系统(ZT)

#6

帖子 qiang_liu8183 » 2009-07-11 20:42

暂时ext4
看破、放下、自在、随缘、念佛
真诚、清净、平等、正觉、慈悲
头像
Jarson
帖子: 2371
注册时间: 2008-07-21 9:44
来自: 深圳
联系:

Re: ext2,ext3,reiserf,JFS,XFS,我到底该选什么文件系统(ZT)

#7

帖子 Jarson » 2009-07-11 20:59

个人使用,ext系列
头像
BigSnake.NET
帖子: 12522
注册时间: 2006-07-02 11:16
来自: 廣州
联系:

Re: ext2,ext3,reiserf,JFS,XFS,我到底该选什么文件系统(ZT)

#8

帖子 BigSnake.NET » 2009-07-11 21:55

Hans 进去了, 选 ext4
否则我就选 reiser4 了
^_^ ~~~
要理解递归,首先要理解递归。

地球人都知道,理论上,理论跟实际是没有差别的,但实际上,理论跟实际的差别是相当大滴。
头像
newiz
帖子: 186
注册时间: 2008-04-03 22:04

Re: ext2,ext3,reiserf,JFS,XFS,我到底该选什么文件系统(ZT)

#9

帖子 newiz » 2009-07-11 22:22

904默认是ext3,可以选择ext4

个人用户,保守的话可以选择ext3,否则可以试试ext4。我从904正式发布后用ext4到现在没有问题。
头像
guiwen1158
帖子: 1078
注册时间: 2008-05-11 11:10
来自: 深圳
联系:

Re: ext2,ext3,reiserf,JFS,XFS,我到底该选什么文件系统(ZT)

#10

帖子 guiwen1158 » 2009-07-11 22:38

这篇文章我也恰好在前几天前用手机上网看了下,不过是通Arch Wiki的连接找到英文的。
还时觉得ext系列不错,不过我现在用的RFS,先用着吧。
billbear
帖子: 3681
注册时间: 2008-05-03 23:42

Re: ext2,ext3,reiserf,JFS,XFS,我到底该选什么文件系统(ZT)

#11

帖子 billbear » 2009-07-11 23:26

翻译得确实是一塌糊涂 :)
头像
sammysun
帖子: 4088
注册时间: 2007-12-08 23:33
来自: SCUT-guangzhou

Re: ext2,ext3,reiserf,JFS,XFS,我到底该选什么文件系统(ZT)

#12

帖子 sammysun » 2009-07-12 0:07

ext4
fnan
帖子: 919
注册时间: 2009-07-01 22:04

Re: ext2,ext3,reiserf,JFS,XFS,我到底该选什么文件系统(ZT)

#13

帖子 fnan » 2009-07-12 13:32

可惜ext4不完美, 一次删除很多大文件时会死机。
bash不如perl精妙,学不到lisp的皮毛,远不够c++强悍,不过可以用。
头像
大宝
帖子: 3050
注册时间: 2008-06-30 22:32
联系:

Re: ext2,ext3,reiserf,JFS,XFS,我到底该选什么文件系统(ZT)

#14

帖子 大宝 » 2009-07-13 22:40

一直在XFS和Ext4之间徘徊~
之前也不用Ext3
经过一番思想斗争,最终家中的本本/用Ext4,/home用XFS;而公司的,/及/home都用Ext4
得出的结果:做成一模一样的系统(装的软件都是一样的,家中的还多了好几款大型游戏),家中的本本HP2209从上到下,除了音响,哪一处配置都不及公司的台式HP3728,但启动速度比公司的3728快了近三秒~
上次由 大宝 在 2009-07-13 23:08,总共编辑 1 次。
头像
nuanhuai
帖子: 7813
注册时间: 2009-03-10 13:04

Re: ext2,ext3,reiserf,JFS,XFS,我到底该选什么文件系统(ZT)

#15

帖子 nuanhuai » 2009-07-13 22:48

/home 先ext3
其他的折腾去吧 :em11
回复