No space left on device mysql
I have a vm instance on compute engine gcloud and mysqld server (mariadb) does not connect, error: waiting for someone to free some space ... (errno: 28 "No space left on device"). here the log file : mysqld log file
I have 10 GB disk space;
mysqld db size is: 261M;
I run these command through vm instance ssh to check:
$ df -h /jet/var/mysqld
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 9.8G 9.3G 0 100% /
$ sudo fdisk -l /dev/sda1
Disk /dev/sda1: 10 GiB,
10735321088 bytes, 20967424 sectors Units:
sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
strong text I/O size (minimum/optimal): 4096 bytes / 4096 bytes
$ df
Filesystem 1K-blocks Used Available Use% Mounted on
udev 859516 0 859516 0% /dev
tmpfs 174132 6144 167988 4% /run
/dev/sda1 10253588 9713292 0 100% /
tmpfs 870656 0 870656 0% /dev/shm
tmpfs 5120 0 5120 0% /run/lock
tmpfs 870656 0 870656 0% /sys/fs/cgroup
tmpfs 174128 0 174128 0% /run/user/1000
$ sudo du -sh /jet/prs/mysqld/data
261M /jet/prs/mysqld/data
ssh command and messages
I don't know what caused the problem.
Solution 1:
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 10253588 9713292 0 100% /
Your root partition is full. That will stop everything on your host.
Running a database server isn't just about the size of the data, it's also about all of the things that support it: backups, log files, transaction history, indexes, etc. When / (root) fills up, it is often because log files have gotten out of control.
- Check /var/log to see if there's anything there you can delete to free up space.
- Make sure all of your logs are being rotated to automatically remove old files.
- Make sure 10GB is really enough space. It looks like that's your only real partition: is that enough space to hold the operating system, the database software, data files, log files, etc.? Best practice would be to put the DB-related stuff into separate partitions, and possibly /var/log as well, just so that if something does grow out of control it doesn't fill up root.