Tuesday, October 14, 2008

Why is it said that /var should reside on a separate partition from /usr ?

iacullalad

Because the /var sub-directory contain all variable files and temporary files created by the logged user. This files inlcudes temporary storage files downloaded from the Internet, log files, print spooling. While /usr sub-directory contains all user related libraries, applications. Such sub-directories cannot be interchanged.

Francois Patte

For instance: /var is the place where logs are written, suppose some process becomes mad and fill the partition with logs....

Grant

And /usr may be mounted read-only.


Keith Keller
One reason to separate /usr from the rest of the filesystem is to make upgrades easier; you can mke2fs the /usr partition to wipe all vestiges of old binaries clean and start fresh. (Grant already mentioned another reason, the ability to mount /usr read-only.)

John hasler

Another reason is to eliminate write activity on the partition containing /usr thereby increasing reliability

Mark hobley

And /var may be mounted noexec.

The natural Philosopher

Yes. /var is for /variable/ data. Logs and often databases live there.

So it can grow and possibly exceed limits: having it separate from the parts that are necessary for recovery from such a state, means you CAN recover..


Andrew Halliwel

Because the root "/" filesystem should never be allowed to fill up.If it does, all kinds of nastiness can occur.

And var is one of the partitions on which programs dump their data,especially e-mail and news, web proxies, log files, etc.

It's a safeguard.


Unruh

Many things are said. Not all are sensible. Anyway, /var/ is written to. /usr is in general not. So /var can fill up.

Nico kadel Gracia

And /var/spool/mail, /var/spool/news, /var/spool/mqueue and /var/tmp/. Any of those may be overflowed quite badly.

The separation of /var also goes back to the days of much smaller disks, when a modest mail spool would be wise to put on a separate disk or partition

No comments:

Post a Comment