Quota: Difference between revisions

From UMIACS
Jump to navigation Jump to search
No edit summary
 
(12 intermediate revisions by 5 users not shown)
Line 1: Line 1:
==Tree Quotas==
=Quotas=
The current most prevalent style of quota management is done through tree quotas that show up in how much space is available in the file system by using the '''<tt>df</tt>''' command to inspect either the current path (no arguments given) or a given path.   [[NFShomes]] and many other file systems utilize this style of quota management.
==RPC Quotas==
File systems that support RPC quotad quotas are reported to the user by the '''<tt>quota</tt>''' command. Home directories that are mounted from our Isilon NAS will support these kinds of quotas.


For example to show my /nfshomes/derektest home directory quota i can just use '''<tt>df ~</tt>'''
To find out what your current quota is, first run '''<tt>df .</tt>''' to find out what file system you are currently mounted from (in this example it is  <tt>data.isilon.umiacs.umd.edu:/ifs/umiacs/homes/username</tt>). '''Please note that the Use% here is for the entire file system and not your user-specific home directory.'''
<pre>
<pre>
$ df ~
# df .
Filesystem           1K-blocks     Used Available Use% Mounted on
Filesystem                                           1K-blocks Used Available Use% Mounted on
umiacsfs02:/nfshomes/derektest
data.isilon.umiacs.umd.edu:/ifs/umiacs/homes/username  5138048   32  5138016   1% /nfshomes/username
                      1024000    49984   974016   5% /nfshomes/derektest
</pre>
</pre>


==RPC Quotas==
Then run '''<tt>quota</tt>''' and that line will list your quota information for that file systemIf you see errors such as "Error while getting quota from ..." you may safely ignore these as some of our file systems do not report quotas correctly.
Alternatively we now have some file systems that support RPC quotad quotas.  These are reported to the user by the '''<tt>quota</tt>''' commandHome directories that are mounted from our Dell FluidFS NAS will support these kinds of quotas (/cliphomes, /cfarhomes, /cbcbhomes).


To find out what your current quota you can run '''<tt>df .</tt>''' to find out what file system you are currently mounted from (in this example it is  <tt>fluidfs:/rama_cfarhomes/derek</tt>)
<pre>
<pre>
# df .
$ quota
Filesystem           1K-blocks     Used Available Use% Mounted on
Disk quotas for user username (uid 13337):
fluidfs:/rama_cfarhomes/derek
    Filesystem blocks   quota  limit  grace  files  quota  limit  grace
                     1073741824 759351008 314390816 71% /cfarhomes/derek
data.isilon.umiacs.umd.edu:/ifs/umiacs/homes/username
                     24 5138024 5242880              10  10276045 10485760
</pre>
</pre>


You can then run '''<tt>quota</tt>''' and that line will list your quota information for that file system. If you see errors such as "Error while getting quota from ..." you may safely ignore these as some of our file systems such as Gluster do not report quotas correctly.
If you have hit your RPC quota and haven't realized it, you may see some strange issues. For example, you will not be able to write-out files (although 'touch' and file concatenation will succeed). Some applications such as vi will throw "FSync" errors. Similarly, commands such as wget will appear to succeed but your files will be zero-length.
 
==Tree Quotas==
An alternate style of quota management is done through tree quotas that show up in how much space is available in the file system by using the '''<tt>df</tt>''' command to inspect either the current path (no arguments given) or a given path.


For example to show my /nfshomes/username home directory quota, I can just use '''<tt>df ~</tt>'''
<pre>
<pre>
$ quota
$ df ~
Disk quotas for user derek (uid 2174):
Filesystem                                           1K-blocks Used Available Use% Mounted on
    Filesystem  blocks  quota  limit  grace  files   quota   limit   grace
data.isilon.umiacs.umd.edu:/ifs/umiacs/homes/username   5138048    32   5138016   1% /nfshomes/username
fluidfs:/rama_cfarhomes/derek
                337560      0 10240000              0      0      0
</pre>
</pre>


