Windows file systems. Choosing the best

(2010) with some additions and clarifications.

Journaling

Before talking about file systems - let's briefly consider the concept of " logging«.

Journaling in one form or another is used in almost all modern file systems.

Journaling is used only during disk write operations, and is a kind of buffer for all such operations. This approach helps to solve problems that occur during a disk write operation, in which the computer shuts down, for example, due to a power outage. Without journaling, in such cases it is impossible to find out which files were written and which were not or were partially written.

When using journaling, the file is first written to a journal (or "log"). After that, the file is written to HDD and then removed from the log, after which the write operation is considered completed. If the power is turned off during the recording, then after turning on the system, the file system can check the journal and find pending operations.

The most the main problem when using journaling, it is that its use requires additional system resources. In order to reduce such overhead, journaled file systems do not write the entire file to the journal, but only certain metadata.

Ext file systems

Ext

Means " Extended» (extended) file system, and was the first to be designed specifically for linux-systems. There are 4 file systems in total today. Ext. The very first one is just Ext- was a major update of the OS FS Minix.

Characteristics Ext:

The developer is, and the first version appeared in 1992.

We will not consider it, because. You will most likely never encounter it again.

ext2

- non-journaling FS, released in 1993, the main task for which was to support devices up to 2 terabytes in size. Because at ext2 no logging - it performs much fewer write operations to disk, which affects the performance and scope of its application.

Characteristics:

  • maximum file size: 16GB - 2TB;
  • maximum partition size: 2 - 32 TB;
  • the maximum name size is 255 characters.
  • due to the low number of data write-delete operations, it is ideal for various flash drives;
  • at the same time modern SSD- disks have improved their performance life cycle(durability of drive elements) and some other features that level out the shortcomings ext2 as a non-journaled filesystem.

Ext3

- appeared in 2001, along with the release Linux Kernel 2.4.15. Actually is the same ext2, but with logging support. main goal Ext3 was the possibility of its backward compatibility with ext2 without the need to reformat partitions. The advantages include the fact that most of the testing, bug fixes, etc. For Ext3 was the same as in ext2 what did Ext3 more stable and faster FS.

Characteristics:

  • maximum file size: 16GB - 2TB (depending on block size);
  • maximum partition size: 2 - 32 TB (depending on block size);
  • suitable if you are using ext2 and you want to use logging;
  • due to its performance and stability, it will probably be the most suitable FS for database servers;
  • maybe not the best choice for servers, because does not support snapshots ( shapeshot) FS and difficulties with recovering deleted files.

Ext4

- as well as Ext3 is backwards compatible with previous versions FS. As a matter of fact, you can mount ext2 or Ext3 How Ext4- and under certain conditions to achieve greater productivity. You can also mount Ext4 How Ext3 without any side effects.

Ext4 The stable version was released in 2008. Is the first FS from the "family" Ext using the mechanism ", which allows you to achieve less file fragmentation and increase the overall performance of the file system. Besides, in Ext4 implemented lazy write mechanism ( ), which also reduces disk fragmentation and reduces CPU load. On the other hand, although the lazy write mechanism is used in many file systems, due to the complexity of its implementation, it increases the likelihood of data loss. See for more details.

Characteristics:

  • maximum file size: 16 TB;
  • maximum filename size: 255 characters.
  • the best choice for SSD;
  • best performance compared to previous Etx-systems;
  • it is also great as a file system for database servers, although the system itself is younger Ext3.

btrfs

- developed by the company Oracle in 2007. Its scheme is similar to ReiserFS, the basic principle of its work is the so-called. . btrfs allows you to dynamically allocate inodes, create snapshots of the FS during its operation, perform transparent file compression and defragment it in production mode.

Although the stable version btrfs not yet included in most distributions linux(today, judging by the post - only SUSE And Oracle Linux) - it may well replace Ext3/4 in the foreseeable future and already provides conversion opportunities Ext3/4 V btrfs. In addition, it is worth mentioning that one of the developers Ext, said that " btrfs is a step into the future.”

