Enable and Disable Journaling On File Systems In Linux
When you want to improve performance on a Linux server. We can try to disable and enable the journaling on the ext4 file system. We can turn on and check journalctl log file location in Linux. log journal file
Note: Keep backup before playing with the file system.
Step 1: Unmount the file system partition where you want to apply it. let’s say, I have an ext4 file system mounted on /var/data with /dev/sda1.
Step 2: Now Disable journaling for the system. We can use the below command.
tune4fs -O ^has_journal /dev/sda1
tune2fs -O ^has_journal /dev/sda1
if Command not found, then install using yum install e2fsprogs e4fsprogs.
Step 3: Once the above task completed. We will perform a system check using e4fsck -f /dev/sda1
Step 4: Restart the Linux machine using shutdown -r now
we can use this command to create mkfs.ext4 -O ^has_journal /dev/sda1
Step 5: it’s time to verify the journaling disabled using dmesg | grep EXT4
Note: Expected output similar to EXT4-fs (dm-3): mounted filesystem without journal. log journal file
You’re done disable journaling ext4 log journal file Linux check journalctl