If you have hit your RPC Quota and haven't realized it, you may see some strange issues. For example, you will have problems writing out files (although 'touch' will succeed). Some applications such as vi will throw "FSync" errors. Similarly, commands such as wget will appear to succeed but your files will be zero-length.
=Calculating Space Usage=
When you are looking to diagnose how much space you are using you often want to know how much storage the immediate directories are taking in a certain folder.  The utility to do this is <code>du</code>.  Since *NIX operating systems use the concept of <code>..</code> for the previous directory simple file globs like <code>.*</code> don't provide exactly what you need since in certain places like your home directories there are a lot of dot files or hidden files (eg. <code>.somename</code>). To identify all files and directories from the current directory you can use something like <code>du -hs .[^.]* *</code>.
 
<pre>
-bash-4.2$ du -hs .[^.]* *
48K    .bash_history
94M    .cache
160K    .compiz
3.0M    .config
32K    .gconf
64K    .gnupg
48K    .history
48K    .ICEauthority
4.2M    .local
29M    .mozilla
224K    .ssh
48K    .viminfo
48K    .Xauthority
48K    .xsession-errors
7.2M    catkin_ws
32K    Desktop
32K    Documents
57M    Downloads
32K    Music
32K    perl5
32K    Pictures
32K    Public
32K    Templates
32K    Videos
</pre>

Latest revision as of 17:52, 6 December 2023

Quotas

RPC Quotas

File systems that support RPC quotad quotas are reported to the user by the quota command. Home directories that are mounted from our Isilon NAS will support these kinds of quotas.

To find out what your current quota is, first run df . to find out what file system you are currently mounted from (in this example it is data.isilon.umiacs.umd.edu:/ifs/umiacs/homes/username). Please note that the Use% here is for the entire file system and not your user-specific home directory.

# df .
Filesystem                                            1K-blocks  Used Available Use% Mounted on
data.isilon.umiacs.umd.edu:/ifs/umiacs/homes/username   5138048    32   5138016   1% /nfshomes/username

Then run quota and that line will list your quota information for that file system. If you see errors such as "Error while getting quota from ..." you may safely ignore these as some of our file systems do not report quotas correctly.

$ quota
Disk quotas for user username (uid 13337):
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
data.isilon.umiacs.umd.edu:/ifs/umiacs/homes/username
                     24  5138024 5242880              10  10276045 10485760

If you have hit your RPC quota and haven't realized it, you may see some strange issues. For example, you will not be able to write-out files (although 'touch' and file concatenation will succeed). Some applications such as vi will throw "FSync" errors. Similarly, commands such as wget will appear to succeed but your files will be zero-length.

Tree Quotas

An alternate style of quota management is done through tree quotas that show up in how much space is available in the file system by using the df command to inspect either the current path (no arguments given) or a given path.

For example to show my /nfshomes/username home directory quota, I can just use df ~

$ df ~
Filesystem                                            1K-blocks  Used Available Use% Mounted on
data.isilon.umiacs.umd.edu:/ifs/umiacs/homes/username   5138048    32   5138016   1% /nfshomes/username

Calculating Space Usage

When you are looking to diagnose how much space you are using you often want to know how much storage the immediate directories are taking in a certain folder. The utility to do this is du. Since *NIX operating systems use the concept of .. for the previous directory simple file globs like .* don't provide exactly what you need since in certain places like your home directories there are a lot of dot files or hidden files (eg. .somename). To identify all files and directories from the current directory you can use something like du -hs .[^.]* *.

-bash-4.2$ du -hs .[^.]* *
48K     .bash_history
94M     .cache
160K    .compiz
3.0M    .config
32K     .gconf
64K     .gnupg
48K     .history
48K     .ICEauthority
4.2M    .local
29M     .mozilla
224K    .ssh
48K     .viminfo
48K     .Xauthority
48K     .xsession-errors
7.2M    catkin_ws
32K     Desktop
32K     Documents
57M     Downloads
32K     Music
32K     perl5
32K     Pictures
32K     Public
32K     Templates
32K     Videos