Characteristics:

  • maximum partition size: 16 EB;
  • maximum filename size: 255 characters.
  • due to performance, snapshots and other features - btrfs is an excellent file system for the server;
  • Oracle is also developing a replacement for NFS And CIFS, which is called CRFS and which is designed to improve performance for file storages with btrfs;
  • performance tests showed a lag btrfs from Ext4 on solid state media such as SSD and for operations on relatively small files:

ReizerFS

- Introduced in 2001, it implemented many features that could never be realized in Ext*. In 2004 to replace ReizerFS FS was released Reizer4.

At the same time, the development Reizer4 progresses very slowly, and still has limited support (?) in the kernel linux. At present, only ReiserFS .

Characteristics:

  • maximum file size: 1 EB ();
  • maximum partition size: 16 TB;
  • maximum file name size: 4032 bytes, but limited to 255 characters.
  • excellent performance when working with small files such as log files and is great for database servers or mail servers;
  • ReiserFS lends itself well to increasing the size of the volume - but does not support its reduction and encryption at the FS level;
  • future Reiser4 is still in question and btrfs remains the preferred(?) choice between these two FSs.

ZFS

- it is worth mentioning here, because it was also developed by the company Oracle and has features similar to btrfs And ReizerFS. She also became quite famous after the company Apple about the intention to use it as the default FS. First release ZFS took place in 2005.

Due to restrictions due to the license - ZFS cannot be included in the kernel linux, however, its support is possible using the mechanism Linux's (FUSE).

Characteristics:

  • maximum file size: 16 EB ();
  • maximum partition size: 256 ZiB (Zebibyte);
  • maximum file name size: 255 bytes.
  • shows excellent performance when working with large disk arrays;
  • supports the ability to combine disks into arrays, create FS snapshots, and work with "stratified mapping" ( ) data;
  • there may be difficulties when trying to install and use in linux-systems, due to the need to use FUSE.

Swap

Swap— is not a file system at all. File or section with swap-om used by the system virtual memory kernel and has no filesystem structure at all. It cannot be mounted and read data from it, because. swap used exclusively by the kernel linux to write memory pages not disk. Usually - swap is used only when the OS lacks free RAM and "dumps" some of the data from memory into swap for her release.

There was a time when the question posed in the title of an article simply did not stand before users. Even though there were more than one file system even before the first personal computers, there was usually no choice. Simply because there were many different incompatible (or only partially compatible) computer architectures, behind each stood a specific company using its own operating system and having its own ideas about "what is good and what is bad." Moreover, the data carriers used were different and incompatible with each other. And if hardware-compatible (for example, NGMD were used by very many computer systems, and the main sizes of disk drives at the hardware level were more or less standardized), then the data was organized in its own way. Tape drives turned out to be more or less compatible, since it so happened historically that since the days of “large” computers, they have been most often used to exchange data between systems of different architectures. But the only mass-produced tape recorders that were used in conjunction with personal computers turned out to be household ones, and the primitiveness of typical compact cassettes led to the fact that all manufacturers, if they were already used, tried to “squeeze” the maximum out of the carrier, and everyone did it in different ways.

The situation improved only when it became clear that the IBM PC line (the progenitor of almost all PC architectures that have survived today) is gradually becoming the de facto standard in the industry (and not only). Well, when a dominant architecture appears on the market, everyone else is forced to take this into account - for reasons of survival. The main removable storage media then were floppy disks, so rather quickly those formats used by IBM turned out to be a means of ensuring compatibility. Far from the best, I must say. And not only in terms of hardware, although this is also - despite the fact that the first 3.5 ″ drives appeared in the same year as the first PCs, and many manufacturers began to use them back in the first half of the 80s, IBM itself switched to this construct only in 1987, and until that moment it clung to five-inch drives, introduced on the market back in 1976. However, in terms of formatting, the "original" developments of IBM were inferior even to many clones of its computers - in particular, the company stored only 360 KB of information on double-sided double-density floppy disks, while competitors squeezed 600-720 KB out of them without any special tricks. . Well, only the lazy did not talk about the primitiveness of the FAT file system. Although, quite possibly, it was the primitiveness that became the second reason for the transformation of "pisyukovy diskettes" into the standard - it was very easy to maintain. Even if only for reading and in addition to its own "advanced" version.

