Log isolation for linux File Systems

Source: Internet
Author: User

Log isolation in linux File System 1. The ext3 File System adds the log function on the basis of ext2 to ensure data consistency like a database. Ext2: Write block before, and then write inode! Ext3: added a log area (conducive to data consistency). Write inode first! After the data is written to the file system, clear the log. however, large data such as oracle and mysql is based on log files and can be separated to ensure data consistency and efficiency. Ext3 file systems are embedded by default, and small servers are not considered. For large servers, disk I/0 is slow, and data writing and reading efficiency is directly affected, therefore, the data zone and the log zone are isolated to reduce the I/O burden and speed up Data Writing efficiency. At the same time, the following steps are provided to facilitate the recovery of the log zone isolation: 1> unmount the partition, make sure that the partition does not use 2> dumpe2fs/dev/sda1 | egrep-I (journal | size) view information 3> tune2fs-O ^ has_journal/dev/sda1 remove internal default log functions 4> mke2fs-O journal_dev-B 1024/dev/sda5 format a Log Device 5> tune2fs- j-J device =/dev/sda5/dev/sda1 Add the log device to the partition 3. you can also specify the frequency at which logs are synchronized to the file system: mount-o commit = 15 interval at which logs are synchronized to files, which may result in data loss. working modes of log file systems: different working modes have different efficiency, and different data security data = ordered by default, only metadata is written into the log area data = journal data, metadata is written to the log area data = writeback. Only metadata is written, but the submission order is not guaranteed.

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.