Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

MySQL error 1030 with “Got error 28 from storage engine” means the operating system returned errno 28 (ENOSPC): a filesystem has no space left for a write. Find the full filesystem first, then free or add capacity. Check both MySQL’s data directory and its temporary-file locations, because a full tmpdir or InnoDB temporary tablespace can trigger the message even when the database directory itself looks healthy. After emergency cleanup, limit or relocate temporary growth and fix the query or workload that consumed the space.

What the message means

At the operating-system level, error 28 is “No space left on device” (Linux ENOSPC). MySQL reports it through storage-engine error 1030:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
ERROR 1030 (HY000): Got error 28 from storage engine

The storage engine—usually InnoDB—attempted to create or extend a file and the operating system refused the write. This is a capacity problem, not evidence of a corrupt table or a MySQL defect by itself. The same errno can appear while MySQL writes a dump, a temporary file, a sort run, or an online DDL workspace.

Do not start by changing random MySQL variables. First identify the path that is full; otherwise you can delete useful data while leaving the actual bottleneck untouched.

#1 Best Overall
Sale
Samsung SSD 870 EVO SATA III 2.5” 2TB, Read Speeds Up to 560MB/s
  • THE SSD ALL-STAR: The latest 870 EVO has indisputable performance, reliability and compatibility built upon Samsung's pioneering technology.Computer Platform:PC.Encryption : Class 0 (AES 256) TCG/Opal v2.0, MS eDrive (IEEE1667), Environmental Specs - Shock : 1,500 G & 0.5 ms (Half sine).
  • EXCELLENCE IN PERFORMANCE: Enjoy professional level SSD performance with 870 EVO, which maximizes the SATA interface limit to 560/530 MB/s sequential speeds, Accelerates write speeds and maintains long term high performance with a larger variable buffer
  • INDUSTRY DEFINING RELIABILITY: Meet the demands of every task from everyday computing to 8K video processing, with up to 2,400 TBW
  • MORE COMPATIBLE THAN EVER: 870 EVO has been compatibility tested for major host systems and applications, including chipsets, motherboards, NAS, and video recording devices. Interface- SATA 6GB/s, compatible with SATA 3GB/s and SATA 1.5GB/s interfaces

Where MySQL can run out of space

Temporary directory (tmpdir)

MySQL uses tmpdir for disk-backed temporary files created by large sorts and joins and by operations such as REPAIR TABLE, OPTIMIZE TABLE, LOAD DATA INFILE, and some ALTER TABLE or online-DDL work. A full filesystem mounted at that path produces the same errno 28 as a full data volume.

Check the effective value from the running server rather than assuming the operating-system /tmp is in use:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
mysql -NBe "SHOW VARIABLES LIKE 'tmpdir';"

If the result contains several directories, MySQL can use them according to its platform-specific rules; inspect every filesystem listed.

Global InnoDB temporary tablespace (ibtmp1)

InnoDB keeps a global temporary tablespace, normally a file named ibtmp1. By default it starts at a little more than 12 MB and auto-extends in the directory controlled by innodb_data_home_dir. Internal on-disk temporary tables consume this space. Dropping those temporary tables makes extents reusable, but the file does not shrink during normal operation, so its high-water size remains visible on disk.

Inspect the configured path and current size:

mysql -NBe "SELECT @@innodb_temp_data_file_path;"
mysql -e "SELECT FILE_NAME, TABLESPACE_NAME, ROUND((TOTAL_EXTENTS*EXTENT_SIZE)/1024/1024,1) AS size_mb FROM INFORMATION_SCHEMA.FILES WHERE TABLESPACE_NAME='innodb_temporary';"

The information-schema view may not expose every filesystem detail on every release; confirm the actual file with the operating system and the MySQL error log.

Data directory and ordinary tablespaces

Table data, indexes, undo files, redo logs, and metadata can fill the partition containing datadir even when temporary work is modest. Determine the data directory with:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
mysql -NBe "SHOW VARIABLES LIKE 'datadir';"

A filesystem can be full because of another service, a runaway application log, or a deleted-but-still-open file, not because of MySQL. Use filesystem tools to establish ownership before removing anything.

Rank #2
Sale
PNY CS900 250GB 2.5" SATA III Internal SSD | Up to 535/500MB/s R/W - PC/Laptop/HDD Upgrade for Everyday Users, Creators, Gamers, and more - SSD7CS900-250-RB
  • Upgrade your laptop or desktop computer and feel the difference with super-fast OS boot times and application loads
  • Exceptional performance offering up to 535MB/s seq. Read and 500MB/s seq. Write speeds
  • Superior performance as compared to traditional hard drives (HDD)
  • Ultra-low power consumption
  • Backwards compatible with SATA II 3GB/sec