However, from the point of view of today, all this has only historical value. Floppy disks have long ceased to be used as the main means of transferring information, and there are no alternatives to the "x86-based" line of computers in most market segments. However, it cannot be said that this completely solved all the problems. The fact is that there are almost more operating systems running on this very single standard platform than there were at the time when all the flowers bloomed. Even if we take the most common family on the market, namely Windows, then it is, strictly speaking, heterogeneous. Most of the installations are still on Windows XP - originally from the beginning of the century, but occupying almost 2/3 of the market. About a quarter of the latter is accounted for by modern versions of Windows, and the rest is a hodgepodge of surviving computers with systems that appeared before Windows XP (there are few of them left now, but they still occur), various versions MacOS and a whole bunch of UNIX systems. But even if you are lucky to never encounter anything other than Windows XP in practical life, this problem does not completely solve - once "computer" technologies have long gone beyond this market, actively invading the field of consumer electronics. For example, most of today's video players can work with USB drives, and in cameras or mobile phones A variety of memory cards are widely used. And here everything turns out to be simple only if, for example, the card is used exclusively in "our" camera - we format it using the camera and forget about this issue forever :) However, if we need to at least exchange data with a computer, then everything is not so obvious...

The reason for the problem is that almost all modern OS with rare exceptions, they support more than one file system (as it was 20-30 years ago), but several. Moreover, the degree of their support can be completely different. And sometimes modified with additional programs. There are a lot of options, so we will not try to cover them all in one small article. But we will try to give a sufficient amount of basic information so that you can understand “where to dig”. And for this it is enough to get acquainted with the main available file systems, as well as their advantages and disadvantages.

FAT - old, limited, but ubiquitous

Let's start with the oldest file system that appeared back in the days of MS DOS, but, nevertheless, is still occasionally encountered. The positive features of the system include simplicity, compactness of service areas and a long period of presence on the market. In general, the first two advantages directly follow from the third - in 1980, when the system appeared, computers were so “powerful”, and storage media were so “capacious” that it was simply impossible to use anything complicated. However, the original version, namely FAT12, has long been out of wide use due to the fact that the disk size with this system cannot exceed 32 MiB. Although, of course, some cameras and even camcorders still manage to attach a flash card of this or even smaller, but it will still not be possible to fully use them in such a configuration.

But FAT16, which appeared 23 years ago, is already more interesting, since the size of both the file and the partition has already been brought up to 2 GiB (for those who have not yet had time to get used to binary prefixes, this is a little more than two gigabytes). Theoretically, the partition capacity can reach 4 GiB when using 64 KB clusters, but this option is not standard, so it is not supported everywhere. Systems starting with Windows NT4 and newer in this line can work on computers with such a partition, but neither household appliances nor most "alternative" systems are compatible with them. Thus, this option can be considered fully suitable only for low-capacity drives. Users still have a lot of the latter in their hands, but they don’t “rule the ball”. But in the days of flash drives up to gigabytes in size, FAT16 was very relevant due to, just, small volume requirements for their needs. So, for example, on a 128 MB flash drive formatted under FAT16, 128,621,744 bytes remain available to the user, and if FAT32 is used, 127,921,152 bytes remain available. On the one hand, a trifle, and on the other hand, five years ago, the “extra” 700 KB were not lying on the road. No wonder Microsoft does not recommend using FAT32 on partitions less than 512 MB, so you can only format them into something other than FAT16 using third-party tools.

The last still relevant area of ​​​​application of this system is phones, players, cameras and other “household goods” designed to support SD or microSD cards, but not supporting SDHC (now this is no longer produced, but is still used). The standard file system for these cards is just FAT16, so most of these devices do not support any other. In this case, it is highly desirable to format the card exclusively in the device, but not on the computer. The reason is that Windows XP (at least this is known for sure about it) sometimes manages to format the card under FAT32 when explicitly instructed by the FS, after which the same camera may not see it and even not offer the opportunity to reformat it. You have to solve the problem with some alternative formatting program - again on the computer.

FAT32 is a reasonable compromise between compatibility and other features

