Keeping disk usage in /home under control#
Sufficient free storage space in your /home directory is required
to run many software packages successfully. This is because the home
directory is used to store various small files during program
execution, such as configuration files, log files, lock files, named
pipes, and Unix sockets. If these files cannot be created or written,
an exhausted home quota may lead to a wide range of seemingly
unrelated error messages and issues. One example is the failure to
start a JupyterHub session. Regularly monitoring disk space usage in
your home directory is therefore essential for the smooth use of the
Levante HPC system.
You can check disk usage and limits for your /home directory on
Levante using the following command:
quota -A -s -u $USER
In case you are nearing or exceeding your disk storage quota and not
sure where the storage space has gone, you can identify the size and
location of the largest files and directories using Linux commands
like du, find and sort. The du command allows you to
recursively estimate and summarize the disk usage. For a better
overview, it is often advisable to limit the directory depth to one
and to pipe the output of the du command to the sort commnad
to display the files and directories based on their size in descending
order:
$ du -a -d1 | sort -n -r
To show the file and directory sizes in human readable form, the
-h option can additionally be used:
$ du -a -d1 -h | sort -h -r
The find command can be used to locate and display files based on
their size. For example, to find files larger than 500MiB in the
specified directory, you can use:
$ find /path/to/search -type f -size +500M | xargs ls -lh
Detailed commands descriptions can be found in the corresonding manual pages:
$ man du
$ man sort
$ man find
Once you have identified large files or directories, you can delete
unnecessary data and move important data elsewhere (usually to
the /work storage area of a project
you are participating in) or store them in the tape archive.