Binary and relay logs

Binary logs and, on replicas, relay logs accumulate when retention or replication cleanup is delayed. Purging them can recover space, but only after confirming that replicas and point-in-time recovery no longer require the files. Never delete log files manually from the filesystem while the server is running; use MySQL’s log-management statements and your documented retention policy.

Forgotten dumps and temporary exports

Database backups, import files, and compressed dumps left in /tmp or another staging directory are a common cause. A dump can be large enough to consume the last free gigabytes while a separate query is trying to create a temporary table.

Diagnose the full filesystem safely

Run the following as the account that administers the host. Capture output before deleting anything so you have an audit trail.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Check mounted filesystems. Use df -h for human-readable capacity and df -i for inode exhaustion. A volume can report free bytes but no free inodes, which also prevents file creation.
  2. Check each relevant path. Substitute the paths returned for datadir, tmpdir, innodb_data_home_dir, and any binary-log destination:
df -h /var/lib/mysql /tmp
 df -i /var/lib/mysql /tmp

Use the real paths on your host; the examples are not universal. If a path is on a separate mount, checking only the parent directory can give the wrong answer.

  1. Read the MySQL error log. Look for the operation and path that failed. Messages naming /tmp, ibtmp1, a binary-log directory, or a table path tell you which filesystem to investigate first.
  2. Find the largest consumers without crossing mounts. For example:
sudo du -xhd1 /var/lib/mysql | sort -h
sudo du -xhd1 /tmp | sort -h

Then drill into the largest directory. On a busy production server, avoid an unrestricted recursive scan during peak I/O; narrow the path and schedule deeper analysis.

  1. Check deleted-but-open files. A process can keep disk blocks allocated after a file is unlinked. Tools such as lsof +L1 can reveal this condition. Restarting the owning process releases the blocks, but coordinate a MySQL restart if mysqld owns the file.
  2. Check the failing workload. Identify long-running queries, concurrent reports, index builds, imports, and backups. Several operations can grow temporary storage simultaneously.

As a practical operating target, keep headroom on temporary volumes rather than allowing them to reach 100 percent. One operations guide suggests keeping them below roughly 80 percent used; treat that as a planning threshold, not a MySQL requirement.

Free space immediately

Remove verified leftovers

Stop or finish any process still writing a dump, export, or temporary artifact, then remove only files you can identify as disposable. Check ownership, modification time, and whether a process has the file open. Do not remove files inside the MySQL data directory merely because their names look unfamiliar.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
fanxiang S101 1TB SSD SATA SSD 1TB Internal Solid State Drive SATA III 6Gb/s 2.5" SSD, UP to 520MB/s, 3D NAND TLC, Upgrade Laptop PC and Desktops
  • SPEED UP COMPUTER: The fanxiang 1TB SSD 2.5 Inch SATA SSD achieves blazing read and write speeds of 520MB/s, facilitating rapid file and data transfers
  • UPGRADE YOUR COMPUTER: Compared to HDDs, the 1TB SATA SSD boots up at least 50% faster, enabling instant productivity or gaming sessions
  • LONG-LASTING DURABILITY: The 2.5 SATA SSD 1TB incorporates 3D NAND TLC chips, offering a longer lifespan in writes compared to QLC, ensuring a more reliable data storage solution
  • EXTENSIVE COMPATIBILITY: The S101 1TB SATA III SSD is compatible with desktops, laptops, all-in-one PCs, supporting various operating systems like Windows, Linux, and Mac OS, meeting the needs of diverse devices
  • 3-Year Service: Fanxiang S101 1TB SSD solid state drive provides 3 years after-sales service and lifetime technical support. If you have any questions, please contact us and we will sincerely and professionally solve the problem for you

Purge eligible binary logs through MySQL

First inspect retention and replica state. Typical inspection commands are:

SHOW BINARY LOGS;
SHOW REPLICA STATUSG;

On a correctly configured server, use a time- or file-based purge that preserves the recovery window and any logs needed by replicas. The exact statement depends on your retention policy; do not issue a blanket purge on a primary that still serves replicas or point-in-time recovery.

Reduce or pause the operation consuming temporary space

Canceling a report, reducing an export range, processing an import in batches, or postponing an index rebuild can stop further growth. Allow the server to clean up temporary objects, then recheck df. This is often safer than deleting files while an operation is active.

Move temporary work to a larger filesystem

Move tmpdir

Choose a filesystem with sufficient capacity and appropriate permissions, create a directory owned by the MySQL service account, and set the server’s tmpdir option in the MySQL configuration. A typical configuration fragment is:

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
[mysqld]
tmpdir=/srv/mysql-tmp

