Difference between revisions of "Unified quota wrapper"

From ScientificComputing
Jump to: navigation, search
(Units)
Line 7: Line 7:
 
* /cluster/work (shareholder storage)
 
* /cluster/work (shareholder storage)
 
* /cluster/project (shareholder storage)
 
* /cluster/project (shareholder storage)
 
==Documentation==
 
You can display the documentation of the command by running it with the parameter <tt>-h</tt>:
 
 
[sfux@eu-login-20-ng ~]$ lquota -h
 
/cluster/apps/local/lquota: Command to check quotas on distruted filesystems
 
Default: values are diplayed in human readable format (base 10)
 
 
Usage: quota [-h] [-b] [-k] [directory]
 
 
-h    display this help message and exit
 
-b    display all numbers in human readable format (base 2)
 
-k    display all numbers in Byte instead of the default human readable format
 
If "directory" is not specified user's home and scratch directory are used as argument
 
[sfux@eu-login-20-ng ~]$
 
 
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.
 
  
 
==Units==
 
==Units==
Line 58: Line 41:
 
|Pebibyte || PiB || <math>2^{50}</math> bytes
 
|Pebibyte || PiB || <math>2^{50}</math> bytes
 
|}
 
|}
 +
 +
 +
==Documentation==
 +
You can display the documentation of the command by running it with the parameter <tt>-h</tt>:
 +
 +
[sfux@eu-login-20-ng ~]$ lquota -h
 +
/cluster/apps/local/lquota: Command to check quotas on distruted filesystems
 +
Default: values are diplayed in human readable format (base 10)
 +
 +
Usage: quota [-h] [-b] [-k] [directory]
 +
 +
-h    display this help message and exit
 +
-b    display all numbers in human readable format (base 2)
 +
-k    display all numbers in Byte instead of the default human readable format
 +
If "directory" is not specified user's home and scratch directory are used as argument
 +
[sfux@eu-login-20-ng ~]$
 +
 +
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==
 
==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. If a path is specified as argument to the script, then it will display the inode and space quota for this particular storage share:
+
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 human readable format (base 10):
 +
 
 +
[sfux@eu-login-20-ng ~]$ lquota
 +
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
 +
| Storage location:          | Quota type:      | Used:            | Soft quota:      | Hard quota:      |
 +
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
 +
| /cluster/home/sfux          | space            |            7.48GB |          17.17GB |          21.47GB |
 +
| -                          | inodes            |            19922 |            80000 |            100000 |
 +
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
 +
| /cluster/shadow            | space            |            4.09kB |            2.14GB |            2.14GB |
 +
| -                          | inodes            |                2 |            50000 |            50000 |
 +
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
 +
| /cluster/scratch/sfux      | space            |          237.56kB |            2.49TB |            2.69TB |
 +
| -                          | inodes            |                29 |          1000000 |          1500000 |
 +
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
 +
[sfux@eu-login-20-ng ~]$
 +
 
 +
For output in base 2, please use the option <tt>-b</tt>:
 +
 
 +
[sfux@eu-login-20-ng ~]$ lquota -b
 +
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
 +
| Storage location:          | Quota type:      | Used:            | Soft quota:      | Hard quota:       |
 +
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
 +
| /cluster/home/sfux          | space            |          6.96GiB |          16.00GiB |          20.00GiB |
 +
| -                          | inodes            |            19922 |            80000 |            100000 |
 +
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
 +
| /cluster/shadow            | space            |          4.00KiB |          2.00GiB |          2.00GiB |
 +
| -                          | inodes            |                2 |            50000 |            50000 |
 +
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
 +
| /cluster/scratch/sfux      | space            |        232.00KiB |          2.27TiB |          2.45TiB |
 +
| -                          | inodes            |                29 |          1000000 |          1500000 |
 +
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
 +
[sfux@eu-login-20-ng ~]$
  
[sfux@eu-login-10-ng ~]$ lquota
+
For output in Bytes instead of human readable format, please use the option <tt>-k</tt>
Disk quotas for user sfux (uid 40093):
 
      Filesystem  space  quota  limit  grace  files  quota  limit  grace
 
