Bug 962087 - mysql and tmp on tmpfs
mysql and tmp on tmpfs
Product: Fedora
Classification: Fedora
Component: mariadb (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Honza Horak
Fedora Extras Quality Assurance
Depends On: 905635
  Show dependency treegraph
Reported: 2013-05-11 12:32 EDT by Honza Horak
Modified: 2013-06-05 22:23 EDT (History)
3 users (show)

See Also:
Fixed In Version: mariadb-5.5.31-1.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 905635
Last Closed: 2013-06-05 22:23:33 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Honza Horak 2013-05-11 12:32:08 EDT
+++ This bug was initially created as a clone of Bug #905635 +++

Description of problem:
Default my.cnf doesn't point mysql to use /var/tmp and this caused mysqldump, mysql_upgrade and others to fail on my system.

Version-Release number of selected component (if applicable):

How reproducible:
always, on one of my system

Steps to Reproduce:
1. run mysqldump or mysql_upgrade on a system with a small /tmp on tmpfs
Actual results:
Fails with a message containing
 Can't create/write to file '/tmp/#sql_60e_0.MYI' (Errcode: 2) 

Expected results:
  working as before

Additional info:
Googling for the error message shows workaround as adding
to the
section of

--- Additional comment from Tom Lane on 2013-01-29 17:20:28 EST ---

TBH, fixing this in mysql is the Wrong Thing.  F18's choice to put /tmp on tmpfs by default is questionable even on personal/laptop systems, and utterly brain-dead for servers.  I'd recommend turning it off system-wide rather than hacking applications one at a time.  See https://fedoraproject.org/wiki/Features/tmp-on-tmpfs

--- Additional comment from Henrique Martins on 2013-01-29 17:53:39 EST ---

Understood, and I actually already disabled this to take effect as of the next reboot of the machine where I had this problem.

However, as far as I can find with google, it seems that Fedora/FESCO is going to keep this going forward, so someone needs to file bug reports for every single application, for the benefit of people that won't turn it off.

--- Additional comment from Honza Horak on 2013-01-31 09:24:50 EST ---

According to [1] having TMPDIR on tmpfs can cause even bigger troubles in mysql in case of replication slave. If we won't concern a possibility of reverting that F18 feature (I don't believe that happens), I'd vote to change mysql's default to /var/tmp.

Then in case somebody believes /tmp will mean a performance improvement for him and limited space wouldn't be an issue, one can always define tmpdir variable in the my.cnf file. For most of cases /var/tmp should be good enough.

[1] http://dev.mysql.com/doc/refman/5.5/en/server-options.html#option_mysqld_tmpdir

--- Additional comment from Honza Horak on 2013-02-11 09:10:27 EST ---

Created attachment 696099 [details]
Make tmpdir a configurable option

I've sent the attached patch to MySQL and MariaDB upstreams. It adds ability to specify tmpdir using "-DTMPDIR=/var/tmp" during build configuration.


--- Additional comment from Fedora Admin XMLRPC Client on 2013-05-09 10:02:59 EDT ---

This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 1 Honza Horak 2013-05-24 07:37:55 EDT
Committed in git.
Comment 2 Fedora Update System 2013-05-27 02:57:05 EDT
mariadb-5.5.31-1.fc19 has been submitted as an update for Fedora 19.
Comment 3 Fedora Update System 2013-05-27 13:02:52 EDT
Package mariadb-5.5.31-1.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mariadb-5.5.31-1.fc19'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 4 Fedora Update System 2013-06-05 22:23:33 EDT
mariadb-5.5.31-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.