Unlike its predecessor, FAT32 is now the most popular system for external drives. 90% of flash drives and more than half of VZhD come from factories formatted specifically for it. Cause? In terms of compatibility, it is only slightly worse than FAT16 - only too ancient operating systems “remain behind the scenes”. Initially, FAT32 support appeared in August 1996 along with Windows 95 OSR2 - if someone is currently using an older OS on his computer, then he is unlikely to connect a modern external drive to it :) And in most cases - and will not be able to.

However, sometimes using FAT32 is already inconvenient, which is why you have to use other systems. The main and most significant disadvantage is that files cannot be larger than 4 GiB. Accordingly, storing DVD images, very large archives or some films on the drive does not work. Rather, it can be done, but they have to be broken into parts, and then “glued together” before use, which is very inconvenient. Or such a partition must be foreseen in advance, which is sometimes done, but not always. It is this reason that makes it necessary to use other file systems - albeit with less support from the hardware, but free from the file size limit. Judging by our conference, by the way, this problem has become quite acute lately - many users, having bought external hard disk or flash drive, literally in the very first days they try to write a very large file there and ... they are very surprised at the reaction of the system, which reports a lack of space on the media. And there is something to be surprised: in a good way, the creators of the OS could handle this situation in a more correct way - informing the user that the file system used is unwritable given file; otherwise, everything looks very strange: there is a dozen or even a hundred (or even several hundred) gigabytes of free space, and they report about its lack when trying to write a file of only 5-6 gigabytes in size. Of course, we do not think that after the publication of this article, the corresponding messages in the forum will disappear, but we hope that they will at least become a little less :)

But the size of a volume formatted under FAT32 can theoretically be up to 8 TiB, which is a lot even today (not to mention the time when the system was created). However, not everything is so simple - Microsoft, for example, believes that it is undesirable to make volumes larger than 32 GiB. And not just counts, but introduced appropriate restrictions into the built-in programs Windows formatting XP and newer versions of your system. A particularly sad result is obtained when trying to format, for example, a 64 GB flash drive using regular means: for FAT32 (according to Microsoft) it is too large, and NTFS is removable media(again - according to Microsoft) should not be used. Both problems are easily solved by using third-party formatting utilities. For example, a simple console program fat32 format quietly works with volumes up to 2 TB (maximum for non-dynamic Windows partitions XP).

Not everything is going smoothly, by the way, with Windows 98 or ME, despite the fact that for them the use of FAT32 has no alternative. The fact is that some of the utilities built into these systems remained 16-bit. Well, since for such programs the maximum size of an addressable memory block is approximately 16 MB, partitions on which the FAT table is larger are inaccessible to them. In simple terms, this means that partitions larger than ≈127.5 GiB (about 133 GB) cannot be fully used. More precisely, you can try, but be careful - without trying to “set” various disk utilities on such a partition: at best (standard tools) they simply won’t work, and at worst, they can ruin the data. Or, for insurance, you can simply split the drives that you plan to use with Windows 9x into sections of a hundred gigabytes. Note that these operating systems are still more loyal to external drives than to internal ones: getting access to an internal hard drive of more than 137 GB under their control is not an entirely trivial task, but for a USB drive, larger volumes are acceptable without any problems, for except for the inoperability of disk utilities.

Other operating systems do not have such problems, and the ones described are, in principle, solvable. This allows us to consider this file system optimal for those cases when it is required to ensure maximum compatibility of an external drive with the entire range of computer and household appliances. Especially in cases where the storage of files larger than 4 GB is not expected - then there will be no noticeable shortcomings in practice.

NTFS - fast, powerful, but redundant

Until recently, this file system was the only reliable way to get around the "problem large files» on computers under Windows control. Of course, not every version of Windows - the 9x line does not support NTFS in principle, but compatibility with these systems is important, to put it mildly, not for everyone. Worse, NTFS support is rare in home appliances. But lately it has. In addition, such partitions are also supported by computers running MacOS or Linux - at least they can read data from such partitions, and when special drivers are installed, the write function often starts working. With help additional drivers By the way, NTFS support can also be "fastened" to Windows 98 or even DOS.

