[fhs-discuss] tighten the use and intention of the "/var" hierarchy

Bruno Cornec Bruno.Cornec at hp.com
Tue May 17 01:27:42 PDT 2011


Tollef Fog Heen said on Tue, May 17, 2011 at 09:19:09AM +0200:

> Sounds like you want /var to just be what should go in /var/cache,
> really.

That's a good point. Maybe we should first look at what is under /var in
the FHS:

cache	Application cache data
lib		Variable state information
local	Variable data for /usr/local
lock	Lock files
log		Log files and directories
opt		Variable data for /opt
run		Data relevant to running processes
spool	Application spool data
tmp		Temporary files preserved between system reboots

For me there are different nature of data stored there. cache, lock,
log, run and tmp contain data that one could lost without necessarily
having to resort to backup to restire the system in a working state.

I understand that loosing logs could be a problem, but these data were
generated, so putting empty log in place doesn't prevent the system to
go on.

OTOH, lib, local, opt and spool (partly) contain generally data that are 
not able to be rebuilt without a backup. Maybe that's where locating them
elsewhere (under /srv or another mount point) could make sense. But
indeed the structure should be described.

Using /var/lib to store a DB seems to me not in line with the definition
given in the FHS as /var/lib should contain "state information" which "is
generally used to preserve the condition of an application between
invocations and between different instances of the same application".

For the reserved ones:

/var/backups
/var/cron
/var/msgs
/var/preserve

I think the data contained here could not be found again without backup.
But they are not really described in the FHS.

Then for the specific options:

account	Process accounting logs (optional)
crash	System crash dumps (optional)
games	Variable game data (optional)
mail	User mailbox files (optional)
yp	Network Information Service (NIS) database files (optional) 

Except /var/mail (maybe games to keep scores ;-) I consider them as 
containing temporary data that could be lost.


So my main concern as a sysadmin is to loose valuable data hidden under
/var that I could easily forget to backup, whereas if these same data
were put in another place, it would make that operation much easier.
Again that may be just me.

Bruno.
-- 
Open Source & Linux Profession Lead EMEA           / http://opensource.hp.com
HP/Intel/Red Hat Open Source Solutions Initiative  / http://www.hpintelco.net
http://www.HyPer-Linux.org  http://mondorescue.org http://project-builder.org
La musique ancienne?  http://www.musique-ancienne.org http://www.medieval.org


More information about the fhs-discuss mailing list