Linux Log File System Analysis

Source: Internet
Author: User
Article Title: Linux Log File System Analysis. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

In modern history, the log file system is considered very strange, mainly in the research stage. Now, the log file system (ext3) has become the default file system for Linux. This article reveals some ideas behind the log file system and how to provide better integrity when the power supply fails or the system crashes. In addition, this article also introduces several existing log file systems and the next generation of log file systems.
There are many ways to define a log file system, but let's grasp the key points. The log file system is designed for fsck (checking file system consistency) when tired of staring at startup) (The log file system is also applicable to those who want the file system to have fault recovery capabilities ). If the system uses a traditional file system that does not provide the log function, the operating system will use the fsck application for consistency check when detecting that the system is shut down abnormally. The application scans the file system (which takes a long time) and fixes any security fixes. In some cases, when the file system is seriously damaged, the operating system starts to the single-user mode for further repair.

Fsck Problems

Even more troublesome, the operating system automatically starts the fsck process to ensure the correctness of the file system metadata (even if no damage is detected. Therefore, it is necessary to improve the consistency check of file systems.


Now you should know what type of crowd the log file system is targeting, But how do they ban fsck? In general, the log file system prevents file system crashes by maintaining a log. A log is a special file. It records modifications to the file system in a circular buffer and regularly submits the changes to the file system. Once the system crashes, the log file will act as a checkpoint to restore unsaved information and prevent damage to the file system metadata.

In short, a log file system is a file system capable of fault recovery. It uses logs to record modifications that have not been submitted to the file system to prevent metadata corruption (see figure 1 ). However, like many other Linux Solutions, the log file system provides multiple solutions for you to choose from. Next let's take a brief look at the history of log file systems, and then take a look at several existing file systems to see what is the difference between them.

What is metadata?

Metadata refers to the management structure of data on the disk. It indicates the creation and deletion of files, the creation and deletion of directories, the expansion of files, and the interception of files.

 

Figure 1. Typical Log File System

 
Linux Log File System history

The earliest Log File System was IBM? Journaled File System (JFS ). JFS was first released in 1990, and the current version supported by Linux is JFS2 developed later. In 1994, Silicon Graphics introduced a high-performance XFS for the IRIX operating system. XFS was implanted into Linux in 2001. The smart File System (SFS) developed in 1998 was initially developed for Amiga, but was subsequently released under GNU Lesser General Public License (LGPL) and received Linux support in 2005. The most common Log file system ext3fs (third extended file system) is the extension of ext2, which adds the logging function. Since 2001, ext3fs has been supported in Linux. Finally, after being introduced, the ReiserFS log file system is widely used. However, due to some legal disputes of its original developers, the ReiserFS log file system has not been further developed.

Several log variants

 

[1] [2] [3] [4] Next page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.