21

I need to know this because of this:

Add the data=writeback mounting option if you formatted the disk without journaling. Otherwise add data=ordered which sould be a good compromise between full journaling and none at all.

from the SSDChecklist.

3 Answers 3

19

The following command executed as superuser, and using as a parameter the correct partition

debugfs -R features /dev/sda1

should give you an output like the following

debugfs 1.41.14 (22-Dec-2010)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize

where you can read has_journal.

1
  • 2
    One way to find out whether the journaling level is "ordered", "writeback", or "journal" is to run dmesg | grep 'mounted filesystem', a tip from here. The documentation on ext4 mentions here and here that "ordered" is the default journaling level. Aug 3, 2022 at 10:58
16

sudo dumpe2fs /dev/sda1 | more, look for a line starting with Filesystem Features, should say has_journal.

To turn off journal and speed things up on a ext4 partition follow these steps:

Example uses sda1 device, this does not mean you should do it on your main disk, replace sda1 with the disk you are preparing, data loss will happen!

Create ext4 fs on /dev/sda1 disk

mkfs.ext4 /dev/sda1

To enable writeback mode use this. This mode will typically provide the best ext4 performance.

tune2fs -o journal_data_writeback /dev/sda1

To delete journal remove has_journal option, this will disable etx4 journal

tune2fs -O ^has_journal /dev/sda1

Check if everything is ok

e2fsck -f /dev/sda1

Done, recommended for speed applications only! Gl

8

tune2fs -l /dev/sdaX | grep features (from linuxquestions.org)

You must log in to answer this question.