Details
-
Bug
-
Resolution: Not a Bug
-
Minor
-
None
-
Lustre 2.6.0
-
None
-
3
-
12236
Description
During the testing of MDT online addition, I found quota doesn't work as expect. Here is the test steps:
1. format a system(ldiskfs) with only one MDT
2. set inode quota to 2048
3. touch some files
4. keep the system on, format and add the second MDT, quota on new MDT is enabled
5. create a dir on the sec MDT and it shows quota exceeded when trying to touch a file under it
I also verified if the system is setup with 2 MDT from the beginning, quota works as expect.
[root@client-18 tests]# lfs quota -v -u quota_usr /mnt/lustre
ustre
Disk quotas for user quota_usr (uid 60000):
Filesystem kbytes quota limit grace files quota limit grace
/mnt/lustre 56 0 10240 - 1025 0 2048 -
lustre-MDT0000_UUID
56 - 0 - 1025 - 2048 -
lustre-MDT0001_UUID
0 - 0 - 0 - 0 -
lustre-OST0000_UUID
0 - 0 - - - - -
Total allocated inode limit: 2048, total allocated block limit: 0
[root@client-18 tests]# lfs quota -v -g quota_usr /mnt/lustre
Disk quotas for group quota_usr (gid 60000):
Filesystem kbytes quota limit grace files quota limit grace
/mnt/lustre 56 0 10240 - 1025 0 2048 -
lustre-MDT0000_UUID
56 - 0 - 1025 - 2048 -
lustre-MDT0001_UUID
0 - 0 - 0 - 0 -
lustre-OST0000_UUID
0 - 0 - - - - -
Total allocated inode limit: 2048, total allocated block limit: 0
[root@client-18 tests]# lfs mkdir -i 1 /mnt/lustre/test2
/mnt/lustre/test2
[root@client-18 tests]# chown quota_usr.quota_usr /mnt/lustre/test2
[root@client-18 tests]# lfs quota -v -g quota_usr /mnt/lustre
Disk quotas for group quota_usr (gid 60000):
Filesystem kbytes quota limit grace files quota limit grace
/mnt/lustre 60 0 10240 - 1026 0 2048 -
lustre-MDT0000_UUID
56 - 0 - 1025 - 2048 -
lustre-MDT0001_UUID
4 - 0 - 1* - 1 -
lustre-OST0000_UUID
0 - 0 - - - - -
Total allocated inode limit: 2049, total allocated block limit: 0
[root@client-18 tests]# touch /mnt/lustre/test2/b
[root@client-18 tests]# lfs quota -v -g quota_usr /mnt/lustre
Disk quotas for group quota_usr (gid 60000):
Filesystem kbytes quota limit grace files quota limit grace
/mnt/lustre 60 0 10240 - 1026 0 2048 -
lustre-MDT0000_UUID
56 - 0 - 1025 - 2048 -
lustre-MDT0001_UUID
4 - 0 - 1* - 1 -
lustre-OST0000_UUID
0 - 0 - - - - -
Total allocated inode limit: 2049, total allocated block limit: 0
[root@client-18 tests]# ./runas -u 60000 -g 60000 touch /mnt/lustre/test2/b
running as uid/gid/euid/egid 60000/60000/60000/60000, groups:
[touch] [/mnt/lustre/test2/b]
touch: cannot touch `/mnt/lustre/test2/b': Disk quota exceeded