5

I can't write to any file, even as root, or do any other operation that requires writing. Neither can any process that needs to write, so they're all failing. df says I've got plenty of room:

Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1       30G   14G   15G  48% /
udev            984M  4.0K  984M   1% /dev
tmpfs           399M  668K  399M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            997M     0  997M   0% /run/shm

All of the results I find for "can't write to disk" are about legitimately full disks. I don't even know where to start here. The problem appeared out of nowhere this morning.

PHP's last log entry is "failed: No space left on device (28)". Vim says "Unable to open (file) for writing". Other applications give similar errors.

After deleting ~1gb just to be sure, the problem remains. I've also rebooted. Ubuntu 12.04

8
  • what is the exact error message?
    – mchid
    Oct 25, 2015 at 16:13
  • @mchid it depends on the application. PHP fails with "failed: No space left on device (28)". Trying to write a file with vim says "unable to open swap file, writing impossible", then "can't open file for writing".
    – felwithe
    Oct 25, 2015 at 16:15
  • are you using btrfs or something?
    – mchid
    Oct 25, 2015 at 16:17
  • 1
    Edit your question and add the output of sudo lsof -nP +L1
    – A.B.
    Oct 25, 2015 at 16:32
  • 2
    You should write an answer. Give me a ping for an upvote.
    – A.B.
    Oct 25, 2015 at 17:02

1 Answer 1

1

Answered in edit by OP:

Edit: It turned out that I was out of inodes even though I wasn't out of disk space. Problem was solved here:

You are out of inodes. It's likely that you have a directory somewhere with
many very small files.

What are inodes?

Ext4 has a theoretical limit of 4 billion files, which is restricted by the size of inode number it uses to identify each file (ext4 uses 32-bit inode numbers). However, as John says, Ext4 allocates inode tables statically, so the actual limit is set when the file system is created.

Source

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .