Score:0

df output does not change after deletion of a 41G file

de flag

Maybe my understanding of what df does is incorrect?

I am wondering what is the problem here

1. checking usage

$ sudo df -h /
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       443G  436G  4,6G  99% /

2. identifying a large file

$ sudo find /var/lib/libvirt -name WS19.qcow2 -exec ls -lh {} \;
-rw------- 1 root kvm 41G  7. Okt 2020  /var/lib/libvirt/images/WS19.qcow2

3. removing that file

$ sudo find /var/lib/libvirt -name WS19.qcow2 -exec rm {} \;

4. checking usage again

$ sudo df -h /
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       443G  436G  4,6G  99% /

so, the deletion of 41G did not change the 'df -h' output whatsoever. What am I doing wrong? rm should get rid of this without moving it to the Trash first I think (even checked the Trash. The 41G file is not in there).

it seem btrfs filesystem df neither catches the deletion

sudo btrfs fi df /
Data, single: total=432.37GiB, used=427.79GiB
Score:0
ca flag

The deleted file is probably kept open by some process. You can use lsof | grep WS19.qcow2 to discover the affected process; killing it will release the consumed space.

Be aware that the most likely candidate is a running virtual machine. After killing it, all its data will be gone forever (as you already deleted its backing file).

vrms avatar
de flag
it's not that I am afraid.
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.