Use the exact configuration file loaded by your installation and apply the change according to your release’s variable-dynamic rules; a restart may be required. Verify after startup:

mysql -NBe "SHOW VARIABLES LIKE 'tmpdir';"
df -h /srv/mysql-tmp

Ensure the directory is on a local filesystem suitable for MySQL temporary I/O, has restrictive permissions, and is mounted before MySQL starts. A path change does not move existing files and does not relocate the InnoDB global temporary tablespace.

Do not confuse tmpdir with ibtmp1

Changing tmpdir alone will not move ibtmp1. In MySQL 5.7, compressed temporary tables use file-per-table tablespaces in tmpdir, while the global InnoDB temporary tablespace follows innodb_temp_data_file_path. Treat these as separate capacity controls and verify both after a change.

Rank #4
Sale
SAMSUNG 870 EVO SATA SSD 500GB 2.5” Internal Solid State Drive, Upgrade PC or Laptop Memory and Storage for IT Pros, Creators, Everyday Users, MZ-77E500B/AM, Black
  • THE SSD ALL-STAR: The latest 870 EVO has indisputable performance, reliability and compatibility built upon Samsung's pioneering technology. S.M.A.R.T. Support: Yes.Specific uses: Business, personal
  • EXCELLENCE IN PERFORMANCE: Enjoy professional level SSD performance which maximizes the SATA interface limit to 560 530 MB/s sequential speeds,* accelerates write speeds and maintains long term high performance with a larger variable buffer
  • INDUSTRY-DEFINING RELIABILITY: Meet the demands of every task — from everyday computing to 8K video processing, with up to 600 TBW** under a 5-year limited warranty***
  • MORE COMPATIBLE THAN EVER: The 870 EVO has been compatibility tested**** for major host systems and applications, including chipsets, motherboards, NAS, and video recording devices
  • UPGRADE WITH EASE: Using the 870 EVO SSD is as simple as plugging it into the standard 2.5 inch SATA form factor on your desktop PC or laptop; The renewed migration software takes care of the rest

Reclaim or relocate ibtmp1

Restart to recreate the global temporary tablespace

When temporary work has ended, a controlled MySQL restart removes and recreates the global temporary tablespace, reclaiming the unused high-water allocation. Confirm that no long-running transaction, replication task, backup, or maintenance window will be harmed. Take the normal operational precautions for a database restart and verify clean startup before allowing traffic.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Afterward, check both the file and the setting:

ls -lh /path/to/mysql/ibtmp1
mysql -NBe "SELECT @@innodb_temp_data_file_path;"

A restart is not a permanent fix if the same query pattern immediately creates large on-disk temporary tables again.

Set a maximum size

On MySQL 5.7, innodb_temp_data_file_path can specify an auto-extending file with a maximum. For example:

[mysqld]
innodb_temp_data_file_path=ibtmp1:12M:autoextend:max:500M

The setting is read at startup, so changing it requires a restart. The values are examples: choose an initial size and maximum that fit your workload and available disk. When the file reaches its maximum, operations needing more temporary space fail with a “table is full” style error rather than consuming additional filesystem capacity. A cap protects the volume but can turn a disk-full incident into query failures; monitor and remediate the workload before reaching it.

Manual behavior differs by release. The 5.7 documentation describes the maximum-size behavior explicitly; the 8.0 material consulted does not state the same cap behavior in its excerpt. Test the exact MySQL version and configuration in a staging environment and consult that version’s manual before enforcing a limit.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Relocate the InnoDB temporary tablespace carefully

Use innodb_temp_data_file_path to specify the file location and attributes supported by your release. Relative-path rules and startup behavior matter, and an example that points to another directory is not a universal drop-in configuration. Prepare the destination mount first, apply correct ownership and permissions, restart during a maintenance window, and confirm the resulting path in INFORMATION_SCHEMA.FILES and on disk.

Fix the workload so the problem does not return

Find queries that create large temporary tables

Use the slow query log, Performance Schema, and currently running statements to locate reports or joins that spill to disk. Look for broad scans, unselective joins, large ORDER BY or GROUP BY operations, and unbounded exports. Add appropriate indexes, reduce the selected columns, filter earlier, paginate results, or process data in batches. Validate changes with EXPLAIN and observe temporary-table counters during representative load.

Best Value
Sale
PNY CS900 500GB 2.5" SATA III Internal SSD | Up to 550/500MB/s R/W - PC/Laptop/HDD Upgrade for Everyday Users, Creators, Gamers, and more - SSD7CS900-500-RB
  • Upgrade your laptop or desktop computer and feel the difference with super-fast OS boot times and application loads
  • Exceptional performance offering up to 550MB/s seq. Read and 500MB/s seq. Write speeds
  • Superior performance as compared to traditional hard drives (HDD)
  • Ultra-low power consumption
  • Backwards compatible with SATA II 3GB/sec

