/var/lib for holding served data, why?

This is explained in the commit to the new 3.0 version:

http://bzr.linuxfoundation.org/loggerhead/lsb/devel/fhs-spec/revision/26

Specifically, /srv/ is for served, file-system structured data, /var/lib/ is for locally-consumed data. Apache will serve out of /srv as it's filesystem hierarchical. MySQL serves out of /var/lib since only mysqld accesses it and it is not filesystem hierarchical.


As sysadmin1138 has already mentioned, FHS 3.0 explains this in its /srv section, which I'll cite:

https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s17.html

If the directory and file structure of the data is not exposed to consumers, it should go in /var/lib.

That sentence has been added due to this FHS bug. There, Tollef Fog Heen writes:

I think the crucial difference here is whether the sysadmin is ordinarily exposed to and has to care about the directory structure.

The helpful part here is that in /srv the sysadmin ”has to care about the directory structure“.