Some misunderstandings about the FreeBSD

Source: Internet
Author: User
Tags file system

Although most people know that the advantage of FreeBSD is high stability, good network performance, but some other technical characteristics of FreeBSD, there are still some deviations in understanding.

1.FreeBSD does not have a log file system, so it is not suitable for high requirements of the application purposes

The first thing to point out is that the log file system was first developed in BSD, called LFS. It was originally supported in FreeBSD, but later because of the version upgrade reason, its code because of lack of maintenance and was temporarily abandoned, still can be in FreeBSD source code can find some LFS relics. At present, LFS still exists in the NetBSD to continue to develop, if has the special demand, it can return to FreeBSD system completely again.

However, it makes sense that FreeBSD developers are not in a hurry to transplant lfs back to FreeBSD, as the FreeBSD system has added some new features to provide the most important features that LFS can offer. To explain the nature of these features of FreeBSD, we need to discuss the file system.

Because the read-write performance of the file system is a very important indicator for the performance of the whole system, the System designer tries to improve the performance of the file system as much as possible. In this way, a disk access buffer is designed to do this, so that using a buffered read-write method is called an asynchronous (Async) Access method, and the corresponding disk-reading method without buffering is called a synchronous (Sync) access method.

Obviously, asynchronous methods have higher read and write performance, but in the event of a failure, a lot of data is still stored in the buffer, which results in the loss of this part of the data. However, if a simple part of the data loss is only, but some important data loss, resulting in the entire file system is compromised. Why is this happening?

Because, in a filesystem, there are two different types of data, one for simple file content data, which only causes error data to occur in a file and does not affect the contents of other files. Another kind of data is more important, such as the file system itself, I node or directory data, if I node data block error, it will cause a large number of file loss, and even cause the entire file system to be destroyed. These data, which are important for file system integrity, are called metadata (metadata).

For ordinary file systems, and can not be in the buffer to distinguish between ordinary data and metadata, so that the normal data update than its corresponding metadata update time earlier, so that in case of failure, file system damage is unavoidable. For log file systems, because the logs are sequential, the order in which the buffers are written to disk is sequential, so that the update of the metadata is always stored sequentially before the data is updated, so that even if a failure occurs, the metadata does not cause a particularly serious error. Some metadata errors can only result in partial file loss without affecting the entire file system.

Because of this sequential nature of the log file system, the system does not cause serious errors due to failures and, in the case of errors, has a shorter file system repair time (FSCK), and the system repair time is important for very large storage file systems. In this case, the system restarts and restores the service for a short period of time if an error occurs.

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.