[lustre-discuss] [EXTERNAL] Elegant way to dump quota/usage database?

Kevin M. Hildebrand kevin at umd.edu
Thu Feb 11 18:53:57 PST 2021


I had the same problem.  You can collect this information on a per-OST
basis, and do the summation yourself.  If you're collecting other metrics
already, it's easy to do.  We use telegraf and grafana to harvest metrics.
On each OSS, under /proc/fs/lustre/osd-*/*-OST*/quota_slave you'll find
several files that contain the usage information (acct_group, acct_user,
acct_project), and the limit information (limit_group, limit_user,
limit_project).  The files are organized by UID.

For example:
[root at oss0 quota_slave]# cat acct_user
usr_accounting:
- id:      298441
  usage:   { inodes:                   44, kbytes:              4333438 }
- id:      0
  usage:   { inodes:                  967, kbytes:              2593032 }
- id:      304420
  usage:   { inodes:                 8517, kbytes:              4444538 }
- id:      1802
  usage:   { inodes:                   53, kbytes:          45487123504 }
- id:      354496
  usage:   { inodes:                 1096, kbytes:              1711806 }

Kevin
--
Kevin Hildebrand
University of Maryland


Date: Thu, 11 Feb 2021 19:26:54 +0000
> From: "Vicker, Darby J. (JSC-EG111)[Jacobs Technology, Inc.]"
>         <darby.vicker-1 at nasa.gov>
> To: "barnet at icecube.wisc.edu" <barnet at icecube.wisc.edu>,
>         "lustre-discuss at lists.lustre.org" <lustre-discuss at lists.lustre.org
> >
> Subject: Re: [lustre-discuss] [EXTERNAL] Elegant way to dump
>         quota/usage database?
> Message-ID: <391D5E58-4698-4213-96E4-F9BFA0EF37A1 at nasa.gov>
> Content-Type: text/plain; charset="utf-8"
>
> FWIW, I've had the same need and I do exactly the brute force iteration
> you speak of for our LFS's to log user usage vs time.  For our NFS server,
> we use ZFS and there is a nice one-liner to give that info in ZFS.  I
> agree, it would be nice if there was a similar one-liner for lustre.
>
> ?-----Original Message-----
> From: lustre-discuss <lustre-discuss-bounces at lists.lustre.org> on behalf
> of Steve Barnet <barnet at icecube.wisc.edu>
> Reply-To: "barnet at icecube.wisc.edu" <barnet at icecube.wisc.edu>
> Date: Thursday, February 11, 2021 at 12:07 PM
> To: "lustre-discuss at lists.lustre.org" <lustre-discuss at lists.lustre.org>
> Subject: [EXTERNAL] [lustre-discuss] Elegant way to dump quota/usage
> database?
>
>     Hey all,
>
>        I would like to be able to dump the usage tracking and quota
>     information for my lustre filesystems. I am currently running lustre
> 2.12
>
>     lfs quota -u $user $filesystem
>
>     works well enough for a single user. But I have been looking for a way
>     to get that information for all users of the filesystem. So far, I
> have
>     not stumbled across anything more elegant than a brute force iteration
>     over my known users.
>
>     While that works (mostly), it is clearly not great. Is there a better
>     way to do this? Hoping I just missed something in the docs ...
>
>     Thanks in advance for any pointers in this area.
>
>     Best,
>
>     ---Steve
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lustre.org/pipermail/lustre-discuss-lustre.org/attachments/20210211/4c41d425/attachment-0001.html>


More information about the lustre-discuss mailing list