My fstab entries:
[root@server ~]# cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Sat Feb 3 11:35:29 2018
#
UUID=01c7c465-b326-453a-9769-e7727eaa47d7 / ext4 noatime,nobh,nobarrier,commit=60,data=writeback,relatime,errors=remount-ro 0 0
[root@server ~]# mount -a
[root@server ~]# touch test
touch: cannot touch 'test': Read-only file system
[root@server ~]# tune2fs -l /dev/sda3 | fgrep has_journal
Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent 64bit flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
[root@server ~]# sudo tune2fs -o journal_data_writeback /dev/sda3
tune2fs 1.43.4 (31-Jan-2017)
[root@server ~]# tune2fs -O ^has_journal /dev/sda3
[root@server ~]# mount -a
[root@server ~]# cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Sat Feb 3 11:35:29 2018
#
UUID=01c7c465-b326-453a-9769-e7727eaa47d7 / ext4 noatime,nobh,nobarrier,commit=60,data=writeback,relatime,errors=remount-ro 0 0
UUID=f0e9431d-ff9f-4d4d-9b21-8194c79e336c /boot ext4 defaults 1 2
UUID=ae23eb2a-ff04-478b-abf1-e297641dc26f swap swap defaults 0 0
UUID=e9480814-7c11-4ed1-956a-ab46610c5079 /media/data ext4 defaults 0 0
Reboot.
Check the disk write speeds with dd:
[cipher@server ~]$ sudo dd if=/dev/zero of=store6 bs=1M count=1000
1000+0 records in
1000+0 records out
1048576000 bytes (1.0 GB, 1000 MiB) copied, 3.06385 s, 342 MB/s
Related Articles
lsof and ss — Open Files and Sockets Deep Dive
Master lsof and ss to find what files are open, which processes hold sockets, and why you cannot unmount a filesystem.
Optimizing ext4 performance in fedora 26
Optimize ext4 filesystem performance with noatime, nobh, nobarrier, writeback mode and disabling journaling.
How We Set Up Our KVM Hypervisor: From Bare Metal to Production-Ready VM Host
Detailed walkthrough of building a dedicated KVM/libvirt hypervisor with XFS tuning, hugepages, 10GbE tuning, and automation.