You are not logged in.
Pages: 1
As far as I know, ext4 has
* writeback mode
* ordered mode
* journal mode
How do I know what mode is used now on my HDD?
If I change it with "tune2fs -o ...", will the chnage be permanent or just until reboot?
Thanks!
Last edited by Mr. Alex (2010-09-04 11:00:01)
Offline
How do I know what mode is used now on my HDD?
Maybe, you find something with tune2fs -l /dev/...
If I change it with "tune2fs -o ...", will the chnage be permanent or just until reboot?
I guess, you also have to change the /etc/fstab setting. I.e. if you use writeback:
/dev/... /home ext4 data=writeback(and other options if you want) 0 1
Last edited by ctrl (2010-09-04 18:26:33)
Offline
It is permanent if you choose a different mode through tune2fs. You can change it anytime of course with tune2fs again.
Last edited by flamelab (2010-09-04 15:33:47)
Offline
> Maybe, you find something with tune2fs -l /dev/...
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
Does "has_journal" mean that I have "journal mode"? I mean "ordered mode" also should have a journal I believe...
Offline
tune2fs -o journal_data_writeback for writeback, tune2fs -o journal_data_ordered for ordered.
Offline
flamelab, thanks; do I understand correct: (?)
"writeback mode" - best performance, worst protection
"ordered mode" - agerage
"journal mode" - worst performance, best protection
And seriously - how to find out what mode is set now?
Last edited by Mr. Alex (2010-09-04 16:16:04)
Offline
You could try:
dmesg | grep 'mounted filesystem'
Output for me:
EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
EXT4-fs (sda4): mounted filesystem with ordered data mode. Opts: barrier=0
EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: barrier=0
If you've never done anything then the default is journal mode. So it can be a safe bet that's what you're using now.
In solving a problem of this sort, the grand thing is to be able to reason backward. That is a very useful accomplishment, and a very easy one, but people do not practice it much. In the everyday affairs of life it is more useful to reason forward, and so the other comes to be neglected. There are fifty who can reason synthetically for one who can reason analytically. --Sherlock Holmes
Offline
Mine is:
EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
So it's not "journal" by default.
Offline
And this mode only influences to write performance, not read performance. Right?
Offline
I should have specified that most Distros set it to journal mode as a sane default. It was an assumption. I have mine specifically set in fstab to ordered mode so I expected to see that result. This is an interesting question!!
In solving a problem of this sort, the grand thing is to be able to reason backward. That is a very useful accomplishment, and a very easy one, but people do not practice it much. In the everyday affairs of life it is more useful to reason forward, and so the other comes to be neglected. There are fifty who can reason synthetically for one who can reason analytically. --Sherlock Holmes
Offline
By the way, "tune2fs -o journal_data /dev/sda1" really does its purpose.
You can set either
- journal_data
- journal_data_ordered
- journal_data_writeback
That's what I figured out.
Offline
This also gives details about all current mounts:
cat /proc/mounts
Last edited by rwd (2010-09-06 10:29:03)
Offline
Disregard what I said earlier. You are correct "journal_data_ordered" is the default under EXT3 and apparently EXT4 as well. Sorry for giving the wrong info.
In solving a problem of this sort, the grand thing is to be able to reason backward. That is a very useful accomplishment, and a very easy one, but people do not practice it much. In the everyday affairs of life it is more useful to reason forward, and so the other comes to be neglected. There are fifty who can reason synthetically for one who can reason analytically. --Sherlock Holmes
Offline
That's OK. I found needed info.
tune2fs -o journal_data /dev/sda1
tune2fs -o journal_data_ordered /dev/sda1
tune2fs -o journal_data_writeback /dev/sda1
Offline
Pages: 1