Created
May 21, 2017 19:48
-
-
Save richinseattle/a7dd0aedf10bb10484c475045d83fc8b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ext4 disable journal | |
# Create ext4 fs | |
mkfs.ext4 /dev/sda2 | |
# Enable writeback mode. This mode will typically provide the best ext4 performance. | |
tune2fs -o journal_data_writeback /dev/sda2 | |
# Delete has_journal option | |
tune2fs -O ^has_journal /dev/sda2 | |
# Required fsck | |
e2fsck -f /dev/sda2 | |
# Check fs options | |
dumpe2fs /dev/sda2 |more | |
# For more performance add fstab opions: data=writeback,noatime,nodiratime | |
echo "/dev/sda2 /opt ext4 defaults,data=writeback,noatime,nodiratime 0 0" >> /etc/fstab |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment