Rate This Document
Findability
Accuracy
Completeness
Readability

Optimizing the File System Disk Mounting Mode

Principle

In current Linux, a log file system is usually used. If a system error occurs, the file system can be restored using logs to ensure its reliability. A barrier is added to ensure that logs are written first and then the corresponding data is updated to the disks. This ensures the correctness of disk recovery after the system breaks down, but affects the write performance.

If servers use battery-backed RAID controller cards or use other protection methods, log loss caused by unexpected power-off can be avoided. In this case, you can disable the barrier to improve the performance.

Procedure

If sda is mounted to the /home/disk0 directory, the default fstab entry is mount -o nobarrier -o remount /home/disk0.

The nobarrier parameter cannot ensure that the file system logs are written to the disks when the system is powered off abnormally. Therefore, this parameter applies only to the scenario where the RAID controller cards with protection are used.