Start a conversation

Disk Space in the LGP Cloud Server Almost Full with MySQL Activity in the /tmp folder

Overview

You would like to troubleshoot why disk space is almost full on the LGP cloud server. You are also seeing MySQL activity in the /tmp folder

Solution

It is recommended that MySQL queries/scripts are not done on the LGP server itself such as for data mining or post-log processing

MySQL queries use temporary tables which creates temporary files in the process under /tmp directory.

You can run the following command to confirm the location of the MySQL temporary directory.

[root@testvm ~]# mysqladmin --login-path=mysql_root var | grep tmpdir | innodb_tmpdir | slave_load_tmpdir | /data/mysql_tmp | tmpdir | /data/mysql_tmp

In case the temporary directory (tmpdir) is not set to /data/mysql_tmp as indicated above, you can consider the following steps to change it:

  1. Login as textpass user and stop LGP processes
    tp_stop
  2. Change to root user and stop MySQL server
    service mysql stop
  3. Create and set the tmpdir in /etc/my.cnf under the section [mysqld] (if not set).
    [mysqld]
    tmpdir = /data/mysql_tmp
  4. Create the tmpdir
    mkdir -p /data/mysql_tmp
    chmod 777 /data/mysql_tmp/
  5. Set directory permissions
    chown -R mysql /data/mysqldata
    chgrp -R mysql /data/mysqldat
  6. Start MySQL server
    service mysql start
  7. Change to textpass user and start LGP processes
    tp_start
Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Priyanka Bhotika

  2. Posted

Comments