Score:0

Deleting files does not free up the space

fj flag

I am getting No space left on device error when I run git pull. This is output of my df command:

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            7.8G     0  7.8G   0% /dev
tmpfs           1.6G  155M  1.5G  10% /run
/dev/sda1       902G  864G     0 100% /
tmpfs           7.8G     0  7.8G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           7.8G     0  7.8G   0% /sys/fs/cgroup
cgmfs           100K     0  100K   0% /run/cgmanager/fs
tmpfs           1.6G     0  1.6G   0% /run/user/1000
overlay         902G  864G     0 100% /var/lib/docker/overlay2/41f709d0b2adc00a148982b37f680c2580081da7647336f56d96ffc352ee6498/merged
overlay         902G  864G     0 100% /var/lib/docker/overlay2/33a0fa9916f59f39538d7412549fd92ced244764797c24ef1f58a17c3835cb40/merged

Notice the line:

/dev/sda1       902G  864G     0 100% /

Seems that disk is indeed full.

I deleted approx 2.5 GB of different ubuntu iso files from /home/user/. But it is still giving me same error.

I tried checking if those files are open with sudo lsof | grep iso. But the output contains hundreds of

lsof: no pwd entry for UID 999

What I am missing here?

Hannu avatar
ca flag
Is something of those docker thingies running, possibly grabbing all free disk space as soon as there is some?
anir avatar
fj flag
Yes docker is running. And there are a lot of `docker overlays` in the output of `df -h`.. But does that behave so weirdly!!! If yes, then whats the solution?
Hannu avatar
ca flag
I'm not saying `that is the problem` - I'm saying; `The problem MIGHT be there.` I have no idea what to do about it as I don't know what you have there. So; a general piece of advice; think! Try by finding an answer to `What did you install and launch?`
hr flag
If you have the default ext4 5% reservation, then you may need to delete significantly more than 2.5G (902G - 5% = 857G) before a non-privileged user can write stuff
anir avatar
fj flag
@steeldriver can you please elaborate the concept a bit. What is 5% reservation? Do I have to delete 902 GB * 5% = 45GB of files? If yes why exactly?
hr flag
@RajS see [No space left on device but disk not full](https://askubuntu.com/questions/1313316/no-space-left-on-device-but-disk-not-full)
anir avatar
fj flag
I tried finding files size greater than 90 MB using `find` command. Found bunch of personal backups done by someone on the server. Deleted 38 GBs. Able to do clone. Also I was not able to connect vscode to this machine using SSH. That too worked.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.