eu-ne-home8:/home8
 
                  7134M  16384M  20480M          19916  80000    100k       
 
eu-ne-lsf:/shadow
 
                      4K  2048M  2048M              2  50000  50000       
 
-----------------------------------------------------------------------------------
 
Disk quotas for usr 40093 (uid 40093):
 
      Filesystem    used  quota  limit  grace  files  quota  limit  grace
 
/cluster/scratch//sfux
 
                    232k  2.273T  2.455T      -      29  1000000 1500000      -
 
  
  [sfux@eu-login-10-ng ~]$ lquota /cluster/work/sis
+
  [sfux@eu-login-20-ng ~]$ lquota -k
  Disk quotas for prj 34 (pid 34):
+
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
      Filesystem    used  quota  limit  grace  files  quota  limit  grace
+
| Storage location:          | Quota type:      | Used:            | Soft quota:      | Hard quota:      |
  /cluster/work/sis
+
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
                  7.392T 9.095T    10T      - 1141042 10000000 11000000      -
+
| /cluster/home/sfux          | space[B]          |        7481516032 |      17179869184 |      21474836480 |
 +
| -                          | inodes            |            19922 |            80000 |            100000 |
 +
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
 +
| /cluster/shadow            | space[B]          |              4096 |        2147483648 |        2147483648 |
 +
  | -                          | inodes            |                2 |            50000 |            50000 |
 +
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
 +
  | /cluster/scratch/sfux      | space[B]          |            237568 |    2499670966272 |    2699386945536 |
 +
  | -                          | inodes            |                29 |          1000000 |          1500000 |
 +
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
 +
  [sfux@eu-login-20-ng ~]$
  
  [sfux@eu-login-10-ng ~]$ lquota /cluster/project/sis
+
If a path is specified as argument to the script, then it will display the inode and space quota for this particular storage share:
  Filesystem                  Size Used Avail Use% Mounted on
+
 
  eu-ne-project2:/project/sis 9.5T 5.7T 3.9T 60% /cluster/project/sis
+
  [sfux@eu-login-20-ng ~]$ lquota /cluster/project/sis
  Filesystem                  Inodes IUsed IFree IUse% Mounted on
+
  +-----------------------------+-------------------+-------------------+-------------------+-------------------+
  eu-ne-project2:/project/sis    31M 1.1M  30M    4% /cluster/project/sis
+
  | Storage location:          | Quota type:      | Used:            | Soft quota:      | Hard quota:      |
 +
  +-----------------------------+-------------------+-------------------+-------------------+-------------------+
 +
| /cluster/project/sis       | space            |            6.17TB |                - |          10.41TB |
 +
  | -                          | inodes            |          1155583 |                - |          30721113 |
 +
  +-----------------------------+-------------------+-------------------+-------------------+-------------------+
 +
 
 +
  [sfux@eu-login-20-ng ~]$ lquota /cluster/work/sis
 +
  +-----------------------------+-------------------+-------------------+-------------------+-------------------+
 +
| Storage location:          | Quota type:      | Used:            | Soft quota:      | Hard quota:      |
 +
  +-----------------------------+-------------------+-------------------+-------------------+-------------------+
 +
  | /cluster/work/sis           | space            |            8.12TB |          10.00TB |          11.00TB |
 +
| -                          | inodes            |          1141042 |          10000000 |          11000000 |
 +
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
 +
[sfux@eu-login-20-ng ~]$
  
 
For the moment, you might need to use the full path <tt>/cluster/apps/local/lquota</tt> to run the script. We will add it to the users path soon, such that you will not have to use the full path.
 
For the moment, you might need to use the full path <tt>/cluster/apps/local/lquota</tt> to run the script. We will add it to the users path soon, such that you will not have to use the full path.

Revision as of 08:37, 6 March 2019

Introduction

We have implemented a unified quota wrapper lquota that can be used to query the file systems space and inode (file or directory descriptor) quota on all file systems on all clusters that we have:

  • /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)

Units

The quota wrapper can display the values either in Bytes, human readable format (base 10) or human readable format (base 2)

Base 10

Name Prefix Size
Kilobyte kB 10^3 bytes
Megabyte MB 10^6 bytes
Gigabyte GB 10^9 bytes
Terabyte TB 10^12 bytes
Petabyte PB 10^15 bytes

