I have a server and the /
partition is 20GB in size.
Databases are stored in /mnt/mysql-data
partition is 500GB in size.
Now here's the problem. Whenever I run mysqldump
it fills up /
partition to 100%. I have already moved the tmpdir
to /mnt/mysql-data/tmp
. My databases are around 40GB all in-all now I want to back them up in /mnt/mysql-data/backups
but I can't proceed because the /
partition fills up to 100%. my mysqldump command is: mysqldump --all-databases > /mnt/s3share/backup.sql";
Server Details:
10.2.22-MariaDB-log MariaDB Server
CentOS Linux release 7.7.1908 (Core)
Filesystem Size Used Avail Use% Mounted on
devtmpfs 7.8G 0 7.8G 0% /dev
tmpfs 7.8G 0 7.8G 0% /dev/shm
tmpfs 7.8G 217M 7.6G 3% /run
tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
/dev/xvda2 24G 2.4G 20G 11% /
/dev/xvda1 976M 168M 757M 19% /boot
tmpfs 1.6G 0 1.6G 0% /run/user/1000
/dev/xvdc1 500G 123G 378G 25% /mnt/mysql-data
tmpfs 1.6G 0 1.6G 0% /run/user/1001
MariaDB [db_inbox]> show global variables like "%tmp%";
+----------------------------+----------------------+
| Variable_name | Value |
+----------------------------+----------------------+
| default_tmp_storage_engine | |
| encrypt_tmp_disk_tables | OFF |
| encrypt_tmp_files | OFF |
| innodb_tmpdir | |
| max_tmp_tables | 32 |
| slave_load_tmpdir | /mnt/mysql-data/tmp |
| tmp_disk_table_size | 18446744073709551615 |
| tmp_memory_table_size | 16777216 |
| tmp_table_size | 16777216 |
| tmpdir | /mnt/mysql-data/tmp |
+----------------------------+----------------------+
10 rows in set (0.00 sec)
update #1:
I forgot to mention that the *.sql
backups are being written to /mnt/s3share/backups/
folder which is mounted as s3fs
and its cache must be writing to /tmp
and that may be a reason why /
is being filled up while the sql dump is being created. However, when I run the backup and watch /tmp
for changes, it doesn't show any growth. but when I do lsof
command on /tmp
I can see huge files being deleted. Could this be it?