[LU-805] lfs quota should show quota allocation rather than used Created: 28/Oct/11  Updated: 09/May/12  Resolved: 16/Jan/12

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 1.8.6
Fix Version/s: Lustre 2.2.0, Lustre 2.1.2, Lustre 1.8.8

Type: Bug Priority: Minor
Reporter: Mahmoud Hanafi Assignee: Niu Yawei (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Environment:

Lustre 1.8.6 clients


Severity: 3
Epic: quota
Rank (Obsolete): 4787

 Description   

lfs quota give actual used rather than what has been allocated. But what is allocated what really effects the user. Here is an example

sh-3.2# lfs quota -u treddy /nobackupp30
Disk quotas for user treddy (uid 10787):
Filesystem kbytes quota limit grace files quota limit grace
/nobackupp30 208932428 210000000 420000000 - 14641 75000 100000 -

This shows that he is under his soft quota. But if we look at what he is allocated

pbspl1 ~ # lfs quota v -u treddy /nobackupp30 | awk '$2 == ""

{ sumu = sumu + $1; suma = suma + $3 }

END

{ print sumu, suma, "\n" }

'
> 208932428 220463104

We see that his allocation (220,463,104) is over the softlimit (210,000,000). Therefore his grace time has been accumulating and in fact it is expired.

I have a modified version of lfs tool that does a better job of providing the quota info.

bash-3.2# /usr/local/bin/lfs.nas quota -v -u treddy /nobackupp30
Disk quotas for user treddy (uid 10787):
Filesystem kbytes quota limit grace files quota limit grace
/nobackupp30 208932428* 210000000 420000000 None 14641 75000 100000 -
nbp30-MDT0000_UUID
6844 - 131072 - 14641 - 20480 -
nbp30-OST0000_UUID
2352640 - 2490368 - - - - -
nbp30-OST0001_UUID
1963180 - 2097152 - - - - -
...

nbp30-OST0076_UUID
2860332 - 3014656 - - - - -
nbp30-OST0077_UUID
1344680 - 1441792 - - - - -
------- -------
Total 208932428 220463104

We see here that he has no grace time left and the softlimit has turn into a hardlimit. In order to reset his grace time he must delete enough data to drop his allocation below his softlimit. In this case it would be ~10,217 MB.

So it would be better to show total allocated in the lfs quota output. Example in this case should be

Disk quotas for user treddy (uid 10787):
Filesystem kbytes quota limit grace files quota limit grace
/nobackupp30 220463104* 210000000 420000000 None - 14641 75000 100000 -



 Comments   
Comment by Peter Jones [ 28/Oct/11 ]

Niu

Could you please advise on this ticket?

Thanks

Peter

Comment by Niu Yawei (Inactive) [ 29/Oct/11 ]

Hi, Mahmoud

I'm not quite sure what does your "quota allocation" exactly mean, if it's quota units that quota slaves (one for each OSTs and MDT) acquired from quota master (on MDT), then it should not affect user's space usage, user should care only if the "total used" is exceeding "total soft limit" or "total hard limit".

The quota units allocated for each node is displayed in the 'limit' column of "lfs quoa -v" output.

Thanks

  • Niu
Comment by Mahmoud Hanafi [ 01/Nov/11 ]

The issue is that the quota units that the slave acquire effects the user usage. As in the example I gave the users usage is less then the softlimit. But his total quota units is more than softlimit. Under this scenario the softlimit grace timer doesn't get reset. And in this case it expired. But using lsf quota you have no way on know that.

Comment by Niu Yawei (Inactive) [ 02/Nov/11 ]

I see your point now, thank you, Mahmoud.

However, I think we can't replace the 'total used' with 'total allocated qunit' in the output of 'lfs quota', since the 'total used' is also important to users, and replacing it with 'total allocated qunit' could confuse user even more. Maybe just print an additional 'total allocated qunit' will be helpful?

Hi, Johann & Fanyong

When I look close into the code, I found that we doesn't apply same qunit shrink logic to soft limit: see dqacq_handler(), when usage + acquired > softlimit, we just trigger the grace time immediately, but not return a shrinked value. Is this our design or a defect? Thanks.

Comment by Niu Yawei (Inactive) [ 08/Nov/11 ]

patch for b1_8: http://review.whamcloud.com/#change,1667

Comment by Niu Yawei (Inactive) [ 08/Nov/11 ]

patch for master: http://review.whamcloud.com/1674

Comment by Build Master (Inactive) [ 04/Jan/12 ]

Integrated in lustre-master » x86_64,server,el5,ofa #402
LU-805 quota: lfs quota doesn't print grace time correctly (Revision a9b5457bc7168393803d692a016909528dc07725)

Result = SUCCESS
Oleg Drokin : a9b5457bc7168393803d692a016909528dc07725
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 04/Jan/12 ]

Integrated in lustre-master » x86_64,client,el6,inkernel #402
LU-805 quota: lfs quota doesn't print grace time correctly (Revision a9b5457bc7168393803d692a016909528dc07725)

Result = SUCCESS
Oleg Drokin : a9b5457bc7168393803d692a016909528dc07725
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 04/Jan/12 ]

Integrated in lustre-master » i686,server,el6,inkernel #402
LU-805 quota: lfs quota doesn't print grace time correctly (Revision a9b5457bc7168393803d692a016909528dc07725)

Result = SUCCESS
Oleg Drokin : a9b5457bc7168393803d692a016909528dc07725
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 04/Jan/12 ]

Integrated in lustre-master » x86_64,client,el5,inkernel #402
LU-805 quota: lfs quota doesn't print grace time correctly (Revision a9b5457bc7168393803d692a016909528dc07725)

Result = SUCCESS
Oleg Drokin : a9b5457bc7168393803d692a016909528dc07725
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 04/Jan/12 ]

Integrated in lustre-master » x86_64,client,sles11,inkernel #402
LU-805 quota: lfs quota doesn't print grace time correctly (Revision a9b5457bc7168393803d692a016909528dc07725)

Result = SUCCESS
Oleg Drokin : a9b5457bc7168393803d692a016909528dc07725
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 04/Jan/12 ]

Integrated in lustre-master » x86_64,client,el5,ofa #402
LU-805 quota: lfs quota doesn't print grace time correctly (Revision a9b5457bc7168393803d692a016909528dc07725)

Result = SUCCESS
Oleg Drokin : a9b5457bc7168393803d692a016909528dc07725
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 04/Jan/12 ]

Integrated in lustre-master » x86_64,server,el5,inkernel #402
LU-805 quota: lfs quota doesn't print grace time correctly (Revision a9b5457bc7168393803d692a016909528dc07725)

Result = SUCCESS
Oleg Drokin : a9b5457bc7168393803d692a016909528dc07725
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 04/Jan/12 ]

Integrated in lustre-master » x86_64,client,ubuntu1004,inkernel #402
LU-805 quota: lfs quota doesn't print grace time correctly (Revision a9b5457bc7168393803d692a016909528dc07725)

Result = SUCCESS
Oleg Drokin : a9b5457bc7168393803d692a016909528dc07725
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 04/Jan/12 ]

Integrated in lustre-master » x86_64,server,el6,inkernel #402
LU-805 quota: lfs quota doesn't print grace time correctly (Revision a9b5457bc7168393803d692a016909528dc07725)

Result = SUCCESS
Oleg Drokin : a9b5457bc7168393803d692a016909528dc07725
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 04/Jan/12 ]

Integrated in lustre-master » i686,client,el6,inkernel #402
LU-805 quota: lfs quota doesn't print grace time correctly (Revision a9b5457bc7168393803d692a016909528dc07725)

Result = SUCCESS
Oleg Drokin : a9b5457bc7168393803d692a016909528dc07725
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 04/Jan/12 ]

Integrated in lustre-master » i686,server,el5,ofa #402
LU-805 quota: lfs quota doesn't print grace time correctly (Revision a9b5457bc7168393803d692a016909528dc07725)

Result = SUCCESS
Oleg Drokin : a9b5457bc7168393803d692a016909528dc07725
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 04/Jan/12 ]

Integrated in lustre-master » i686,server,el5,inkernel #402
LU-805 quota: lfs quota doesn't print grace time correctly (Revision a9b5457bc7168393803d692a016909528dc07725)

Result = SUCCESS
Oleg Drokin : a9b5457bc7168393803d692a016909528dc07725
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 04/Jan/12 ]

Integrated in lustre-master » i686,client,el5,inkernel #402
LU-805 quota: lfs quota doesn't print grace time correctly (Revision a9b5457bc7168393803d692a016909528dc07725)

Result = SUCCESS
Oleg Drokin : a9b5457bc7168393803d692a016909528dc07725
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 04/Jan/12 ]

Integrated in lustre-master » i686,client,el5,ofa #402
LU-805 quota: lfs quota doesn't print grace time correctly (Revision a9b5457bc7168393803d692a016909528dc07725)

Result = SUCCESS
Oleg Drokin : a9b5457bc7168393803d692a016909528dc07725
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 05/Jan/12 ]

Integrated in lustre-b1_8 » x86_64,client,el5,ofa #164
LU-805 quota: lfs quota doesn't print grace time correctly (Revision dca979f888a054d186f7be679cb4ffefcd4d9692)

Result = SUCCESS
Johann Lombardi : dca979f888a054d186f7be679cb4ffefcd4d9692
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 05/Jan/12 ]

Integrated in lustre-b1_8 » i686,client,el6,inkernel #164
LU-805 quota: lfs quota doesn't print grace time correctly (Revision dca979f888a054d186f7be679cb4ffefcd4d9692)

Result = SUCCESS
Johann Lombardi : dca979f888a054d186f7be679cb4ffefcd4d9692
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 05/Jan/12 ]

Integrated in lustre-b1_8 » x86_64,server,el5,inkernel #164
LU-805 quota: lfs quota doesn't print grace time correctly (Revision dca979f888a054d186f7be679cb4ffefcd4d9692)

Result = SUCCESS
Johann Lombardi : dca979f888a054d186f7be679cb4ffefcd4d9692
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 05/Jan/12 ]

Integrated in lustre-b1_8 » x86_64,client,el5,inkernel #164
LU-805 quota: lfs quota doesn't print grace time correctly (Revision dca979f888a054d186f7be679cb4ffefcd4d9692)

Result = SUCCESS
Johann Lombardi : dca979f888a054d186f7be679cb4ffefcd4d9692
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 05/Jan/12 ]

Integrated in lustre-b1_8 » i686,client,el5,inkernel #164
LU-805 quota: lfs quota doesn't print grace time correctly (Revision dca979f888a054d186f7be679cb4ffefcd4d9692)

Result = SUCCESS
Johann Lombardi : dca979f888a054d186f7be679cb4ffefcd4d9692
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 05/Jan/12 ]

Integrated in lustre-b1_8 » x86_64,client,el6,inkernel #164
LU-805 quota: lfs quota doesn't print grace time correctly (Revision dca979f888a054d186f7be679cb4ffefcd4d9692)

Result = SUCCESS
Johann Lombardi : dca979f888a054d186f7be679cb4ffefcd4d9692
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 05/Jan/12 ]

Integrated in lustre-b1_8 » x86_64,server,el5,ofa #164
LU-805 quota: lfs quota doesn't print grace time correctly (Revision dca979f888a054d186f7be679cb4ffefcd4d9692)

Result = SUCCESS
Johann Lombardi : dca979f888a054d186f7be679cb4ffefcd4d9692
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 05/Jan/12 ]

Integrated in lustre-b1_8 » x86_64,client,ubuntu1004,inkernel #164
LU-805 quota: lfs quota doesn't print grace time correctly (Revision dca979f888a054d186f7be679cb4ffefcd4d9692)

Result = SUCCESS
Johann Lombardi : dca979f888a054d186f7be679cb4ffefcd4d9692
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 05/Jan/12 ]

Integrated in lustre-b1_8 » i686,client,el5,ofa #164
LU-805 quota: lfs quota doesn't print grace time correctly (Revision dca979f888a054d186f7be679cb4ffefcd4d9692)

Result = SUCCESS
Johann Lombardi : dca979f888a054d186f7be679cb4ffefcd4d9692
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 05/Jan/12 ]

Integrated in lustre-b1_8 » i686,server,el5,inkernel #164
LU-805 quota: lfs quota doesn't print grace time correctly (Revision dca979f888a054d186f7be679cb4ffefcd4d9692)

Result = SUCCESS
Johann Lombardi : dca979f888a054d186f7be679cb4ffefcd4d9692
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 05/Jan/12 ]

Integrated in lustre-b1_8 » i686,server,el5,ofa #164
LU-805 quota: lfs quota doesn't print grace time correctly (Revision dca979f888a054d186f7be679cb4ffefcd4d9692)

Result = SUCCESS
Johann Lombardi : dca979f888a054d186f7be679cb4ffefcd4d9692
Files :

  • lustre/utils/lfs.c
Comment by Peter Jones [ 16/Jan/12 ]

Landed for 2.2

Comment by Build Master (Inactive) [ 08/Apr/12 ]

Integrated in lustre-b2_1 » x86_64,client,sles11,inkernel #41
LU-805 quota: lfs quota doesn't print grace time correctly (Revision fb46538ed943f8d9612ec05d6e97a8ed10e248fe)

Result = SUCCESS
Oleg Drokin : fb46538ed943f8d9612ec05d6e97a8ed10e248fe
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 08/Apr/12 ]

Integrated in lustre-b2_1 » i686,client,el6,inkernel #41
LU-805 quota: lfs quota doesn't print grace time correctly (Revision fb46538ed943f8d9612ec05d6e97a8ed10e248fe)

Result = SUCCESS
Oleg Drokin : fb46538ed943f8d9612ec05d6e97a8ed10e248fe
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 08/Apr/12 ]

Integrated in lustre-b2_1 » x86_64,server,el6,inkernel #41
LU-805 quota: lfs quota doesn't print grace time correctly (Revision fb46538ed943f8d9612ec05d6e97a8ed10e248fe)

Result = SUCCESS
Oleg Drokin : fb46538ed943f8d9612ec05d6e97a8ed10e248fe
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 08/Apr/12 ]

Integrated in lustre-b2_1 » i686,client,el5,ofa #41
LU-805 quota: lfs quota doesn't print grace time correctly (Revision fb46538ed943f8d9612ec05d6e97a8ed10e248fe)

Result = SUCCESS
Oleg Drokin : fb46538ed943f8d9612ec05d6e97a8ed10e248fe
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 08/Apr/12 ]

Integrated in lustre-b2_1 » x86_64,server,el5,ofa #41
LU-805 quota: lfs quota doesn't print grace time correctly (Revision fb46538ed943f8d9612ec05d6e97a8ed10e248fe)

Result = SUCCESS
Oleg Drokin : fb46538ed943f8d9612ec05d6e97a8ed10e248fe
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 08/Apr/12 ]

Integrated in lustre-b2_1 » x86_64,client,el6,inkernel #41
LU-805 quota: lfs quota doesn't print grace time correctly (Revision fb46538ed943f8d9612ec05d6e97a8ed10e248fe)

Result = SUCCESS
Oleg Drokin : fb46538ed943f8d9612ec05d6e97a8ed10e248fe
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 08/Apr/12 ]

Integrated in lustre-b2_1 » i686,server,el6,inkernel #41
LU-805 quota: lfs quota doesn't print grace time correctly (Revision fb46538ed943f8d9612ec05d6e97a8ed10e248fe)

Result = SUCCESS
Oleg Drokin : fb46538ed943f8d9612ec05d6e97a8ed10e248fe
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 08/Apr/12 ]

Integrated in lustre-b2_1 » x86_64,client,el5,inkernel #41
LU-805 quota: lfs quota doesn't print grace time correctly (Revision fb46538ed943f8d9612ec05d6e97a8ed10e248fe)

Result = SUCCESS
Oleg Drokin : fb46538ed943f8d9612ec05d6e97a8ed10e248fe
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 08/Apr/12 ]

Integrated in lustre-b2_1 » i686,server,el5,inkernel #41
LU-805 quota: lfs quota doesn't print grace time correctly (Revision fb46538ed943f8d9612ec05d6e97a8ed10e248fe)

Result = SUCCESS
Oleg Drokin : fb46538ed943f8d9612ec05d6e97a8ed10e248fe
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 08/Apr/12 ]

Integrated in lustre-b2_1 » x86_64,server,el5,inkernel #41
LU-805 quota: lfs quota doesn't print grace time correctly (Revision fb46538ed943f8d9612ec05d6e97a8ed10e248fe)

Result = SUCCESS
Oleg Drokin : fb46538ed943f8d9612ec05d6e97a8ed10e248fe
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 08/Apr/12 ]

Integrated in lustre-b2_1 » i686,server,el5,ofa #41
LU-805 quota: lfs quota doesn't print grace time correctly (Revision fb46538ed943f8d9612ec05d6e97a8ed10e248fe)

Result = SUCCESS
Oleg Drokin : fb46538ed943f8d9612ec05d6e97a8ed10e248fe
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 08/Apr/12 ]

Integrated in lustre-b2_1 » x86_64,client,el5,ofa #41
LU-805 quota: lfs quota doesn't print grace time correctly (Revision fb46538ed943f8d9612ec05d6e97a8ed10e248fe)

Result = SUCCESS
Oleg Drokin : fb46538ed943f8d9612ec05d6e97a8ed10e248fe
Files :

  • lustre/utils/lfs.c
Comment by Build Master (Inactive) [ 08/Apr/12 ]

Integrated in lustre-b2_1 » i686,client,el5,inkernel #41
LU-805 quota: lfs quota doesn't print grace time correctly (Revision fb46538ed943f8d9612ec05d6e97a8ed10e248fe)

Result = SUCCESS
Oleg Drokin : fb46538ed943f8d9612ec05d6e97a8ed10e248fe
Files :

  • lustre/utils/lfs.c
Generated at Sat Feb 10 01:10:34 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.