“df -h” says one of my partitions is 100% full. When I delete a file from this partition, it remains at 100% full (0 bytes free). I have deleted many files, over 1 gigabyte worth.
I have checked fuser for open files - there are none open on the drive. I have even rebooted the server, and it still says 100% full.
If I use a script to try to create a file on this partition, it creates an empty 0 byte file.
2.7TB (a 3TB drive) - ext4. “lsof -n | grep deleted” displays 5 mysql tmp files, each about 1MB - so no; nothing substantial (and on a different drive).
I read somewhere that root saves 5GB of space for emergencies, but these 5GB may be used up as the files were created with root. Right now I moved more than 5GB off this drive. I am able to create a test file with nano on this drive, and it saves the data.
However:
df is still reporting as full.
My script will still not write to this drive (other than create a 0 byte file), but it writes to other drives. The permissions and ownership of both the directory and the file that I am trying to write to are identical on both drives, but it doesn’t work on this “full” drive.
Here is my original problem:
I guess my new question is: how come apache can’t write to this drive? Does it think it is full?
To update you on my problem, or to describe it better:
I have 2 drives. “drive #1”, “drive #2”.
“df -h” reports “drive #1” to be have 500GB+ freespace.
“df -h” reports “drive #2” to be have 0 bytes freespace.
“drive #2” is not actually full, as I have deleted many files from it. I have checked open files, and even rebooted the server.
As root, using nano, I can create a file “test.txt” and save data in it. This proves that “drive #2” is not full.
As apache, I can create a file with saved data on “drive #1”.
As apache, I can create a file, but it is always an empty file, on “drive #2”.
The file that I am trying to create with apache is under 10KB.