(→Scope) |
(→Scope) |
||
(13 intermediate revisions by 4 users not shown) | |||
Line 11: | Line 11: | ||
== Current status == | == Current status == | ||
* Targeted release: [[Releases/15 | Fedora 15 ]] | * Targeted release: [[Releases/15 | Fedora 15 ]] | ||
* Last updated: | * Last updated: 2011-2-27 | ||
* Percentage of completion: | * Percentage of completion: 100% | ||
== Detailed Description == | == Detailed Description == | ||
/var/run and /var/lock contain small runtime files which | /var/run and /var/lock contain small runtime files which must not to be kept around over a reboot, and hence are pointless to write to disk as it is currently done. Moreover, there's bootup code that explicitly empties these directories on boot. If we move these two directories to tmpfs, this wouldn't be necessary anymore, simplifying boot-up and making things less fragile. One could also argue that it might make things faster since it gets rid of unnecessary write accesses to disk, especially due to constant noatime related disk accesses. | ||
== Benefit to Fedora == | == Benefit to Fedora == | ||
Line 21: | Line 21: | ||
== Scope == | == Scope == | ||
systemd already contains the necessary support which is however not enabled in rawhide yet. This needs to be enabled. | systemd already contains the necessary support which is however not enabled in rawhide yet. This needs to be enabled. (DONE | ||
Various .spec files need to | Various .spec files need to to be modified to support [[Packaging:Tmpfiles.d | new tmpfiles.d packaging guidelines]]. The following packages are presumably affected as they own files in /var/run or /var/lock: | ||
389-ds-base | 389-ds-base | ||
abrt | abrt | ||
Ajaxterm | |||
amavisd-new | amavisd-new | ||
arm4 | arm4 | ||
Line 39: | Line 40: | ||
callweaver | callweaver | ||
Canna | Canna | ||
clamav | clamav | ||
clamsmtp | clamsmtp | ||
clement | clement | ||
cluster | |||
cntlm | cntlm | ||
condor | condor | ||
Line 63: | Line 63: | ||
drbdlinks | drbdlinks | ||
dspam | dspam | ||
ebnetd | ebnetd | ||
ejabberd | ejabberd | ||
exim | exim | ||
ez-ipupdate | ez-ipupdate | ||
fail2ban | fail2ban | ||
Line 76: | Line 76: | ||
gdm | gdm | ||
gearmand | gearmand | ||
glibc | |||
greylistd | greylistd | ||
groonga | |||
hal | hal | ||
halevt | halevt | ||
Line 88: | Line 90: | ||
iscsi-initiator-utils | iscsi-initiator-utils | ||
jetty | jetty | ||
kde-settings | kde-settings | ||
ldm | ldm | ||
libgpod | libgpod | ||
Line 97: | Line 99: | ||
lockdev | lockdev | ||
logcheck | logcheck | ||
ltspfs | |||
lvm2 | lvm2 | ||
lxdm | lxdm | ||
Line 105: | Line 107: | ||
milter-greylist | milter-greylist | ||
mirrormanager | mirrormanager | ||
mldonkey | mldonkey | ||
mod_fcgid | mod_fcgid | ||
mod_mono | mod_mono | ||
mongodb | mongodb | ||
monotone | monotone | ||
mrtg | mrtg | ||
mumble | |||
munge | munge | ||
munin | munin | ||
mysql | |||
mysql-mmm | mysql-mmm | ||
ndoutils | ndoutils | ||
netdisco | netdisco | ||
Line 123: | Line 125: | ||
noip | noip | ||
nrpe | nrpe | ||
nsd | nsd | ||
nss-pam-ldapd | nss-pam-ldapd | ||
nufw | |||
nut | nut | ||
openct | openct | ||
openldap | openldap | ||
openstack-swift | openstack-swift | ||
openswan | openswan | ||
Line 139: | Line 140: | ||
pam_mount | pam_mount | ||
pam_ssh | pam_ssh | ||
pathfinder | |||
pcp | pcp | ||
php | |||
pki-ca | pki-ca | ||
pki-kra | pki-kra | ||
Line 160: | Line 162: | ||
pvm | pvm | ||
pyicq-t | pyicq-t | ||
qpid-cpp | qpid-cpp | ||
quagga | quagga | ||
radvd | radvd | ||
redis | |||
rkhunter | rkhunter | ||
samba | samba | ||
sblim-gather | sblim-gather | ||
screen | screen | ||
setroubleshoot | setroubleshoot | ||
slim | slim | ||
smokeping | smokeping | ||
Line 174: | Line 177: | ||
spectrum | spectrum | ||
sphinx | sphinx | ||
spice-vdagent | |||
sslogger | |||
system-config-printer | system-config-printer | ||
systemtap | |||
systemtap | |||
tclhttpd | tclhttpd | ||
tetrinetx | tetrinetx | ||
Line 186: | Line 188: | ||
tog-pegasus | tog-pegasus | ||
tokyotyrant | tokyotyrant | ||
tor | tor | ||
tuned | tuned | ||
udisks | udisks | ||
unbound | unbound | ||
up-imapproxy | up-imapproxy | ||
util-linux-ng | |||
util-vserver | util-vserver | ||
uucp | uucp | ||
vblade | vblade | ||
vdr | vdr | ||
Line 199: | Line 201: | ||
vpnc | vpnc | ||
vtun | vtun | ||
wesnoth | wesnoth | ||
wpa_supplicant | wpa_supplicant | ||
xemacs | xemacs | ||
xen | xen | ||
xl2tpd | xl2tpd | ||
zabbix | zabbix (Bugs filed: DONE) | ||
Some software might need patching, so that it is able to recreate its dirs/files in /var/run and /var/lock when they get lost on reboot. Since SUSE and Ubuntu already ship things with tmpfs on /var/run and /var/lock almost nothing should still require patching for this. | Some software might need patching, so that it is able to recreate its dirs/files in /var/run and /var/lock when they get lost on reboot. Since SUSE and Ubuntu already ship things with tmpfs on /var/run and /var/lock almost nothing should still require patching for this. (To my knowledge: DONE) | ||
The SELinux policy might need updates so that these dirs/files may be created on daemon startup. | The SELinux policy might need updates so that these dirs/files may be created on daemon startup. )DONE) | ||
The "find" command in /etc/rc.d/rc.sysinit that cleans up /var/run and /var/lock can go away. | In some exceptional cases it might be necessary to add drop-in files to /etc/tmpfiles.d/ to some packages, if they are unable to create their own directories in /var/run on boot, or when the create more than one and those shall be labelled independently. See tmpfiles.d(5) for details (http://0pointer.de/public/systemd-man/tmpfiles.d.html). (DONE) | ||
The "find" command in /etc/rc.d/rc.sysinit that cleans up /var/run and /var/lock can go away. (DONE) | |||
== How To Test == | == How To Test == | ||
Line 217: | Line 221: | ||
Make sure that software that creates files/dirs beneath those two dirs still works fine. Mostly this means: | Make sure that software that creates files/dirs beneath those two dirs still works fine. Mostly this means: | ||
# the rpms can be installed properly | |||
# the rpms can be removed properly, leaving no files in /var/run and /var/lock behind | |||
# the software starts up properly. | |||
== User Experience == | == User Experience == | ||
Line 235: | Line 239: | ||
== Release Notes == | == Release Notes == | ||
/var/run and /var/lock are now mounted from tmpfs, and hence emptied on reboot. Applications must ensure to recreate their own files/dirs on startup, and cannot rely that doing this at package | /var/run and /var/lock are now mounted from tmpfs, and hence emptied on reboot. Applications must ensure to recreate their own files/dirs on startup, and cannot rely that doing this at package installation will suffice. It is possible to use systemd's tmpfiles.d/ mechanism to recreate directories and files beneath /var/run and /var/lock on boot, if necessary. See tmpfiles.d(5) for details (http://0pointer.de/public/systemd-man/tmpfiles.d.html). | ||
== Comments and Discussion == | == Comments and Discussion == | ||
* Packaging Guidelines for use of tmpfiles.d to make the directories: https://fedorahosted.org/fpc/ticket/44 | |||
* Packaging Committee (ratified by FESCo) statement about not using %ghost for directories here: https://fedorahosted.org/fesco/ticket/525 | |||
* See [[Talk:Features/var-run-tmpfs]] | * See [[Talk:Features/var-run-tmpfs]] | ||
[[Category: | [[Category:FeatureAcceptedF15]] |
Latest revision as of 14:01, 15 March 2011
/var/run and /var/lock on tmpfs
Summary
/var/run and /var/lock should be mounted as tmpfs
Owner
- Name: Lennart Poettering
- Email: lennart at poettering dot net
- IRC: mezcalero
Current status
- Targeted release: Fedora 15
- Last updated: 2011-2-27
- Percentage of completion: 100%
Detailed Description
/var/run and /var/lock contain small runtime files which must not to be kept around over a reboot, and hence are pointless to write to disk as it is currently done. Moreover, there's bootup code that explicitly empties these directories on boot. If we move these two directories to tmpfs, this wouldn't be necessary anymore, simplifying boot-up and making things less fragile. One could also argue that it might make things faster since it gets rid of unnecessary write accesses to disk, especially due to constant noatime related disk accesses.
Benefit to Fedora
Simpler, more robust boot-up scheme. Possibly a little bit faster boot up. Since Ubuntu/Suse already do this this would bring Fedora more inline with the other distributions and minimize differences between the distros.
Scope
systemd already contains the necessary support which is however not enabled in rawhide yet. This needs to be enabled. (DONE
Various .spec files need to to be modified to support new tmpfiles.d packaging guidelines. The following packages are presumably affected as they own files in /var/run or /var/lock:
389-ds-base abrt Ajaxterm amavisd-new arm4 asterisk avahi balance bdii bind bip bro bucardo callweaver Canna clamav clamsmtp clement cluster cntlm condor conmux ConsoleKit couchdb cups cyphesis cyrus-sasl dansguardian davfs2 dbus ddclient dirmngr dkim-milter dmapd dmraid dovecot drbdlinks dspam ebnetd ejabberd exim ez-ipupdate fail2ban fcron filesystem firebird flumotion freeradius fwknop gdm gearmand glibc greylistd groonga hal halevt heartbeat hostapd httpd icecast initscripts inn iptraf iscsi-initiator-utils jetty kde-settings ldm libgpod libselinux libvirt lighttpd lirc lockdev logcheck ltspfs lvm2 lxdm mailman mdadm memcached milter-greylist mirrormanager mldonkey mod_fcgid mod_mono mongodb monotone mrtg mumble munge munin mysql mysql-mmm ndoutils netdisco net-snmp NetworkManager ngircd noip nrpe nsd nss-pam-ldapd nufw nut openct openldap openstack-swift openswan openvpn openxcap ovirt-server pacemaker pam pam_mount pam_ssh pathfinder pcp php pki-ca pki-kra pki-ocsp pki-ra pki-tks pki-tps plymouth pm-utils polipo portreserve ppp pptp prcsys prelude-manager proftpd psad puppet pvm pyicq-t qpid-cpp quagga radvd redis rkhunter samba sblim-gather screen setroubleshoot slim smokeping spamassassin spamass-milter spectrum sphinx spice-vdagent sslogger system-config-printer systemtap tclhttpd tetrinetx tiger tinyproxy tmux tog-pegasus tokyotyrant tor tuned udisks unbound up-imapproxy util-linux-ng util-vserver uucp vblade vdr vdradmin-am vpnc vtun wesnoth wpa_supplicant xemacs xen xl2tpd zabbix (Bugs filed: DONE)
Some software might need patching, so that it is able to recreate its dirs/files in /var/run and /var/lock when they get lost on reboot. Since SUSE and Ubuntu already ship things with tmpfs on /var/run and /var/lock almost nothing should still require patching for this. (To my knowledge: DONE)
The SELinux policy might need updates so that these dirs/files may be created on daemon startup. )DONE)
In some exceptional cases it might be necessary to add drop-in files to /etc/tmpfiles.d/ to some packages, if they are unable to create their own directories in /var/run on boot, or when the create more than one and those shall be labelled independently. See tmpfiles.d(5) for details (http://0pointer.de/public/systemd-man/tmpfiles.d.html). (DONE)
The "find" command in /etc/rc.d/rc.sysinit that cleans up /var/run and /var/lock can go away. (DONE)
How To Test
Check /proc/mounts to verify that /var/run and /var/lock are now tmpfs.
Make sure that software that creates files/dirs beneath those two dirs still works fine. Mostly this means:
- the rpms can be installed properly
- the rpms can be removed properly, leaving no files in /var/run and /var/lock behind
- the software starts up properly.
User Experience
A tiny bit of less disk accesses.
Dependencies
systemd
Contingency Plan
None necessary, revert to previous release behaviour.
Documentation
I don't think this needs much additional documentation, beyond what systemd already contains about this.
Release Notes
/var/run and /var/lock are now mounted from tmpfs, and hence emptied on reboot. Applications must ensure to recreate their own files/dirs on startup, and cannot rely that doing this at package installation will suffice. It is possible to use systemd's tmpfiles.d/ mechanism to recreate directories and files beneath /var/run and /var/lock on boot, if necessary. See tmpfiles.d(5) for details (http://0pointer.de/public/systemd-man/tmpfiles.d.html).
Comments and Discussion
- Packaging Guidelines for use of tmpfiles.d to make the directories: https://fedorahosted.org/fpc/ticket/44
- Packaging Committee (ratified by FESCo) statement about not using %ghost for directories here: https://fedorahosted.org/fesco/ticket/525
- See Talk:Features/var-run-tmpfs