Why is this system good? First, there are no limits on both volume size and file size: both can be up to 16 exabytes (to improve perception, we will say that there are about a million terabytes in one exabyte). Secondly, you can get a higher speed of work, especially if you come across directories containing very a large number of files - for example, when there are several thousand of them, the difference in the speed of FAT32 and NTFS is noticeable to the naked eye. Thirdly, this system is more fault-tolerant, at least due to logging. Fourthly, it is able to work with small clusters (more precisely, it is not only capable, but also designed for this), so the loss of disk space when storing small files in NTFS is noticeably less than in FAT32, not to mention exFAT. Fifth, a fairly convenient feature is the built-in support for data compression. Of course, on-the-fly archiving is much less efficient than using special archiving programs with serious algorithms, but it is performed in a transparent way for the user, and when storing highly compressible data, it gives a noticeable effect. In general, it is not surprising that on the internal hard drives on this moment NTFS is the dominant system.

But on the outside, it also has disadvantages. The most innocuous of them is the impossibility in practice to get many of the advantages of the system. In particular, at the moment, it is rare for anyone to transfer uncompressed files: even if we talk about office documents, then since 2007 they are already automatically compressed when saved, and there is nothing to say about photos or video files, so the built-in compression support is out of work ( and even more often interferes than vice versa). And huge numbers of files in a directory are rare - a dozen very large files are much more typical. (At the same time, this neutralizes the benefits of small clusters.) In addition, the performance improved due to caching can turn out to be a double-edged sword - it is highly undesirable to disconnect drives formatted for NTFS from the computer without using "Safely Remove" or its analogues. All these inconveniences are typical for any external drives, but there are additional ones for those based on flash memory. Firstly, in this case, it is recommended to turn off logging (since the resource of mass flash drives is limited, so they don’t need “extra” file records). Secondly, the speed of these drives significantly depends on the alignment of all FS structures and clusters along the erase block boundaries, which is also relevant for FAT, but for NTFS, with its small cluster size (as well as the love of many programs, including the regular utility formatting Windows XP, shift the beginning of the partition by 63 sectors), can be very critical. And in general - as the experience of many users shows, the best speed results are easiest to achieve using a cluster size of 32 KB, i.e. no less than for FAT32.

Let's add compatibility problems to this, after which it becomes obvious that the use of NTFS on removable media is most often not very justified. However, as shown above (and will be shown below), sometimes this option is uncontested.

exFAT - the future of flash drives and more

In a situation where FAT32 is no longer enough, and NTFS is suboptimal, it is not surprising that Microsoft once again (10 years after the appearance of FAT32) finalized FAT. The new version, dubbed exFAT, debuted in Windows CE 6 as it was most relevant for embedded systems and consumer electronics, but later it was also supported on desktop computers. How is the new version different from the previous version?

Firstly, the limit on file size has been removed - like the version of "adult" systems, it can reach 16 exabytes. Secondly, the cluster size has been increased: if for previous systems it had to be kept within 32 KB (sometimes using the 64 KB option not supported by all), then in exFAT the maximum cluster size is 32 MiB, i.e. increased by 1024 times. Of course, this is extremely inconvenient in the case of small files, but they are not very relevant now as an object of transportation, but the size of the file allocation table has been reduced accordingly, and, consequently, the volume requirements have also decreased random access memory to work with large volumes. Naturally, for exFAT, the voluntary limitation of 32 GiB for the volume size was also canceled - it is no longer needed :) The first to use this, by the way, were the manufacturers of SD memory cards, which are quite rigidly tied to FAT standards. For specifications of SD versions 1.x, FAT16 was standard (which determined the maximum card capacity of 2 GB), version 2.0 focuses on FAT32 (SDHC cards up to 32 GB), and in new version 3.0 for large-volume cards, exFAT is the standard (respectively, SDXC cards are noticeable from the point of view of practical use no capacity limit).

