Last Updated: February 25, 2016
· jinnko

Enabling data=writeback on ext3 debian squeeze

We have a server bottlenecking on disk i/o. For the short term we need to give it more bandwidth while we move stuff off it. There are several mount options that could contribute to better performance, among them is data=writeback, rumored to also improve throughput.

Therefore we aim for the following mount options in fstab:

/dev/md0  /  ext3  defaults,data=writeback,barrier=1,noatime,nodiratime,errors=remount-ro  0  1

However it's not possible to simply reboot into this mode directly, a few steps are required to get there.

First, we must make sure the kernel boots the system with the correct data mode. For this we add the following to our /etc/default/grub config


And activate the change with:


Last we tune the filesystem. To do this we need to reboot into recovery mode, then run

tune2fs -o journal_data_writeback /dev/md0

Finally reboot the system and hopefully all will come up fine and you'll be in writeback mode and have a little more throughput.