Bug 905635 - mysql and tmp on tmpfs
Summary: mysql and tmp on tmpfs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mysql
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Honza Horak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 962087
TreeView+ depends on / blocked
 
Reported: 2013-01-29 19:57 UTC by Henrique Martins
Modified: 2013-06-13 06:52 UTC (History)
2 users (show)

Fixed In Version: community-mysql-5.5.31-7.fc19
Clone Of:
: 962087 (view as bug list)
Environment:
Last Closed: 2013-06-13 06:52:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Make tmpdir a configurable option (3.01 KB, patch)
2013-02-11 14:10 UTC, Honza Horak
no flags Details | Diff

Description Henrique Martins 2013-01-29 19:57:32 UTC
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):
mysql-libs-5.5.29-1.fc18.x86_64

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
  tmpdir=/var/tmp
to the
  [mysqld]
section of
  /etc/my.cnf

Comment 1 Tom Lane 2013-01-29 22:20:28 UTC
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

Comment 2 Henrique Martins 2013-01-29 22:53:39 UTC
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.

Comment 3 Honza Horak 2013-01-31 14:24:50 UTC
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

Comment 4 Honza Horak 2013-02-11 14:10:27 UTC
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.

http://bugs.mysql.com/bug.php?id=68338
https://mariadb.atlassian.net/browse/MDEV-4165

Comment 5 Fedora Admin XMLRPC Client 2013-05-09 14:02:59 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 6 Fedora Update System 2013-06-04 08:22:16 UTC
community-mysql-5.5.31-7.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/community-mysql-5.5.31-7.fc19

Comment 7 Fedora Update System 2013-06-05 02:31:41 UTC
Package community-mysql-5.5.31-7.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 community-mysql-5.5.31-7.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-10020/community-mysql-5.5.31-7.fc19
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2013-06-13 06:52:55 UTC
community-mysql-5.5.31-7.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.