Hello, I read some threads (some of them not very recent, and perhaps not up to date) and I have not found a clear answer to these: Is it advisable to have /tmp set up with data=writeback option in general? Is it again true if we are considering a laptop? Do I have also to consider writecache of disks in this case or are they totally non related? How to check/set the state of writecache for disks in general and in particular for laptops and what is the better configuration when we plan to use ext3 as the filesystem? Thanks in advance. Bye, Gianluca
On Tue, Mar 11, 2003 at 02:27:16PM +0100, Cecchi, Gianluca wrote:> > I read some threads (some of them not very recent, and perhaps not up to date) and I have not found a clear answer to these: > > Is it advisable to have /tmp set up with data=writeback option in > general? Is it again true if we are considering a laptop? Do I > have also to consider writecache of disks in this case or are they > totally non related? How to check/set the state of writecache for > disks in general and in particular for laptops and what is the > better configuration when we plan to use ext3 as the filesystem?Why bother? Generally /tmp is erased on a reboot, so there's no point using a journal for it at all. In fact, I normally mount /tmp using tmpfs, so that /tmp is stored in memory and automatically disappears when I reboot my laptop..... (This is especially true if you're using a distro which wipes /tmp on reboot by default, but even if you don't, in my experience if you assume that nothing in /tmp gets preserved across a reboot, it's much easier to keep /tmp clean.) - Ted
Hi, On Tue, 2003-03-11 at 13:27, Cecchi, Gianluca wrote:> Is it advisable to have /tmp set up with data=writeback option in general?It shouldn't matter much. writeback is a bit faster, and you probably don't have a huge need for the highest level of data security on /tmp. The only extra risk of writeback over ordered is that after a crash, you might find that recently-created files contain data blocks that had not been flushed to disk, so you'd find corrupt data in them (potentially exposing the old contents of somebody else's file to the wrong eyes.)> Is it again true if we are considering a laptop?Possibly --- I tend to use tmpfs for laptops.> Do I have also to consider writecache of disks in this case or are they totally non related?They aren't related --- you should never enable writeback caching for ext3 even in ordered mode.> How to check/set the state of writecache for disks in general and in particular for laptops and what is the better configuration when we plan to use ext3 as the filesystem?"man hdparm". You want -W disabled. Cheers, Stephen