Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am under Debian Squeeze 6.0.

What is the best file system for the /var/log partition, and why ?

share|improve this question

closed as not constructive by Michael Hampton, mdpc, Dave M, mfinni, EEAA Jan 28 '13 at 0:05

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

add comment

3 Answers 3

up vote 2 down vote accepted

Short answer: there is no best .

Long answer: it depends on what you are going to do with that partition, what programs are going to write their logs on that partition, and how important the data on that partition is.

If you don't care about losing the data written on /var/log, then you could go with ext2. It's fast and reliable, as long as no one pulls the power cord or you get hit by a power cut or hard disk corruption.

If you care about your data there, then you should go with a journaling file system. I would say go with ext4. It's well tested, reliable and probably the most used FS today in the Linux world.

share|improve this answer
    
I wouldn't recommend default ext4 for log files you care about, although ext4 with delayed allocation turned off should do the job. If bad things happen the log files is often all you have to go on, so its worth going for something rock solid, you might as well use ext3. –  Sirex Feb 10 '11 at 15:16
1  
EXT4 is no way better tested that EXT3, or Reiser3, so it a false assumption. Both EXT3 and Reiser3 support for data=journal, which gives better protection against garbage in log files, if it's of any importance to you, of course. –  poige Feb 13 '11 at 7:14
add comment

If performance is a concern for you, I would suggest using syslog-ng with a rather high sync(). The sync option tells syslog-ng how many messages it should hold in memory before flushing to disk, meaning less i/o but the potential to lose some messages in case of power failure.

share|improve this answer
add comment

i think it is better to use a FS that supports journaling such as ext3 or ext4 to avoid corrupted log in case of power failure

share|improve this answer
    
"to avoid corrupted log", journal isn't of a much help there unless you specify data=journal. Copy-on-Write is much better way to achieve data mess inside log files. –  poige Feb 13 '11 at 7:11
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.