Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-18991

inode quota is not enforced when doing a chgrp

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • Lustre 2.15.6
    • None
    • rhel8
    • 3
    • 9223372036854775807

    Description

      Hiya,

      it seems I can chgrp any number of inodes to a group and exceed its quota.
      ie. the inode quota is not enforced when doing a chgrp.

      eg.
      $ lfs quota -g grp1 .
      Disk quotas for grp grp1 (gid 2001):
      Filesystem kbytes quota limit grace files quota limit grace
      . 2500 0 2097152 - 5000* 0 5000 -

      1. chgrp some files that were owned by another group to be grp1
        $ chgrp grp1 b_*

      $ lfs quota -g grp1 .
      Disk quotas for grp grp1 (gid 2001):
      Filesystem kbytes quota limit grace files quota limit grace
      . 4288 0 2097152 - 8212* 0 5000 -

      obviously, this should not be allowed...
      I believe this is newish behaviour. I don't recall this bug being present in 2.12.x

      steps to reproduce ->

      make a user that is a member of grp1, grp2

      turn on quota enforcing
      lctl conf_param testfs.quota.mdt=u
      lctl conf_param testfs.quota.ost=u
      lctl conf_param testfs.quota.ost=g
      lctl conf_param testfs.quota.mdt=g

      give both groups an inode quota
      lfs setquota -g grp1 -B2g -I5000 .
      lfs setquota -g grp2 -B2g -I5000 .

      make files
      newgrp grp1
      for f in

      {1..5001}; do touch a_$f || break ; done
      newgrp grp2
      for f in {1..5001}

      ; do touch b_$f || break ; done

      do a chgrp
      chgrp grp1 b_*

      and then you see the quota being exceeded as per above.

      cheers,
      robin

      Attachments

        Activity

          People

            pjones Peter Jones
            scadmin SC Admin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: