LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 01-29-2004, 03:06 PM   #1
Phaethar
Member
 
Registered: Oct 2003
Location: MN
Distribution: CentOS, Fedora
Posts: 182

Rep: Reputation: 30
Mounting root filesystem with data=writeback


I've seen this question asked before, but nobody has ever had an answer. I'm hoping someone can help me figure out how to mount the root filesystem on an ext3 partition using the writeback journaling method. I know it's technically not the best for data integrity, but the speed hit on our database server is just too large using the ordered method. So I wanted to try using the writeback method, as it's supposed to be a lot faster. But everytime I try to add the data=writeback to my /etc/fstab file, I get all kinds of read errors on bootup (read-only filesystem errors) and have to reboot and then recover. Here's what I've been trying:

My original fstab file for root looks like this:

LABEL=/ / ext3 defaults 1 1

I've been trying to change it to this:

LABEL=/ / ext3 data=writeback 1 1

Another thread suggested adding the "noatime" value as well, but didn't go into how to get it set up, and I can't seem to find any examples of someone actually using it. So, can anyone help out with this, as I'd really like to see if either of these will make a difference in my speeds.

Thanks.

Edit: I think I have the "noatime" option working.. just replaced the 'defaults' option with 'noatime' and it seemed to take. I'd still like to try the data=writeback option though if someone knows how to get it working.

Last edited by Phaethar; 01-29-2004 at 03:14 PM.
 
Old 01-29-2004, 03:37 PM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
I have no idea about the writeback issue, but here is an example of two partitions on my system which have noatime in use:

/dev/hde1 /boot reiserfs noatime,notail 1 1
/dev/root / reiserfs noatime 0 0
 
Old 01-29-2004, 04:47 PM   #3
Phaethar
Member
 
Registered: Oct 2003
Location: MN
Distribution: CentOS, Fedora
Posts: 182

Original Poster
Rep: Reputation: 30
Thanks for the examples, I think it's working ok with the noatime options. Is there an easy way to verify this?

Also, I did get the writeback mode set properly on my root partition... it's just not as easy as it should be. Basically, here's what you need to do:

1. Modify the /etc/fstab file. In place of defaults, I put in data=writeback,noatime

2. Run mkinitrd and create a new image file

3. Modify the grub.conf (or lilo) file to point to the new image file.

Apparently, if you just change the fstab file without doing the rest, it is in effect trying to remount the filesystem, but for some reason (bug?), it's not able to remount it with write access, so booting always fails. I tried it the way I specified twice (2 different kernel versions), and I saw during the boot process that it set journaling to writeback mode. Now to test it and see what kind of performance I get...

Thanks for the help!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mounting root filesystem from an external USB hard drive? ChrisHart Linux - Laptop and Netbook 6 04-02-2005 10:49 PM
Encrypted Root Filesystem HOWTO and /dev filesystem tmillard Linux From Scratch 0 10-18-2004 03:58 PM
Cannot enable data=writeback on root buddhahat Linux - Newbie 2 11-07-2003 05:20 PM
[RedHat] ext3 data=writeback question WeNdeL Linux - Distributions 0 10-22-2003 06:41 PM
Mounting root filesystem in read only mode. Ocran Linux - Software 3 07-01-2002 12:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 05:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration