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.

What file system would you choose for your /var/log directory ?

Upd:

this is for a typical medium-load web/mail/ftp server. ext3/ext4 works just fine, but I have been thinking of other filesystems too. Main considerations are as following:

  • Log files are mostly written to. Reads are rare.
  • Underlying media is a typical hard disk drive.
  • No reliability requirements. If some files get corrupted, this won't be a big problem.
  • Logs are rotated on a daily basis. Logs for each day are saved in separate files. Older logs are deleted after six months.
share|improve this question
4  
"No reliability requirements. If some files get corrupted, this won't be a big problem." -- Really? It seems odd that you care about your logs enough to worry about what fs to use, but don't really care if they get corrupted. –  EEAA Sep 30 '10 at 14:38
    
@ErikA - perhaps Gart is merely looking for the fastest fs available? –  warren Oct 1 '10 at 15:51
    
@warren - perhaps. It just seems like the priorities are a bit skewed. To each his own, though. –  EEAA Oct 1 '10 at 16:24
    
@ErikA - I agree... personally I think logs are important enough to want to hold onto for some amount of time, but if you only need them for a very short period of time, then I guess it doesn't matter :) –  warren Oct 1 '10 at 18:39
add comment

3 Answers

up vote 2 down vote accepted

I would use ext3 making sure you mount it with the noatime option and possibly with the data=writeback option.

(Otherwise I wouldn't spend too much time considering the question unless you are experiencing specific performance problems.)

share|improve this answer
add comment

Personally, I just go with the default for my platform (ext3 most often on Linux).

share|improve this answer
add comment

As the number of log files is usually low but individual files can be quite big I would go for the most resilient FS: ext3, if your log files are really big (in the order of few gigabytes) XFS should be considered.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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