Base 2

Name Prefix Size
Kibibyte KiB 2^{10} bytes
Mebibyte MiB 2^{20} bytes
Gibibyte GiB 2^{30} bytes
Tebibyte TiB 2^{40} bytes
Pebibyte PiB 2^{50} bytes


Documentation

You can display the documentation of the command by running it with the parameter -h:

[sfux@eu-login-20-ng ~]$ lquota -h
/cluster/apps/local/lquota: Command to check quotas on distruted filesystems
Default: values are diplayed in human readable format (base 10) 

Usage: quota [-h] [-b] [-k] [directory]

-h    display this help message and exit
-b    display all numbers in human readable format (base 2)
-k    display all numbers in Byte instead of the default human readable format
If "directory" is not specified user's home and scratch directory are used as argument
[sfux@eu-login-20-ng ~]$ 

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 human readable format (base 10):

[sfux@eu-login-20-ng ~]$ lquota
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
| Storage location:           | Quota type:       | Used:             | Soft quota:       | Hard quota:       |
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
| /cluster/home/sfux          | space             |            7.48GB |           17.17GB |           21.47GB |
| -                           | inodes            |             19922 |             80000 |            100000 |
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
| /cluster/shadow             | space             |            4.09kB |            2.14GB |            2.14GB |
| -                           | inodes            |                 2 |             50000 |             50000 |
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
| /cluster/scratch/sfux       | space             |          237.56kB |            2.49TB |            2.69TB |
| -                           | inodes            |                29 |           1000000 |           1500000 |
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
[sfux@eu-login-20-ng ~]$

For output in base 2, please use the option -b:

[sfux@eu-login-20-ng ~]$ lquota -b
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
| Storage location:           | Quota type:       | Used:             | Soft quota:       | Hard quota:       |
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
| /cluster/home/sfux          | space             |           6.96GiB |          16.00GiB |          20.00GiB |
| -                           | inodes            |             19922 |             80000 |            100000 |
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
| /cluster/shadow             | space             |           4.00KiB |           2.00GiB |           2.00GiB |
| -                           | inodes            |                 2 |             50000 |             50000 |
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
| /cluster/scratch/sfux       | space             |         232.00KiB |           2.27TiB |           2.45TiB |
| -                           | inodes            |                29 |           1000000 |           1500000 |
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
[sfux@eu-login-20-ng ~]$

For output in Bytes instead of human readable format, please use the option -k

[sfux@eu-login-20-ng ~]$ lquota -k
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
| Storage location:           | Quota type:       | Used:             | Soft quota:       | Hard quota:       |
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
| /cluster/home/sfux          | space[B]          |        7481516032 |       17179869184 |       21474836480 |
| -                           | inodes            |             19922 |             80000 |            100000 |
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
| /cluster/shadow             | space[B]          |              4096 |        2147483648 |        2147483648 |
| -                           | inodes            |                 2 |             50000 |             50000 |
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
| /cluster/scratch/sfux       | space[B]          |            237568 |     2499670966272 |     2699386945536 |
| -                           | inodes            |                29 |           1000000 |           1500000 |
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
[sfux@eu-login-20-ng ~]$ 

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-20-ng ~]$ lquota /cluster/project/sis
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
| Storage location:           | Quota type:       | Used:             | Soft quota:       | Hard quota:       |
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
| /cluster/project/sis        | space             |            6.17TB |                 - |           10.41TB |
| -                           | inodes            |           1155583 |                 - |          30721113 |
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
[sfux@eu-login-20-ng ~]$ lquota /cluster/work/sis
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
| Storage location:           | Quota type:       | Used:             | Soft quota:       | Hard quota:       |
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
| /cluster/work/sis           | space             |            8.12TB |           10.00TB |           11.00TB |
| -                           | inodes            |           1141042 |          10000000 |          11000000 |
+-----------------------------+-------------------+-------------------+-------------------+-------------------+
[sfux@eu-login-20-ng ~]$ 

For the moment, you might need to use the full path /cluster/apps/local/lquota to run the script. We will add it to the users path soon, such that you will not have to use the full path.