MySQL error 27 EE_SYNC signals the server could not flush or sync a table or log file to disk because the operating system returned an I/O failure.
MySQL Error 27: EE_SYNC happens when the server cannot sync a data or log file to disk, usually due to full disks, file-system corruption, or hardware issues. Free space, run fsck, and restart MySQL after verifying storage health to resolve the problem.
Can't sync file '%s' to disk (OS errno %d - %s)
MySQL raises error 27 EE_SYNC with message "Can't sync file '%s' to disk (OS errno %d - %s)" when it calls fsync or fdatasync and the operating system returns a failure code. The server cannot guarantee that modified data has reached persistent storage, so it aborts the current statement and often marks the table as crashed.<\/p>
The problem sits between MySQL and the underlying file system.
Disk-full conditions, permission changes, network-attached storage glitches, or hardware errors all block the sync call. Ignoring the warning risks data loss and table corruption, so immediate investigation is essential.<\/p>
Disk space exhaustion forces fsync to fail, triggering EE_SYNC.
Check both data and log partitions because binary logs and temp files grow quickly during heavy workloads.<\/p>
File-system corruption or read-only remounts stop write operations mid-transaction, making every subsequent sync call fail until the volume is repaired and remounted read-write.<\/p>
Storage hardware failures such as bad sectors or dead SSD cells surface through OS error codes 5 (EIO) or 30 (EROFS), which MySQL passes on in the EE_SYNC message.<\/p>
Incorrect permissions or SELinux/AppArmor policies can block MySQL from opening files with write+sync flags, especially after manual chmod or security policy changes.<\/p>
Start by reading the accompanying OS errno in the message.
Errno 28 means no space left on device, while Errno 30 indicates a read-only file system. Tail the MySQL error log and dmesg for disk-level messages to pinpoint the root cause.<\/p>
Free disk space or grow the partition if you see Errno 28. For Errno 30 or 5, unmount and run fsck, replace faulty drives, then remount the volume read-write.
Restart MySQL after the underlying storage is healthy.<\/p>
If the table was marked crashed, run CHECK TABLE and REPAIR TABLE, or restore from a recent backup if corruption persists.<\/p>
Binary log flood - Rotate or purge old binary logs with PURGE BINARY LOGS TO 'mysql-bin.010000'; then enable binlog_expire_logs_seconds for automatic cleanup.<\/p>
Huge temp tables on disk - Increase tmp_table_size and monitor temp file paths; move tmpdir to a larger partition.<\/p>
Network file system hiccup - Ensure NFS mounts use sync, hard, and appropriate rsize/wsize options.
Failing NFS writes manifest as EE_SYNC until the mount stabilizes.<\/p>
Containerized deployments - Map persistent volumes with correct fsync support. Some overlay drivers ignore fsync, so switch to a driver that honors durability guarantees.<\/p>
Implement monitoring for disk usage, IOPS latency, and MySQL error codes.
Alert at 80 percent capacity to act before space exhaustion occurs.<\/p>
Separate data, log, and temporary files onto different volumes to prevent a single directory from filling up all space.<\/p>
Schedule regular fsck scans during maintenance windows and keep firmware on SSDs up to date to reduce unexpected I/O errors.<\/p>
Use MySQL innodb_flush_method=O_DIRECT or O_DSYNC where supported to control how data is flushed and lower the chance of OS errors under heavy load.<\/p>
Error 28 - No space left on device: Free space or extend the file system.<\/p>
Error 1030 - Got error 28 from storage engine: Also indicates disk full; identical remediation steps.<\/p>
Error 1878 - Table is marked as crashed: Often appears after EE_SYNC; run REPAIR TABLE.<\/p>
Error 1290 - Read only mode: Triggered if file system remounts read-only; remount read-write and restart MySQL.<\/p>.
Remove read-only flag after fixing disk.<\/p>.