Schedule space-intensive maintenance

ALTER TABLE, OPTIMIZE TABLE, repairs, index creation, and bulk loads can require working space in addition to the final table size. Estimate the temporary footprint, reserve free capacity on the relevant mount, and run one large operation at a time when possible. Keep backups and staging files off the same small partition as tmpdir.

Monitor both bytes and inodes

Alert before a filesystem is full, track the size of ibtmp1, and monitor binary-log retention, dump directories, and temporary mounts separately. Byte usage and inode usage are different failure modes; alert on both. Record the configured maximum for ibtmp1 so an on-call engineer knows whether a “table is full” error is an intentional cap or an unexpected filesystem limit.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common mistakes and recovery paths

  • Checking only datadir: a full tmpdir or separate mount still blocks writes. Run df on every path returned by MySQL.
  • Deleting ibtmp1 while MySQL is running: this can corrupt the instance. Reclaim it through a clean restart after temporary activity has stopped.
  • Assuming a restart permanently solves the issue: the file can grow again as soon as disk-based temporary tables recur.
  • Setting only tmpdir: the global InnoDB temporary tablespace remains where innodb_temp_data_file_path places it.
  • Purging logs without checking replicas: you can break replication or point-in-time recovery. Verify consumers and retention first.
  • Applying an ibtmp1 cap without capacity planning: queries may fail at the limit. Size the cap for peak, not average, workload and monitor it.
  • Cleaning files by name alone: a file that looks old may be part of a live backup or import. Confirm process ownership and application records.

A practical incident runbook

  1. Capture the exact MySQL error, timestamp, statement, and error-log entry.
  2. Run df -h and df -i against datadir, tmpdir, and the InnoDB temporary-tablespace location.
  3. Identify the largest safe-to-remove files, deleted-open files, active dumps, and log-retention issue.
  4. Stop or batch the consuming workload; remove verified leftovers and reclaim eligible logs through MySQL.
  5. Retry only after confirming free space and inode headroom.
  6. If ibtmp1 is oversized, schedule a restart to recreate it; if recurrence is expected, relocate it or configure a tested maximum.
  7. Analyze the query or maintenance job, change its plan or schedule, and add alerts for the relevant mounts and files.

Quick comparison of remediation choices

Action Space recovered or added Restart usually needed Reversible Main risk or limitation
Remove verified dumps and stale temporary files Immediate recovery of the files’ size No Only if a backup exists Deleting an active or needed file can break a job or recovery plan
Purge eligible binary or relay logs Depends on retained log history No Not after deletion Can break replicas or point-in-time recovery if retention is wrong
Cancel, batch, or tune the consuming query Stops further growth; may release temporary extents No Yes Does not reclaim an already enlarged ibtmp1 file by itself
Move tmpdir Moves future temporary-file growth to a larger mount Often, depending on version and configuration Yes Does not move ibtmp1; permissions and mount order must be correct
Restart to recreate ibtmp1 Reclaims its unused high-water allocation Yes Yes, by reverting configuration if changed Requires downtime and will not prevent regrowth
Cap ibtmp1 Limits maximum consumption rather than adding space Yes Yes, with another restart Queries fail with a table-full style error at the cap
Enlarge or add a filesystem Adds durable capacity Depends on storage platform Usually, but capacity changes may be difficult to undo Does not correct an unbounded workload or retention policy

Frequently asked questions

Can error 28 occur when the server still shows free disk space?

Yes. The relevant mount may be full even though another filesystem has room, or the host may have exhausted inodes. Check the exact paths used by tmpdir, datadir, and ibtmp1 with both df -h and df -i. Also check whether a deleted file is still held open by a process.

Will dropping temporary tables shrink ibtmp1?

No. Dropping them makes space reusable inside the tablespace, but the file keeps its extended size until a controlled restart recreates it.

Does changing tmp_table_size solve error 28?

It can change when temporary tables spill to disk, but it is not a capacity fix. Raising it may increase memory pressure; lowering it can move more work to disk. Change it only after measuring the workload and ensuring both RAM and temporary-disk capacity are adequate.

Is this error always caused by InnoDB?

No. Error 28 is an operating-system write failure and can arise during ordinary file writes, dumps, or temporary-file creation. Error 1030 commonly wraps an InnoDB failure, but the path named in the error log determines what actually filled.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What should I do if the error changes to “table is full” after setting a cap?

The cap is doing what it was configured to do: the temporary tablespace cannot grow further. Free or add capacity, reduce the operation’s temporary footprint, or revise the tested maximum and restart. Do not simply remove the cap without confirming that the filesystem can absorb peak growth.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.