简体   繁体   中英

forrtl: No space left on device

My simulations stop with forrtl: No space left on device error.

When I use ls --sort=size -alh , it will report total of 96M and max of 60M usage.
When I use du -h , it will report total of 159G and max of 158G (for the same folder)
When I use df -h , it will report:

Filesystem                     Size  Used Avail Use% Mounted on

/dev/nvme0n1p4 930G 883G 0 100% /

Initially, I thought that there are huge number of hidden files that are taking space. I tried to remove hidden files as explained here . However, I got the same result. I was wondering how I can find the space-consuming items to remove/delete them.

You could use ncdu to find easier does directories that are using most of the space, for example, try this:

ncdu -x /

option -x is to stay in the same file system (do not traverse other filesystem mounts)

What also could be happening is that some applications/processes still running but haven't "free" the files, this is because the file descriptor in the filesystem is held open, in this case, you could use:

lsof  | grep deleted

Sometimes if a file is deleted while it is opened by a process, it will not actually free up the disk space until the process is ended.

More about this in this answer: https://unix.stackexchange.com/a/68532/53084

In case you can't use ncdu you could use the find command, for example, to find files bigger than 4096 bytes in the current directory:

find . -type f -size +4096c

More about other options here: https://superuser.com/a/204571/284722

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM