[LU-14115] Project Quota broken on Stripe directory Created: 05/Nov/20  Updated: 28/Jan/21  Resolved: 19/Nov/20

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.14.0

Type: Bug Priority: Minor
Reporter: Wang Shilong (Inactive) Assignee: Wang Shilong (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

root@es52 test2]# pwd
/mnt/myfs/test2

[root@es52 myfs]# lfs df -h
UUID bytes Used Available Use% Mounted on
myfs-MDT0000_UUID 95.8M 1.8M 85.4M 3% /mnt/myfs[MDT:0]
myfs-MDT0001_UUID 95.8M 1.7M 85.5M 2% /mnt/myfs[MDT:1]
myfs-OST0000_UUID 99.2M 1.4M 87.4M 2% /mnt/myfs[OST:0]
myfs-OST0001_UUID 99.2M 1.4M 87.4M 2% /mnt/myfs[OST:1]
myfs-OST0002_UUID 99.2M 1.4M 87.4M 2% /mnt/myfs[OST:2]
filesystem_summary: 297.7M 4.1M 262.1M 2% /mnt/myfs

[root@es52 myfs]# mkdir test2
[root@es52 myfs]# lfs setdirstripe -D -c 2 -i -1 test2
[root@es52 myfs]# lfs getdirstripe -D test2
lmv_stripe_count: 2 lmv_stripe_offset: -1 lmv_hash_type: fnv_1a_64

[root@es52 myfs]# cd test2
[root@es52 test2]# cp /root/testscript2.sh .

[root@es52 test2]# cat testscript2.sh
#/bin/bash
lctl dk > /dev/null
date +%s ;
date ;
lctl set_param debug=-1
mkdir topdir
chown nobody topdir
chattr +P topdir
chattr -p 2008 topdir
lsattr -p -d topdir
mkdir topdir/d1
lsattr -p -d topdir/d1
mkdir topdir/d1/d2
lsattr -p -d topdir/d1/d2
find topdir/|xargs lfs path2fid
rm -rf topdir
lctl dk |gzip > /tmp/lctl_dk_full.txt.gz
lctl set_param debug=0
lctl set_param debug="+ioctl +neterror +warning +error +emerg +ha +config +console +lfsck"

[root@es52 test2]# ./testscript2.sh
1604500107
Wed Nov 4 14:28:27 UTC 2020
debug=-1
2008 -----------------P topdir
2008 -----------------P topdir/d1
0 -------------------- topdir/d1/d2
topdir/: [0x200000bd1:0x8:0x0]
topdir/d1: [0x200000bd1:0x9:0x0]
topdir/d1/d2: [0x240000bd1:0x2:0x0]
debug=0
debug=+ioctl +neterror +warning +error +emerg +ha +config +console +lfsck

// Then with lfs project -s

[root@es52 myfs]# mkdir topdir
[root@es52 myfs]# lfs setdirstripe -D -c 2 -i -1 topdir
[root@es52 myfs]# lfs project -s -p 2008 topdir
[root@es52 myfs]# lsattr -p -d topdir
2008 -----------------P topdir
[root@es52 myfs]# mkdir topdir/d1
[root@es52 myfs]# lsattr -p -d topdir/d1
2008 -----------------P topdir/d1
[root@es52 myfs]# mkdir topdir/d1/d2
[root@es52 myfs]# lsattr -p -d topdir/d1/d2
0 -------------------- topdir/d1/d2



 Comments   
Comment by Gerrit Updater [ 05/Nov/20 ]

Wang Shilong (wshilong@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/40543
Subject: LU-14115 lod: fix to set inherit flag for stripe directroy
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 693bbd54fba410bf3f1804db27bef1ced9af7879

Comment by Gerrit Updater [ 19/Nov/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/40543/
Subject: LU-14115 lod: fix to set inherit flag for stripe directroy
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: dd8a4db4979464538184edf993daf7df0c89b4e7

Comment by Peter Jones [ 19/Nov/20 ]

Landed for 2.14

Generated at Sat Feb 10 03:06:58 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.