0

I'm trying to figure out whether a significant data loss in one of the many databases on my MariaDB server was due to user error (customer accidentally deleting data via a web frontend and not realizing it) or a consequence of a full /tmp partition.

Last Thursday, MariaDB started complaining about [Warning] mysqld: Disk is full writing '/tmp/#sql_2d67_1.MAD' (Errcode: 28 "No space left on device"). Waiting for someone to free space.... I then stopped the MariaDB server using systemctl stop mariadb, and there are no error messages or other obvious entries in the log for the shutdown and subsequent startup phase. I cleaned up /tmp after stopping MariaDB and the problem did not reappear.

During the disk full phase, MariaDB's load was about 10 INSERTs/s across all databases, and a small number of potentially long-running (minutes) SELECTs. Data was lost in only one database, and only from a table that had no INSERT activity. All tables are InnoDB and no referencial integrity errors appear in any log. Only /tmp was full, the partition that holds data and index files had plenty of space left, and there was also loads of free main memory.

Is it to be expected that MariaDB loses data when /tmp fills up, and if so, what would I see in MariaDB's log files?

  • Only the transaction trying to create that temporary table should have been lost. Along with any other interrupted query, of course. – Michael Hampton Jul 25 '18 at 11:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.