It is also impossible to say that all the improvements were only quantitative - there were also qualitative ones. In particular, restrictions on the number of files in a directory have been removed. Not that they interfered much earlier, but still - now, for example, camera manufacturers do not have to put photos into folders at all, but you can safely write everything to the root of the card. A more significant improvement - a bitmap of free space has appeared, which, when correct use allows you to reduce fragmentation (previously, the selection of the most suitable free piece of disk space was also possible, but at the cost of actively using system resources for each operation). Journaling, of course, within the framework new system no - it's too simple for this, and for flash drives (which exFAT is primarily aimed at) this operation undesirable. But they also provided a potential opportunity to increase fault tolerance - it is possible to support transactions (naturally, if the host device supports it).

In general, the system turned out to be amazingly good - there is everything you need and there is nothing unnecessary. Why do you still have to struggle with the choice, and not switch to exFAT everywhere? But because for an external drive, as has been said more than once, compatibility is that “sacred cow” - what's the point in the characteristics of the file system you use on a flash drive if you can use this flash drive only on every tenth computer? exFAT is still in a similar position. It is guaranteed to be used only on computers running Windows Vista with SP1, Windows Server 2008 and Windows Seven. It seems that support is also available in MacOS X 10.6, but this will probably require a system update - by the way, it may very well be that Apple would not support the new Microsoft development, however, the company decided to integrate card readers with support for SDXC cards into the latest line of computers, and this without fail required compatibility with exFAT. For Linux, you will have to integrate the driver yourself (moreover, there are two of them: normal only supports reading, and writing only using FUSE). Windows XP users were a little more fortunate - back in early 2009 on windows update appeared official update KB955704 adds support for exFAT to SP2 and SP3 systems, but it's not mandatory, so it won't be available on all computers. WITH household appliances everything is just as sad as the previous ones Windows versions- few are the lucky exceptions modern devices with SDXC support (they have nowhere to go), but in the rest it is still easier to find NTFS support than exFAT.

Other exotic, sometimes useful

Like it or not, but at this point in time, most personal computers(about 95%) works under the control of one of the systems Windows families, and basically this share is distributed between Windows XP, Vista and Seven. Accordingly, the most relevant is the choice between the listed file systems, because only they are supported by this trio without any special tricks. It makes sense to think about something else only when compatibility with Windows doesn’t bother you in principle: despite the fact that there are drivers for Windows to support most of the “native” file systems for other operating systems, install them on each computer - a thankless job. Therefore, regardless of the advantages and disadvantages of any ext3, it can only be used if the external drive is operated as a stationary or close to that form.

The only partial exception to the rule is the HFS + file system, traditional for MacOS X. And the point is not even in some of its special qualities, but in the fact that this operating system has a small, but monolithic market share (which cannot be said about sometimes different incompatible with each other "Linux"). In addition, despite the low prevalence on a global scale, there are countries where the MacOS niche is quite noticeable. This puts HFS+ in a privileged position. To the point that some manufacturers sell special versions of external hard drives " for Mac”, formatted for HFS+ (rather than FAT32 or NTFS, which are more common) right at the factory. This does not mean that other hard drives are unsuitable for Macs, or that Mac hard drives cannot be used on other computers. Moreover, for data exchange between a Mac and other systems, it is generally more convenient to use FAT32, which is guaranteed to work in most cases. What is the advantage of HFS +? That the embedded system Reserve copy and information recovery time machine only compatible with discs with this file system. So, if you're using a Mac backup drive, you don't have a choice. Well, if sometimes there is a need to connect this external device to other computers, it is quite logical to install special drivers with HFS + support on them. However, not the most the worst option partitioning the disk into a couple of partitions will also turn out - a small one with FAT32 will allow data to be exchanged between different systems, and the HFS + partition will make it possible not to deny yourself anything when working under MacOS X.

Sometimes buying a special version of an external hard drive "for Macs" can be justified for a Windows user - as a rule, all these models are equipped with a FireWire interface (sometimes FireWire-800) in addition to USB 2.0, which can be useful. There will be no problems with the file system - from the point of view of Windows, hard drives formatted for HFS + do not contain any data structure, so we just create a partition (or partitions) and format it in the way we need.

FAQ instead of conclusion

