为什么必须多个文件系统“类型”存在?
文件系统提供了一种在磁盘上分类(并因此导航)数据的机制。这对我来说很有意义。如果我想找到一些“组”数据,我不想自己记住字节偏移。我宁愿有一些可以动态导航的查找系统。
但是,我不明白为什么必须存在不同的文件系统。例如,为什么ntfs,fat16/32,ext?
为什么不同的操作系统(Linux,Windows等)应该依靠不同的方法来组织磁盘上的数据?
File systems provide a mechanism for categorizing (and thus navigating) data on a disk. This makes sense to me. If I want to find some "group" of data, I don't want to have to remember byte offsets myself. I would rather have some look up system that I can dynamically navigate.
However, I don't understand why different file systems must exist. For example, why NTFS, FAT16/32, EXT?
Why should different operating systems (Linux, Windows, etc.) rely on different methods for organizing data on disk?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我认为一个更合适的问题(以及您想回答的问题)是“为什么存在 do 存在多个文件系统?”。答案取决于特定的文件系统,但在许多情况下,它归结为三个原因的一个(或组合):
胖家庭
原始的脂肪文件系统是在1970年代后期引入的。在许多方面,脂肪很棒:它的内存足迹较低且设计简单。 iirc,到这个日期,它仍然用于嵌入式系统中。
文件系统的脂肪家族包括原始的8位脂肪,Fat12,Fat16和Fat32。 (还有其他几个版本,但它们与此答案无关。)每个版本的胖文件系统之间都有几个功能差异,其中一些展示了创建新版本的动机。例如,从8位脂肪转移到fat12:
这些功能都不是单独的,可能是创建FAT12的动机,但是这些功能共同赢得了8位脂肪的明显胜利。请参阅 fat wikipedia page ,以获取更完整的差异列表。
NTF
在讨论NTF之前,我们应该研究其前身:HPFS。脂肪的简单设计被证明是一个问题:它限制了脂肪所能提供的功能以及其性能。 HPF的创建是为了解决脂肪的缺点。
位于 应该足够强迫地证明为什么创建了HPF,但是NTF如何适应图片? HPFS是Microsoft和IBM的联合项目。 由于意见上的几个差异,他们分开了,Microsoft创建了NTF。这是创建新文件系统的另一个原因:意见差异。这没有天生的错误,但是它确实具有偶尔分裂项目的副作用。
大家庭
与NTF一样,我们需要检查Ext的前身,以了解其为何创建。 EXT的前身是Minix文件系统。 Minix是为了教学目的而创建的,因此它很简单,并阐明了UNIX文件系统提供的几个复杂功能。 Linux支持的第一个文件系统是Minix文件系统。 minix文件系统的简单性很快就成为一个问题:
因此,创建了扩展的文件系统(即ext)来解决Minix文件系统的缺点。
在类似的徒劳中,创建了EXT2来解决Ext的缺点,依此类推。例如,Ext2添加了三个单独的时间戳(ATIME,CTIME和MTIME),EXT3添加日记帐和Ext4扩展存储限制。这些都是打破的更改,需要“新”文件系统。它们并不是版本之间唯一的更改,但是这些更改表明了为什么需要创建另一个文件系统。
为什么不同的操作系统使用不同的文件系统?
今天,几个文件系统已被广泛使用。 Apple设备上的Apple File System(APF),Windows设备上的NTF以及Linux上的几个不同的文件系统。为什么不同的操作系统使用不同的文件系统?对于Linux,原因很明显:Linux需要开源文件系统。这就是为什么它最初使用minix文件系统的原因。
对于Windows和Apple设备,不同的是,我们应该说,政治。 Microsoft创建了NTF来解决其认为重要的问题,Apple创建了APF来解决其认为重要的问题。商业操作系统供应商还创建了自己的文件系统来差异化。
Linux为什么使用几个不同的文件系统?
我们可以看到为什么不同的OSS使用不同的文件系统,但是仅在Linux上积极使用几个文件系统,例如。 EXT4,BTRFS,ZFS,XFS和F2FS。什么给?
Linux是一个不同的环境。 Linux内核源公开可用,可以由任何用户修改,启动和测试。因此,如果一个文件系统不支持您想要的功能或提供所需的性能,则可以创建一个新的文件系统(当然,说起来容易做起来难)。例如,
I think a more appropriate question (and the question you'd like answered) is "Why do multiple file systems exist?". The answer depends on the particular file system, but in many cases it comes down to one (or a mix of) of three reasons:
The FAT family
The original FAT file system was introduced in the late 1970s. In many ways, FAT is great: it has a low memory footprint, and simple design. IIRC, it's still used in embedded systems to this date.
The FAT family of file systems comprises of the original 8-bit FAT, FAT12, FAT16, and FAT32. (There are several other versions, but they're not relevant to this answer.) There were several feature-differences between each version of the FAT file systems, some of which demonstrate the motivation for creating a new version. For example, in moving from 8-bit FAT to FAT12:
None of these features individually were likely the motivation for the creation of FAT12, but together these features are a clear win over 8-bit FAT. Refer to the FAT Wikipedia page for a more complete list of differences.
NTFS
Before discussing NTFS, we should look at its predecessor: HPFS. The simple design of FAT turned out to be a problem: it constrained what features FAT could offer, and how it performed. HPFS was created to address the shortcomings of FAT. For example, HPFS provide several features FAT could not:
That should be compelling enough to demonstrate why HPFS was created, but how does NTFS fit into the picture? HPFS was a joint project by Microsoft and IBM. Due to several differences in opinion, they separated, and Microsoft created NTFS. This is another reason new file systems are created: difference in opinion. There's nothing inherently wrong with this, but it does have the side effect of occasionally fragmenting projects.
The extended family
As with NTFS, we need to examine the predecessor of ext to understand why it was created. The predecessor of ext is the MINIX file system. MINIX was created for teaching purposes, so it was simple and elided several complex features the UNIX file system offered. The first file system supported by Linux was the MINIX filesystem. The simplicity of the MINIX file system soon became an issue:
And thus, the extended file system (ie. ext) was created to address the shortcomings of the MINIX file system.
In a similar vain, ext2 was created to address the shortcomings of ext, and so on. For example, ext2 added three separate timestamps (atime, ctime, and mtime), ext3 adding journaling, and ext4 extended storage limits. These were all breaking changes which required a "new" file system. They weren't the only changes between versions, but these changes demonstrate why creating another file system was necessary.
Why do different operating systems use different file systems?
Several file systems are widely used today. Apple File System (APFS) on Apple devices, NTFS on Windows devices, and several different file systems on Linux. Why do different operating systems use different file systems? For Linux, the reason is obvious: Linux needed an open source file system. That's why it initially used the MINIX file system.
For Windows and Apple devices, the difference is more, shall we say, political. Microsoft created NTFS to address the issues it thought were important, and Apple created APFS to address the issues it thought were important. Commercial OS vendors also create their own file systems for product differentiation.
Why does Linux use several different file systems?
We can kinda see why different OSs use different file systems, but several file systems are actively in use on Linux alone, eg. ext4, Btrfs, ZFS, XFS, and F2FS. What gives?
Linux is a different environment. The Linux kernel source is openly available, and can be modified, booted, and tested by any user. So, if one file system does not support the features you want, or offer the performance you need, you can create a new file system (which is, of course, easier said than done). For example,
不同的操作系统使用不同的FS,因为每个OS都有不同的哲学和不同的目标。
例如,Windows使用NTF,因为它们需要安全且智能的FS(没有快速或小的哲学)
Ubuntu(大多数现代分布)使用Ext4(也支持其他分布)(也支持他人),主要是因为它简单而速度。
different OS uses different FS Because each of them has a different philosophy and different goals.
For example windows use ntfs because they want secure and smart FS (without have philosophy like fast or small)
Ubuntu (with most modern distributions) use ext4 (And also supports others) Mostly because its simple and speed.
我不认为这是技术性的,它只是不同的公司同时在同一时间工作,加上某些OSS(例如Windows和Mac)的封闭源性质,这使得其他公司很难复制完整的功能和非法来反向工程师,这就像为什么首先是不同的OSS。
I don't think it's something technical, it's just different companies worked on the same thing at the same time plus the closed source nature of some OSs like windows and mac which make it hard for other companies to replicate the full functionality and illegal to reverse engineer it, it's like why different OSs in the first place.