Unified quota wrapper
Introduction¶
We have implemented a unified quota wrapper lquota that can be
used to query the space and file quota on all file systems on our
clusters:
- /cluster/home/\(USER (\)HOME, home directory)
- /cluster/scratch/\(USER (\)SCRATCH, personal scratch directory)
- /cluster/shadow (buffering stdout of running batch jobs)
- /cluster/work (shareholder storage)
- /cluster/project (shareholder storage)
Note¶
Please note that the script only shows the quota for the entire storage
share of a shareholder group. If there are per-user quotas set in
addition to the total quota, then those are not displayed by the
lquota wrapper script. For the per-user quotas, you would need to run
the command
quota -s -f __PATH_to_your_directory__
Where __PATH_to_your_directory__ would need to be replaced with the
path to the directory for which you would like to check your user quota.
Units¶
The quota wrapper can display the space quotas either in bytes, in base 10 units or base 2 units.
Base 10¶
| Name | Prefix | Size |
|---|---|---|
| Kilobyte | kB | 103 bytes |
| Megabyte | MB | 106 bytes |
| Gigabyte | GB | 109 bytes |
| Terabyte | TB | 1012 bytes |
| Petabyte | PB | 1015 bytes |
Base 2¶
| Name | Prefix | Size |
|---|---|---|
| Kibibyte | KiB | 210 bytes |
| Mebibyte | MiB | 220 bytes |
| Gibibyte | GiB | 230 bytes |
| Tebibyte | TiB | 240 bytes |
| Pebibyte | PiB | 250 bytes |
Documentation¶
You can display the documentation of the command by running it with the
parameter -h:
[sfux@eu-login-11 ~]$ lquota -h
/cluster/apps/local/lquota: Command to check quotas on distributed filesystems
Default: values are diplayed in decimal units
Usage: lquota [-h] [-2] [-b] [-p] [directory]
-h display this help message and exit
-2 display space in binary units
-b display space in bytes
-p display the output in parsable format
If "directory" is not specified user's home and scratch directory are used as argument
[sfux@eu-login-11 ~]$
There are space quotas and inode quotas. An inode is a data structure to organize data in a file system. Each file or directory has one inode. Therefore a quota for inodes actually means that you can only have a limited number of files and directories in a storage share. For the home directories, we use a quota of 100'000 inodes, which implies that you cannot have more than 100'000 files and directories in your home directory.
Examples¶
If the command is run without specifying a particular path, then it displays the quota for the home directory, the personal scratch directory and the shadow file system in base 10 units:
sfux@eu-login-44:~$ lquota
+-----------------------------+-------------+------------------+------------------+------------------+
| Storage location: | Quota type: | Used: | Soft quota: | Hard quota: |
+-----------------------------+-------------+------------------+------------------+------------------+
| /cluster/home/sfux | space | 16.47 GB | 45.00 GB | 50.00 GB |
| /cluster/home/sfux | files | 46137 | 450000 | 500000 |
+-----------------------------+-------------+------------------+------------------+------------------+
| /cluster/shadow | space | 8.19 kB | 2.15 GB | 2.15 GB |
| /cluster/shadow | files | 6 | 50000 | 50000 |
+-----------------------------+-------------+------------------+------------------+------------------+
| /cluster/scratch/sfux | space | 24.56 MB | 2.50 TB | 2.70 TB |
| /cluster/scratch/sfux | files | 812 | 1000000 | 1500000 |
+-----------------------------+-------------+------------------+------------------+------------------+
sfux@eu-login-44:~$
For output in base 2 units, please use the option -2:
sfux@eu-login-44:~$ lquota -2
+-----------------------------+-------------+------------------+------------------+------------------+
| Storage location: | Quota type: | Used: | Soft quota: | Hard quota: |
+-----------------------------+-------------+------------------+------------------+------------------+
| /cluster/home/sfux | space | 15.34 GiB | 41.91 GiB | 46.57 GiB |
| /cluster/home/sfux | files | 46137 | 450000 | 500000 |
+-----------------------------+-------------+------------------+------------------+------------------+
| /cluster/shadow | space | 8.00 KiB | 2.00 GiB | 2.00 GiB |
| /cluster/shadow | files | 6 | 50000 | 50000 |
+-----------------------------+-------------+------------------+------------------+------------------+
| /cluster/scratch/sfux | space | 23.42 MiB | 2.27 TiB | 2.46 TiB |
| /cluster/scratch/sfux | files | 812 | 1000000 | 1500000 |
+-----------------------------+-------------+------------------+------------------+------------------+
sfux@eu-login-44:~$
For output in bytes, please use the option -b
sfux@eu-login-44:~$ lquota -b
+-----------------------------+-------------+------------------+------------------+------------------+
| Storage location: | Quota type: | Used: | Soft quota: | Hard quota: |
+-----------------------------+-------------+------------------+------------------+------------------+
| /cluster/home/sfux | space | 16468471808 | 44999999488 | 50000003072 |
| /cluster/home/sfux | files | 46137 | 450000 | 500000 |
+-----------------------------+-------------+------------------+------------------+------------------+
| /cluster/shadow | space | 8192 | 2147483648 | 2147483648 |
| /cluster/shadow | files | 6 | 50000 | 50000 |
+-----------------------------+-------------+------------------+------------------+------------------+
| /cluster/scratch/sfux | space | 24559616 | 2499670966272 | 2699386945536 |
| /cluster/scratch/sfux | files | 812 | 1000000 | 1500000 |
+-----------------------------+-------------+------------------+------------------+------------------+
sfux@eu-login-44:~$
For parsable output, please use the option -p
sfux@eu-login-44:~$ lquota -p
Storage location: Quota type: Used: Soft quota: Hard quota:
/cluster/home/sfux space 16468471808 44999999488 50000003072
/cluster/home/sfux files 46137 450000 500000
/cluster/shadow space 8192 2147483648 2147483648
/cluster/shadow files 6 50000 50000
/cluster/scratch/sfux space 24559616 2499670966272 2699386945536
/cluster/scratch/sfux files 812 1000000 1500000
sfux@eu-login-44:~$
If a path is specified as argument to the script, then it will display the inode and space quota for this particular storage share:
[sfux@eu-login-11 ~]$ lquota /cluster/project/sis
+-----------------------------+-------------+------------------+------------------+------------------+
| Storage location: | Quota type: | Used: | Soft quota: | Hard quota: |
+-----------------------------+-------------+------------------+------------------+------------------+
| /cluster/project/sis | space[B] | 6.17 TB | - | 10.41 TB |
| /cluster/project/sis | files | 1155583 | - | 30721113 |
+-----------------------------+-------------+------------------+------------------+------------------+
[sfux@eu-login-11 ~]$
[sfux@eu-login-11 ~]$ lquota /cluster/work/sis
+-----------------------------+-------------+------------------+------------------+------------------+
| Storage location: | Quota type: | Used: | Soft quota: | Hard quota: |
+-----------------------------+-------------+------------------+------------------+------------------+
| /cluster/work/sis | space | 8.36 TB | 10.00 TB | 11.00 TB |
| /cluster/work/sis | files | 1142478 | 10000000 | 11000000 |
+-----------------------------+-------------+------------------+------------------+------------------+
[sfux@eu-login-11 ~]$