Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
How to enable data=writeback in ext4
How to enable data=writeback in ext4
What I've done so far:
1. Edit ext4 entry in /etc/fstab
/dev/sda2 / ext4 noatime,barrier=0,data=writeback,nobh,commit=90,errors=remount-ro 0 1
2. Add this line in /etc/default/grub
GRUB_CMDLINE_LINUX="rootflags=data=writeback"
3. Run update-grub
4. Reboot to recovery mode and run: tune2fs -o journal_data_writeback /dev/sda2 (did not work)
Reboot to a LiveCD and run: tune2fs -o journal_data_writeback /dev/sda2 (did not work)
So what did I miss? Thanks for any help.
BTW, I have kernel 2.6.32-5-686
1. Edit ext4 entry in /etc/fstab
/dev/sda2 / ext4 noatime,barrier=0,data=writeback,nobh,commit=90,errors=remount-ro 0 1
2. Add this line in /etc/default/grub
GRUB_CMDLINE_LINUX="rootflags=data=writeback"
3. Run update-grub
4. Reboot to recovery mode and run: tune2fs -o journal_data_writeback /dev/sda2 (did not work)
Reboot to a LiveCD and run: tune2fs -o journal_data_writeback /dev/sda2 (did not work)
So what did I miss? Thanks for any help.
BTW, I have kernel 2.6.32-5-686
I use Debian, therefore I am.
Re: How to enable data=writeback in ext4
What makes you think it didn't work? Either 1 or 4 (4 is better) should have worked.
What exactly are you trying to do? You may be better off simply turning of journaling (writeback mode isn't very safe in any case, and if you're more worried about performance than data safety just turn of journaling).
What exactly are you trying to do? You may be better off simply turning of journaling (writeback mode isn't very safe in any case, and if you're more worried about performance than data safety just turn of journaling).
Re: How to enable data=writeback in ext4
It didn't work because the root partition was mounted read-only and I cannot log in.What makes you think it didn't work? Either 1 or 4 (4 is better) should have worked.
Yes I'm trying to tweak my box for performance and I'm not worried about data safety as insured by journaling. BTW, journaling is turned off by default in ext4 (data=ordered).What exactly are you trying to do? You may be better off simply turning of journaling (writeback mode isn't very safe in any case, and if you're more worried about performance than data safety just turn of journaling).
I use Debian, therefore I am.
Re: How to enable data=writeback in ext4
Journaling is NOT turned off by default in ext4. data=ordered refers to the type of journaling (as does data and writeback).ManilaTux wrote:It didn't work because the root partition was mounted read-only and I cannot log in.What makes you think it didn't work? Either 1 or 4 (4 is better) should have worked.
Yes I'm trying to tweak my box for performance and I'm not worried about data safety as insured by journaling. BTW, journaling is turned off by default in ext4 (data=ordered).What exactly are you trying to do? You may be better off simply turning of journaling (writeback mode isn't very safe in any case, and if you're more worried about performance than data safety just turn of journaling).
ext4 (and ext3) have 3 modes of writing to the journal (as explained in the tune2fs man page, among other places)
Code: Select all
journal_data
When the filesystem is mounted with journalling
enabled, all data (not just metadata) is committed
into the journal prior to being written into the
main filesystem.
journal_data_ordered
When the filesystem is mounted with journalling
enabled, all data is forced directly out to the main
file system prior to its metadata being committed to
the journal.
journal_data_writeback
When the filesystem is mounted with journalling
enabled, data may be written into the main filesys-
tem after its metadata has been committed to the
journal. This may increase throughput, however, it
may allow old data to appear in files after a crash
and journal recovery.
Re: How to enable data=writeback in ext4
So you think If I examine the boot messages, somehow I'll get a hint of what's wrong other than the procedure itself (and the mount options) that I'm using, which resulted to a read-only filesystem? I don't have the time right now to go through the motions: Image > Experiment > Fail > Restore. Yes, Debian is my main OS.
I was just hoping that somebody did this already with his debian.
When I said journaling being off by default, I meant data journaling. Metadata is always journaled whatever the mode is, so in essence you really can't turn off journaling.
I was just hoping that somebody did this already with his debian.
When I said journaling being off by default, I meant data journaling. Metadata is always journaled whatever the mode is, so in essence you really can't turn off journaling.
I use Debian, therefore I am.
Re: How to enable data=writeback in ext4
I will try this command (later) that is supposed to turn off journaling (I stand corrected) and see what happens.
tune2fs -O ^has_journal /dev/sda2
If anybody will advise me against this or why this is stupid please do. Thanks
tune2fs -O ^has_journal /dev/sda2
If anybody will advise me against this or why this is stupid please do. Thanks
I use Debian, therefore I am.
Re: How to enable data=writeback in ext4
ext4 defaults to writeback; newer kernels have the default default for ext3 as the same.
Re: How to enable data=writeback in ext4
No, ext4 defaults to ordered mode. From the kernel documentation for ext4 in 2.6.36.1BioTube wrote:ext4 defaults to writeback; newer kernels have the default default for ext3 as the same.
Code: Select all
3. Options
==========
When mounting an ext4 filesystem, the following option are accepted:
(*) == default
. . .
data=journal All data are committed into the journal prior to being
written into the main file system.
data=ordered (*) All data are forced directly out to the main file
system prior to its metadata being committed to the
journal.
data=writeback Data ordering is not preserved, data may be written
into the main file system after its metadata has been
committed to the journal.
. . .
Default to 'data=ordered' in ext3
Code: Select all
CONFIG_EXT3_DEFAULTS_TO_ORDERED:
The journal mode options for ext3 have different tradeoffs
between when data is guaranteed to be on disk and
performance. The use of "data=writeback" can cause
unwritten data to appear in files after an system crash or
power failure, which can be a security issue. However,
"data=ordered" mode can also result in major performance
problems, including seconds-long delays before an fsync()
call returns. For details, see:
http://ext4.wiki.kernel.org/index.php/Ext3_data_mode_tradeoffs
If you have been historically happy with ext3's performance,
data=ordered mode will be a safe choice and you should
answer 'y' here. If you understand the reliability and data
privacy issues of data=writeback and are willing to make
that trade off, answer 'n'.
Symbol: EXT3_DEFAULTS_TO_ORDERED [=y]
Type : boolean
Prompt: Default to 'data=ordered' in ext3
Defined at fs/ext3/Kconfig:31
Depends on: BLOCK [=y] && EXT3_FS [=y]
Location:
-> File systems
-> Ext3 journalling file system support (EXT3_FS [=y])
Re: How to enable data=writeback in ext4
Yeah, I think I'll lay off this filesystem tweaking for now and just stick with the super awesome "noatime". When I have the time I'll do a proper partition scheme with separate boot and all.
I've been (seriously) using Linux for only two months. Although I've played with several distros in the past, Linux Mint Debian was the one that really got my attention because of the big difference in performance compared to its ubuntu version. After a few days of using Linux Mint Debian I decided to go for the real thing (Debian), which ultimately made me a Linux convert, happily relegating my previous OS as the "plaything".
I've been (seriously) using Linux for only two months. Although I've played with several distros in the past, Linux Mint Debian was the one that really got my attention because of the big difference in performance compared to its ubuntu version. After a few days of using Linux Mint Debian I decided to go for the real thing (Debian), which ultimately made me a Linux convert, happily relegating my previous OS as the "plaything".
I use Debian, therefore I am.
Re: How to enable data=writeback in ext4
I understand completely what you mean.ManilaTux wrote: After a few days of using Linux Mint Debian I decided to go for the real thing (Debian), which ultimately made me a Linux convert, happily relegating my previous OS as the "plaything".
I made the same choice switching from Ubuntu back in 2004 when I was new to linux. Derivates like Ubuntu or Mint with all their automation are quite complex, thus harder to understand and less suited for tweaking. Debian in it's simplicity is actually very newbie friendly and it's meant to be tailored to ones needs. Possibility for rolling updates (as when using 'testing') makes it less prone to breaking since there's no need for one step upgrade to new release.
It's good there are so many flavors of linux that almost everybody can find one suited for her/himself.