In principle, the above information, in our opinion, is quite enough to decide in any case on the correct choice of file system for external storage as well as troubleshoot any issues that may arise. However, for ease of use, we decided to put the main (most frequently asked) questions in a separate article.

To be honest, many people think about finding the best file system for their computer. Windows and MacOS X users have little choice, with only one standard file system available, NTFS and HFS+. In the operating room Linux system everything is different, there are many file systems available for every taste. ext4 is very widely used in Linux, but there are several reasons to try something new. For example btrfs vs xfs. But is she really better than others? Let's first look at the most popular file systems and how they work, so to speak, make a small comparison.

If you are unfamiliar with the basics of file systems, I will say a few words about this so that you can better understand what is the difference between btrfs vs ext4 vs xfs. File systems are used to control how data is written to disk, access to that data, and store information, metadata, about files. It's not easy to program, but file systems are constantly improving. New functionality is constantly being developed, and they become more efficient.

Why are sections needed?

Many users have vague ideas about why disk partitions are needed. All operating systems support creating and deleting partitions. Linux uses more than one partition on a disk, even when using the standard installation procedure. One of the main purposes of partitioning disks is to increase security in case of errors.

When separating hard drive into sections, data can be grouped and divided. If errors occur, only those that were on the damaged partition will be lost. The data on all other partitions will most likely remain safe and sound. This was especially important when Linux did not yet have journaling filesystems, and any unexpected power outage could lead to disaster.

The increased security and reliability of using partitions means that if one part of the operating system becomes corrupted, data on other partitions will still be available. At the moment, this is the most important factor in using partitions. For example, users may use scripts or programs that fill up disk space. If the disk contains only one large partition, then when free place ends, the system will stop working completely. But if users store data on different partitions, then the overflow will affect only one partition, while the system and other partitions will continue to function normally.

Keep in mind that a journaled file system only protects against corruption during power outages and unexpected disconnection of storage devices. But it will not protect you from bad blocks and logical errors in the file system. In such cases, you need to use a multiple disk array (RAID).

Why choose another file system?

The EXT4 file system is an improved version of EXT3, which, in turn, is nothing more than a redesigned EXT2. EXT4 is a very stable file system that has been chosen by default in most Linux distributions, over the past few years. But its code is already decently outdated. Besides, Linux users want new features and functions that are not in EXT4, but are available in other file systems, for example, btrfs vs xfs. Exists software, which implements these features, but file system-level support will be much faster. Next, we will briefly review each of the proposed file systems so that you can choose which btrfs or ext4 file system is best for you.

ext4 file system

Ext4 has some limitations that even now are quite impressive. The maximum file size is 17 terabytes. And this is much more than the capacity of a hard drive available to the average buyer. At the same time, the largest partition size that can be created with ext4 is 1 exabyte, which is approximately 11529215 terabytes. As you know, Ext4 is faster than EXT3. Like all modern file systems, it is journaled, which means that EXT4 will log the location of files on disk, as well as write any data changes there. Despite all these features, it does not support transparent compression, data deduplication, and transparent encryption. Snapshots are technically supported, but this is only an experimental feature.

Btrfs file system

Btrfs is a file system designed from the ground up. It exists because its developer wanted to extend the functionality of the standard file system with features such as snapshots, concatenation, checksums, transparent compression, and more. Btrfs does not depend on Ext4, but implements it best ideas and benefits, as well as additional features, which will be very useful to users, and especially businesses. For enterprises running serious programs with very large databases, a single file system space on multiple disks will be very useful. Data deduplication will reduce the actual disk space used by the data. And mirroring data with Btrfs will become much easier.

Users can still create multiple partitions since they don't need to mirror data on different drives. Given that Brtfs can span multiple hard drives, it supports 16 times more disk space than Ext4. The maximum partition size in Btrfs is 16 exabytes, the maximum file size is the same. In the EXT4 vs btrfs comparison, the latter comes first.

XFS file system

XFS is considered an extended file system. It is a high performance 64-bit, journaled file system. XFS support was added to the kernel in 2002. And in 2009 it was used in red hat Enterprise Linux 5.4. The maximum file size in this file system is eight exabytes. But XFS has some limitations. For example, the section of this FS cannot be reduced, and there is also poor performance when working with big amount files. RHEL 7.0 now uses XFS as the default file system.

