Bug #80254 | ERROR: The partition with /var/lib/mysql is too full! | ||
---|---|---|---|
Submitted: | 3 Feb 2016 14:18 | Modified: | 6 Jan 2020 8:31 |
Reporter: | George Salt | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.5.47-0ubuntu0.14.04.1 | OS: | Ubuntu (Mint 17.2 64-bit) |
Assigned to: | Lars Tangvald | CPU Architecture: | Any |
[3 Feb 2016 14:18]
George Salt
[3 Feb 2016 16:38]
Lars Tangvald
Could you try running: LC_ALL=C BLOCKSIZE= df --portability $datadir/. | tail -n 1 This is the command the init script runs to check for minimum available space (4MB)
[5 Mar 2016 1:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".
[21 Jun 2016 8:53]
Stéphane Lambert
I have the same problem. LC_ALL=C BLOCKSIZE= df --portability $datadir/. | tail -n 1 answers : /dev/sdb1 955118356 620849288 285728756 69% /
[21 Jun 2016 8:59]
Lars Tangvald
Hi, Did you set the datadir variable before running the command? Try replacing $datadir with /var/lib/mysql
[21 Jun 2016 9:19]
Stéphane Lambert
it is. Please note I just run an upgrade and the server was perfectly well for years... # # The MySQL database server configuration file. # # You can copy this to one of: # - "/etc/mysql/my.cnf" to set global options, # - "~/.my.cnf" to set user-specific options. # # One can use all long options that the program supports. # Run program with --help to get a list of available options and with # --print-defaults to see which it would actually understand and use. # # For explanations see # http://dev.mysql.com/doc/mysql/en/server-system-variables.html # This will be passed to all mysql clients # It has been reported that passwords should be enclosed with ticks/quotes # escpecially if they contain "#" chars... # Remember to edit /etc/mysql/debian.cnf when changing the socket location. [client] port = 3306 socket = /var/run/mysqld/mysqld.sock # Here is entries for some specific programs # The following values assume you have at least 32M ram # This was formally known as [safe_mysqld]. Both versions are currently parsed. [mysqld_safe] socket = /var/run/mysqld/mysqld.sock nice = 0 [mysqld] # # * Basic Settings # user = mysql default-storage-engine = InnoDB pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp lc-messages-dir = /usr/share/mysql skip-external-locking # # Instead of skip-networking the default is now to listen only on # localhost which is more compatible and is not less secure. bind-address = 127.0.0.1 # # * Fine Tuning # key_buffer = 16M max_allowed_packet = 16M thread_stack = 192K thread_cache_size = 8 # This replaces the startup script and checks MyISAM tables if needed # the first time they are touched myisam-recover = BACKUP #max_connections = 100 #table_cache = 64 #thread_concurrency = 10 # # * Query Cache Configuration # query_cache_limit = 1M query_cache_size = 16M # # * Logging and Replication # # Both location gets rotated by the cronjob. # Be aware that this log type is a performance killer. # As of 5.1 you can enable the log at runtime! #general_log_file = /var/log/mysql/mysql.log #general_log = 1 # # Error log - should be very few entries. # log_error = /var/log/mysql/error.log # # Here you can see queries with especially long duration #log_slow_queries = /var/log/mysql/mysql-slow.log #long_query_time = 2 #log-queries-not-using-indexes # # The following can be used as easy to replay backup logs or for replication. # note: if you are setting up a replication slave, see README.Debian about # other settings you may need to change. #server-id = 1 #log_bin = /var/log/mysql/mysql-bin.log expire_logs_days = 10 max_binlog_size = 100M #binlog_do_db = include_database_name #binlog_ignore_db = include_database_name # # * InnoDB # # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. # Read the manual for more InnoDB related options. There are many! # # * Security Features # # Read the manual, too, if you want chroot! # chroot = /var/lib/mysql/ # # For generating SSL certificates I recommend the OpenSSL GUI "tinyca". # # ssl-ca=/etc/mysql/cacert.pem # ssl-cert=/etc/mysql/server-cert.pem # ssl-key=/etc/mysql/server-key.pem [mysqldump] quick quote-names max_allowed_packet = 16M [mysql] #no-auto-rehash # faster start of mysql but no tab completition [isamchk] key_buffer = 16M # # * IMPORTANT: Additional settings that can override those from this file! # The files must end with '.cnf', otherwise they'll be ignored. # !includedir /etc/mysql/conf.d/
[21 Jun 2016 9:37]
Lars Tangvald
Can you try running: /usr/sbin/mysqld --print-defaults | tr " " "\n" | grep -- "--datadir" And see what the output is?
[21 Jun 2016 9:51]
Stéphane Lambert
/usr/sbin/mysqld --print-defaults | tr " " "\n" | grep -- "--datadir" => --datadir=/var/lib/mysql
[21 Jun 2016 10:00]
Stéphane Lambert
Can it be linked to something around ubuntu's open-files-limit ?
[21 Jun 2016 10:04]
Lars Tangvald
Can you add set -x to the start of /etc/init.d/mysql Then try to start up the server again? Should print out more data from the startup.
[21 Jun 2016 10:22]
Lars Tangvald
Just noticed that if you run /etc/init.d/mysql as a regular user (not mysql or root) it will trigger this exact error. Are you starting the service as non-root? If so, try just adding a sudo
[21 Jun 2016 10:31]
Stéphane Lambert
/etc/init.d/mysql start set -x => df: '/var/lib/mysql/.': Permission denied * /etc/init.d/mysql: ERROR: The partition with /var/lib/mysql is too full! and sudo /etc/init.d/mysql start set -x [sudo] password for slambert: => * Starting MySQL database server mysqld No directory, logging in with HOME=/ [fail]
[21 Jun 2016 10:55]
Lars Tangvald
If you just run sudo /etc/init.d/mysql start The server won't be started? Or does it give the error, but still start. Which distro version are you running on?
[21 Jun 2016 10:55]
Lars Tangvald
And just to note: The service must be started with sudo
[21 Jun 2016 12:15]
Stéphane Lambert
No it doesn't ; sudo /etc/init.d/mysql start set -x [sudo] password for slambert: => * Starting MySQL database server mysqld No directory, logging in with HOME=/ [fail] I'm under Distributor ID: LinuxMint Description: Linux Mint 17.2 Rafaela Release: 17.2 Codename: rafaela slambert@smongdee02 ~ $ Thanks for your help, it's big headache hear...
[21 Jun 2016 12:29]
Lars Tangvald
It still fails without set -x? Can you check if there's anything in mysql error logs? Also, can you check the output from getent passwd mysql ?
[21 Jun 2016 12:39]
Stéphane Lambert
Start without set -x gives same result I have 2 errors in logs : ............. [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it. ............ [ERROR] Fatal error: Can't open and lock privilege tables: Incorrect file format 'user' ............. getent passwd mysql => mysql:x:115:125:MySQL Server,,,:/var/lib/mysql/:/bin/false
[22 Jun 2016 6:14]
Lars Tangvald
You upgraded from a previous 5.5 to a newer 5.5? Can you try running: mysqld --verbose --help 2>&1 >/dev/null and see if there's any output? It should print out any errors that are preventing the server from starting
[22 Jun 2016 6:16]
Lars Tangvald
You probably need to run that as sudo as well
[22 Jun 2016 8:37]
Stéphane Lambert
I upgraded the whole system a few days ago. Then I made a reboot. The mysql server died that day. Sorry, I couldn't wait more, so I purged mysql and reinstalled everything. Thanks for your help anyway. I hope this will not happen to too many people. Cheers :)
[22 Jun 2016 8:46]
Lars Tangvald
No problem. Sorry we couldn't be of more help.