Project

General

Profile

Feature #19109

Use data pool's 'df' for statfs instead of global stats, if there is only one data pool

Added by John Spray over 4 years ago. Updated almost 4 years ago.

Status:
Resolved
Priority:
Immediate
Category:
Administration/Usability
Target version:
% Done:

0%

Source:
other
Tags:
Backport:
luminous
Reviewed:
Affected Versions:
Component(FS):
Client
Labels (FS):
Pull request ID:

Description

The client sends a MStatfs to the mon to get the info for a statfs system call. Currently the mon gives it the global usage information of the cluster.

If a filesystem has exactly one data pool, it should be straightforward to modify this to pass a pool ID and respond to statfs with pool-specific stats instead.

In the case of filesystems with multiple data pools, we need to fall back to the global stats. Doing a sum of the per-pool stats would probably not make sense because the pools could use overlapping sets of OSDs and we wouldn't want to double-report space.

This would require updates to the mon, fuse client, and kernel client.

Opened from: https://bugzilla.redhat.com/show_bug.cgi?id=1427512


Related issues

Related to Linux kernel client - Subtask #20669: add support for filtered statfs in kernel client Resolved 07/18/2017
Duplicated by CephFS - Bug #21734: mount client shows total capacity of cluster but not of a pool Duplicate 10/09/2017
Duplicated by CephFS - Bug #22091: statfs get wrong fs size Duplicate 11/09/2017

History

#1 Updated by Ramana Raja over 4 years ago

  • Description updated (diff)

#2 Updated by Patrick Donnelly about 4 years ago

  • Assignee set to Douglas Fuller
  • Priority changed from Normal to Immediate
  • Target version set to v12.1.0
  • Source set to other

Doug, please take this one.

#3 Updated by Douglas Fuller about 4 years ago

What value for free space should we give in this case? If it's the global free space, it might be misleading to specify only the space used by a single data pool.

#4 Updated by John Spray about 4 years ago

You'd give the available space for that pool (i.e. how many bytes can they write before it becomes full). Same as in the "ceph df" output.

#5 Updated by Douglas Fuller about 4 years ago

  • Status changed from New to Fix Under Review

#6 Updated by Douglas Fuller about 4 years ago

  • Related to Subtask #20669: add support for filtered statfs in kernel client added

#8 Updated by Patrick Donnelly almost 4 years ago

  • Status changed from Fix Under Review to Pending Backport
  • Backport set to luminous

Waiting for

https://github.com/ceph/ceph-client/commit/b7f94d6a95dfe2399476de1e0d0a7c15c01611d0

to be merged upstream.

In the meantime, we need a backport of https://github.com/ceph/ceph/pull/16378 to luminous.

#9 Updated by Douglas Fuller almost 4 years ago

There's no need to wait for the kernel client since the message encoding is versioned. This has already been merged into luminous. (4aef4eab99c63d6ed84968e7ac6861ca081e737c, 76fc99a0a5112847ecc0eb7de8730c1a56c5930c, aeeeb43da90b61f8dad83251991088d667b7be47)

#10 Updated by Patrick Donnelly almost 4 years ago

  • Status changed from Pending Backport to Resolved

Oh, oops. I forgot I merged this into luminous. Thanks Doug.

#11 Updated by Patrick Donnelly over 3 years ago

  • Duplicated by Bug #21734: mount client shows total capacity of cluster but not of a pool added

#12 Updated by Patrick Donnelly over 3 years ago

  • Duplicated by Bug #22091: statfs get wrong fs size added

Also available in: Atom PDF