Project

General

Profile

Actions

Bug #53509

closed

quota support for subvolumegroup

Added by Sébastien Han over 2 years ago. Updated over 1 year ago.

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

0%

Source:
Tags:
backport_processed
Backport:
quincy, pacific
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
mgr/volumes
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Today, we can apply quota to individual subvolume. However when working on a multi-tenant environment, the storage admin wants to provision quota for a given subvolumegroup, so one level above the subvolume.
It will be nice if we could set a desired quota per subvolumegroup.


Related issues 3 (0 open3 closed)

Related to CephFS - Support #16884: rename() doesn't work between directoriesClosedZheng Yan08/01/2016

Actions
Copied to CephFS - Backport #56013: quincy: quota support for subvolumegroupResolvedNikhilkumar ShelkeActions
Copied to CephFS - Backport #56014: pacific: quota support for subvolumegroupResolvedNikhilkumar ShelkeActions
Actions #1

Updated by Ramana Raja over 2 years ago

As per Venky, we need to keep in mind the following limitation with CephFS quotas:
"Quotas must be configured carefully when used with path-based mount restrictions. The client needs to have access to the directory inode on which quotas are configured in order to enforce them. If the client has restricted access to a specific path (e.g., /home/user) based on the MDS capability, and a quota is configured on an ancestor directory they do not have access to (e.g., /home), the client will not enforce it. When using path-based access restrictions be sure to configure the quota on the directory the client is restricted too (e.g., /home/user) or something nested beneath it."

In the case of manila, the OpenStack clients are expected to mount FS subvolumes using auth IDs with subvolume path based restrictions. This would mean that the clients wouldn't obey the subvolume group quota restrictions.

In the case of CSI, the subvolumes are mounted using auth IDs that don't have subvolume path based restrictions. See, https://github.com/ceph/ceph-csi/blob/devel/docs/capabilities.md#cephfs . So I think for the CSI use case the subvolume group quota restrictions would be honored.

Actions #2

Updated by Sébastien Han over 2 years ago

Thanks, Ramana for the follow-up and validation of the use case.

Actions #3

Updated by Kotresh Hiremath Ravishankar over 2 years ago

Elaborating a bit more on the restriction mentioned by Ramana in the first comment.

If the quota is set on the subvolumegroup, in order for it get enforced for the data written to subvolumes with in that subvolume group, the mds caps plays the important role.
The 'user' which is accessing the subvolume (in csi use case, this could be 'node' which mounts the subvolume for read/write) should have atleast read mds caps for subvolumegroup
along with rw access to subvolume path.

There are two cases based on your use case.
1. If the user is restricted at subvolume level, it should have atleast read mds caps to others. Something like below

      mds allow r allow rw path=<path-to-subvolume>

2. If the user is restricted at subvolumegroup level, it should work by default as the caps would be something like below.

      mds allow rw path=<path-to-subvolumegroup>
Actions #4

Updated by Venky Shankar over 2 years ago

  • Assignee set to Kotresh Hiremath Ravishankar
  • Target version set to v17.0.0
  • Backport set to pacific
  • Component(FS) mgr/volumes added
Actions #5

Updated by Kotresh Hiremath Ravishankar over 2 years ago

  • Status changed from New to In Progress
  • Pull request ID set to 44347
Actions #6

Updated by Kotresh Hiremath Ravishankar over 2 years ago

Introducing subvolumegroup quotas hits this known issue [1]. The issue is hit while removing subvolume
under the subvolume group (whose quota is set) as removing subvolumes renames them out of the
subvolume group directory (quota root directory). We need to think about solving the issue for
this use case.

[1] https://tracker.ceph.com/issues/16884

Actions #7

Updated by Kotresh Hiremath Ravishankar over 2 years ago

  • Related to Support #16884: rename() doesn't work between directories added
Actions #8

Updated by Kotresh Hiremath Ravishankar over 2 years ago

  • Status changed from In Progress to Fix Under Review
Actions #9

Updated by Venky Shankar almost 2 years ago

  • Status changed from Fix Under Review to Pending Backport
  • Backport changed from pacific to quincy, pacific
Actions #10

Updated by Backport Bot almost 2 years ago

  • Copied to Backport #56013: quincy: quota support for subvolumegroup added
Actions #11

Updated by Backport Bot almost 2 years ago

  • Copied to Backport #56014: pacific: quota support for subvolumegroup added
Actions #12

Updated by Backport Bot over 1 year ago

  • Tags set to backport_processed
Actions #13

Updated by Greg Farnum over 1 year ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF