Sobes.tech
Junior — Middle

Why is it sometimes impossible to create a new file in Linux even with free disk space?

sobes.tech AI

Answer from AI

In Linux, creating a new file may be impossible even when there is free disk space for several reasons:

  1. Exhaustion of available inodes — each file and directory requires an inode. If all inodes are used up, new files cannot be created even if there is free space.
  2. User quota restrictions — if quotas are set for the number of files or disk space for a user and they are exhausted.
  3. Access rights — insufficient permissions to write in the directory.
  4. The filesystem is mounted in read-only mode — for example, after errors or during emergency mounting.

To check the number of free inodes, use the command:

df -i

If inodes are exhausted, you need to delete unnecessary files or increase the partition size.

Why is it sometimes impossible to create a new file… - sobes.tech