Home

ENOSPC

ENOSPC, short for "No space left on device," is an error code used by Unix-like operating systems to indicate that a write or allocation operation cannot proceed because there is no available space on the target filesystem. It is defined as errno 28 in POSIX systems and is typically reported by system calls such as write, fsync, or similar file- and block-level operations.

Causes of ENOSPC include a completely full data area of the filesystem, exhaustion of inodes (the metadata

When ENOSPC is returned, applications may fail to write new data, and logs or temporary files may

Diagnosis commonly involves:

- Checking available space with df -h and inode usage with df -i.

- Reviewing quotas with quota or repquota.

- Inspecting for unexpectedly large files, old logs, or caches that can be cleaned.

- Verifying whether reserved blocks are consuming space on certain filesystems (e.g., ext4) and whether adjustments are

Mitigation strategies include freeing space (deleting or archiving files, truncating logs), removing unnecessary caches, rotating logs,

structures
that
track
files),
or
quotas
that
restrict
further
allocation
for
a
user
or
group.
Some
filesystems
also
reserve
a
portion
of
space
for
the
root
user
to
perform
maintenance;
if
that
reserved
space
is
exhausted,
non-root
users
may
encounter
ENOSPC
even
when
some
space
remains
visible
to
root.
fail
to
be
created.
Users
might
notice
system
utilities
reporting
full
disks
or
inode
usage
while
free
space
seems
limited
or
inodes
appear
exhausted.
appropriate.
or
moving
data
to
larger
storage.
If
inodes
are
exhausted,
removing
small
files
or
increasing
the
number
of
inodes
during
filesystem
creation
may
be
necessary.
In
some
cases,
resizing
or
repurposing
the
filesystem
or
adjusting
reserved-block
settings
with
appropriate
tooling
is
required.