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

e2fsck clears quota limits when error is found



    • Bug
    • Resolution: Fixed
    • Major
    • None
    • Lustre 2.4.0
    • 3
    • 6209


      On the ext4 call today I heard from Ted Ts'o that the e2fsck checking for the quota files is broken. Apparently, if there is an error in the quota accounting (e.g. blocks used for user_X in the quota file doesn't match actual blocks counted in inodes owned by user_x) then the whole quota file is rewritten from the in-memory quota table, but the quota limits are not saved. This can be checked by creating a filesystem with quotas, then use debugfs to delete some inodes with allocated data blocks (probably on the OST) and run e2fsck. This probably needs a test in sanity-quota.sh to verify the quota limits after debugfs + e2fsck have been run.

      A second problem is that the e2fsck quota code does not detect if there is a user that owns inodes/blocks but is not present in the on-disk quota file. If the quota file is somehow corrupted, the user will not have any assigned quota.

      This is discussed in the linux-ext4 thread with the subject how to quotacheck with the new quota implementation (hidden inode)? http://www.spinics.net/lists/linux-ext4/msg36077.html, so it would be good to check for any patches and/or reply to that thread if someone is going to start working on this.




            niu Niu Yawei (Inactive)
            adilger Andreas Dilger
            0 Vote for this issue
            4 Start watching this issue