Conclusion and Conclusions

Unfortunately, the date of the final release of Btrfs is not exactly known. But officially, this next generation file system is still classified as unstable. However, if you install Ubuntu latest version, the installer will offer the option to select Btrfs as the primary file system. When Btrfs becomes stable is unknown, but Ubuntu will not use it as the default filesystem until it is considered fully stable.

Btrfs is currently used as the default root filesystem in OpenSUSE. As you can see, the developers have a huge front of work, since not all the features have been implemented yet, and it also lags behind in performance when comparing Ext4 vs btrfs.

So which is better to use? So far, Ext4 has been the winner despite identical performance. But why? The answer is convenience and popularity. ext4 is still a great file system for workstations and desktop computers. It is supplied by default, and therefore the user will receive it simply by installing the OS. In addition, Ext4 supports partitions up to 1 exabyte and files up to 16 terabytes, which is still a lot.

Btrfs offers large volumes up to 16 exabytes for both partitions and files, as well as improved fault tolerance. But it is still positioned as an add-on to the file system, and is not integrated into the FS operating system. For example, to format a partition in Btrfs, the Btrfs toolkit must be installed.

Even if the data transfer rate is not very important, there is such a characteristic as the speed of working with files. Btrfs has many useful features: copy-on-write, checksums, snapshots, sanitization, data self-healing, deduplication, and other interesting enhancements that keep data safe. It only lacks the ZFS - Z-RAID feature, so RAID is still in the experimental stage. For normal data storage, Btrfs is better suited than Ext4, but time will actually show how it will be. Whether to use btrfs or ext4 is just a matter of personal preference.

Ext4 is currently the best choice for ordinary users, as it is distributed as the default file system, and is also faster than Btrfs when transferring files. Btrfs is definitely worth a try, but it's too early to completely replace ext4, it won't be until a few years from now. It's funny, the same thing was said a few years ago, a lot has changed since then, but Btrfs is still not considered stable.

If you have a different opinion on this, please leave a comment!

By the way, if you use Windows and Linux on the same machine, you might be interested in my article.

The file system is a way of organizing the storage of data on storage media. Also, the file system determines the length of the file name, the maximum size of the file and section, file attributes. In this article we will talk about what file systems are.

Tasks that the file system should solve:

  • file naming.
  • software interface for user programs.
  • protection of data from power failures and hardware and software errors.
  • storage of file parameters.

Modern file systems can be divided into several groups, according to their purpose:

  • File systems for random access media (for flash drives): FAT32, HPFS, ext2 and many others.
  • File systems for storage media with sequential access (magnetic tapes): QIC, etc.
  • File systems for optical discs: ISO9660, HFS, UDF, etc.
  • Virtual file systems: AEFS, etc.
  • Network file systems: NFS, SSHFS, CIFS, GmailFS, etc.
  • File systems designed exclusively for: YAFFS, exFAT, ExtremeFFS.

Popular file systems:

FAT is a file system developed by Bill Gates and Mark McDonald in the 1970s. Due to its simplicity, it is still used in flash drives. There are three versions of the FAT file system: FAT12, FAT16 and FAT32. These versions of the FAT file system differ in the bitness of the records (the number of bits that are reserved for storing the cluster number). That is, the greater the bit depth, the greater the volume of the disk that the FAT file system can work with. So, for FAT32, the maximum disk size is 127 gigabytes.

NTFS is a new generation file system from Microsoft. This file system is used for all operating systems Microsoft Windows NT. NTFS first appeared in 1993, along with the Windows NT 3.1 operating system. Compared to FAT, file NTFS system got a lot of improvements. So, the limit on the maximum file and disk size has practically disappeared. In addition, there is support for hard links, encryption and compression.

ext- a file system designed specifically for operating systems based on the Linux kernel. The development was first introduced in 1992. Now there are several versions of this file system: ext, ext2, ext3, ext3cow and ext4. The ext4 file system is currently the newest and current version ext, which is the version used by most modern Linux distributions.

Internet