Help Center/ Elastic Volume Service/ Best Practices/ Choosing Appropriate Parameters When Mounting Ext4 File Systems
Updated on 2025-08-04 GMT+08:00

Choosing Appropriate Parameters When Mounting Ext4 File Systems

When you use mount to mount ext4 file systems on EVS disks, based on your data storage features and requirements, you can choose appropriate mount parameters to ensure the security and performance of the file systems.

Requiring High Security and Performance

If you have requirements on both file system security and performance, you are advised not to specify any additional parameters in the mount command.

sudo mount <disk-partition> <mount-point>
Example command:
sudo mount /dev/vdb1 /mnt/sdc

This command carries the defaults parameter by default. The defaults parameter includes the rw, atime, suid, dev, exec, async, auto, nouser, delalloc, data=ordered, barrier, and nodiscard options.

This command, by default, allows for reads and writes to the file system, updates to the file access timestamps, and setting of the UID and GID. All these help improve the performance and stability of the file system, and protect data integrity and security.

Requiring High Security

If you require no data loss in the event of a software crash or hardware failure, you are advised to add the rw, atime, sync, barrier, and data=journal parameters in the mount command.

sudo mount -o rw,atime,sync,barrier,data=journal <disk-partition> <mount-point>
Example command:
sudo mount -o  rw,atime,sync,barrier,data=journal /dev/vdb1 /mnt/sdc

This command, by default, allows for reads and writes to the file system, updates to the file access timestamps, I/O synchronization, and data fencing (for data consistency). All these help improve the file system security, but deteriorates the performance.

Requiring High Performance

If you require high file system performance, you are advised to add the defaults, noatime, nodiratime, nobarrier, nodelalloc, and data=writeback parameters in the mount command.

sudo mount -o defaults,noatime,nodiratime,nobarrier,nodelalloc,data=writeback <disk-partition> <mount-point>
Example command:
sudo mount -o  defaults,noatime,nodiratime,nobarrier,nodelalloc,data=writeback /dev/vdb1 /mnt/sdc

On the basis of the defaults parameter, this command adds options to deny updates to file access timestamps, updates to directory access timestamps, and data fencing. All these help improve the file system performance, but may lead to data loss or file inconsistency.

In addition, you can run cat /proc/fs/ext4/vdb/options to obtain the complete mount parameters available to your EVS disk, or run man mount to view detailed parameter descriptions.