Linux – Best file system for /var/log partition? [closed] – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.
But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about linux, debian, filesystems, log-files, partition.
I am under Debian Squeeze 6.0.
What is the best file system for the /var/log partition, and why ?
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.
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.
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