Project

General

Profile

Actions

Bug #18151

closed

Incorrect report of size when quotas are enabled.

Added by Goncalo Borges over 7 years ago. Updated about 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Client
Labels (FS):
quotas
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Actions #1

Updated by Goncalo Borges over 7 years ago

1) My environment:

- ceph/cephfs in 10.2.2.
- All infrastructure is in the same version (rados cluster, mons, mds and cephfs clients).
- We mount cephfs using ceph-fuse.

2) In clients where the full filesystem hierarchy is available:

- I have the following quota:
  1. getfattr -n ceph.quota.max_bytes /coepp/cephfs
    getfattr: Removing leading '/' from absolute path names
  2. file: coepp/cephfs
    ceph.quota.max_bytes="88000000000000"
- I am mounting the client as
  1. ceph-fuse --id mount_user -k /etc/ceph/ceph.client.mount_user.keyring -m <MON IP>:6789 --client-quota --fuse_default_permissions=0 --client_acl_type=posix_acl -r /cephfs /coepp/cephfs/

- The results of two consecutive 'df' commands, executed after the mount operation, is the following.

  1. puppet agent -t; df -h ; df -h
    (...)
    ceph-fuse 81T 51T 30T 64% /coepp/cephfs
    (...)
    ceph-fuse 306T 153T 154T 50% /coepp/cephfs

3) On another type of clients where I only mount a subdirectory of the filesystem (/coepp/cephfs/borg instead of coepp/cephfs):
- I have the following quota:

  1. getfattr -n ceph.quota.max_bytes /coepp/cephfs/borg
    getfattr: Removing leading '/' from absolute path name
  2. file: coepp/cephfs/borg
    ceph.quota.max_bytes="10000000000000"

- I mount the filesystem as:

  1. ceph-fuse --id mount_user -k /etc/ceph/ceph.client.mount_user.keyring -m <MON IP>:6789 --client-quota --fuse_default_permissions=0 --client_acl_type=posix_acl -r /cephfs/borg /coepp/cephfs/borg

- The reported space is

  1. puppet agent -t; df -h ; df -h
    (...)
    ceph-fuse 9.1T 5.7T 3.5T 62% /coepp/cephfs/borg
    (...)
    ceph-fuse 81T 51T 30T 64% /coepp/cephfs/borg

4) Some discussion of the problem in ceph-users ML: http://www.spinics.net/lists/ceph-users/msg32841.html

Actions #2

Updated by Goncalo Borges over 7 years ago

Due to other bug / issue, I've run ceph-fuse in debug mode with 'debug client = 20'. Right after launching ceph-fuse, I made 2 consecutive dfs, and got the behaviour described above. Maybe, at the very beginning of the log file, you can find something useful which may help to understand this issue.

The log file in question is: https://dl.dropboxusercontent.com/u/2946024/ceph.log.noips.gz

Actions #3

Updated by John Spray over 7 years ago

  • Project changed from Ceph to CephFS
  • Category set to 97
  • Component(FS) Client added
Actions #4

Updated by John Spray over 7 years ago

  • Target version set to v12.0.0
Actions #5

Updated by Greg Farnum over 7 years ago

  • Status changed from New to In Progress
  • Assignee set to Greg Farnum
  • Target version changed from v12.0.0 to v10.2.6
  • Release set to jewel

Well, this code changed a fair bit between Jewel and master, as Zheng ripped out the quota trees. However, there appears to be a discrepancy in how Client::get_quota_root() is called. In Client::statfs(), we call get_quota_root(root), and want to get root->quota if it's present. In Client::check_quota_condition(), we call get_quota_root(in) and want to get the quota root above in, even if inode->quota->is_enable() is true.
Moreover, things are a bit interesting depending on exactly what inodes are in cache — the first InodeStat we get sets root_ancestor == root (both set to the new InodeStat), but subsequent ones fix that up if there are parents farther up the tree.

In the master branch, Client::statfs() includes an explicit check for root->quota->is_enable() before it goes into get_quota_root(). I suspect this bug is already fixed. I'll try and put together a backport or special fixup for testing tomorrow.

Actions #6

Updated by Greg Farnum over 7 years ago

  • Status changed from In Progress to 4

In fact the quota tree changes already got backported so I think this is resolved. http://tracker.ceph.com/issues/16313

Actions #7

Updated by Goncalo Borges over 7 years ago

As commented in the users ML, we will be updating to 10.2.5 in early January. Will provide feedback once that is done.

Actions #8

Updated by Loïc Dachary over 7 years ago

  • Target version deleted (v10.2.6)
Actions #9

Updated by John Spray about 7 years ago

Goncalo: did the issue go away for you? If so let's close this.

Actions #10

Updated by Goncalo Borges about 7 years ago

Hi John. Let us close it now since according to Greg it has been resolved. Still did not upgrade but will open a new bug if i do see problems with this functionality

Actions #11

Updated by John Spray about 7 years ago

  • Status changed from 4 to Resolved
Actions #12

Updated by Patrick Donnelly about 5 years ago

  • Category deleted (97)
  • Labels (FS) quotas added
Actions

Also available in: Atom PDF