3

Using fedora@latest, I have /tmp mounted as a tmpfs.

Sometimes i run some program which stores large files into it, until i fill it entirely.

I try to delete some files manually, hoping to free space, but the spce wont be freed.

I can tell it s not related to an opened file handle, as i have been testing it manually and here is the results,

Before,

$ df -h
Sys. de fichiers        Taille Utilisé Dispo Uti% Monté sur
/dev/mapper/fedora-root    32G     20G  9,8G  68% /
tmpfs                     1,9G       0  1,9G   0% /tmp
/dev/sda5                 126G     71G   50G  59% /home

Then I copy a file onto it, with cp for the demonstration

$ df -h
Sys. de fichiers        Taille Utilisé Dispo Uti% Monté sur
/dev/mapper/fedora-root    32G     20G  9,8G  68% /
tmpfs                     1,9G    487M  1,5G  26% /tmp
/dev/sda5                 126G     71G   50G  59% /home

Then i deleted the file, with rm

$ df -h
Sys. de fichiers        Taille Utilisé Dispo Uti% Monté sur
/dev/mapper/fedora-root    32G     20G  9,8G  68% /
tmpfs                     1,9G    487M  1,5G  26% /tmp
/dev/sda5                 126G     71G   50G  59% /home

Is it an expected behavior of tmps ?

What can i do to fix that if this is unexpected ?

4

This is not expected, except if those files are opened elsewhere. In this case the deletion request can succeed and appears to be effective but space will be freed when files are no more used.

You can see those deletion-pending files using lsof this way:

lsof -nP +L1 /tmp

As noted by @user75021 on another thread, there is a good lsof quickstart from which this command has been extracted (§3a).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.