Project

General

Profile

Actions

Documentation #24508

closed

How to configure user- or bucket-specific data placement

Added by Casey Bodley almost 6 years ago. Updated about 5 years ago.

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

0%

Tags:
Backport:
luminous mimic
Reviewed:
Affected Versions:
Pull request ID:

Description

There is some minimal documentation about the radosgw-admin 'zone/zonegroup placement' commands, and some documentation about the use of pools in radosgw. But there's nothing to describe how they fit together, how to add new placement targets, and how to configure specific users/buckets to use them.

This question was raised on the reddit.com/r/ceph, and I responded with these instructions:

The zonegroup contains a list of placement_targets, with default-placement as the initial/only target. The zone contains a list of placement_pools, which map placement targets from the zonegroup into specific pool names.

Assuming you leave the default-placement target as the safe/replicated pools, you'd want to add a new unsafe placement target to the zonegroup:

$ radosgw-admin zonegroup placement add --placement-id=unsafe

Then map that placement id to different pools in the zone config:

$ radosgw-admin zone placement add --placement-id=unsafe --index-pool=default.rgw.buckets.unsafe-index --data-pool=default.rgw.buckets.unsafe-data- --data-extra-pool=default.rgw.buckets.unsafe-non-ec

(note that the index-pool and data-extra-pool must not be erasure-coded, because they rely on omap)

You can then specify a default per-user placement target by setting the default_placement field of the user info. The radosgw-admin user modify command doesn't support setting this directly, so you'd have to resort to operating on the json format:

$ radosgw-admin metadata get user:<user-id> > user.json
$ vi user.json
$ radosgw-admin metadata put user:<user-id> < user.json

You can also specify a per-bucket placement target by adding a LocationConstraint to the PUT Bucket request. The format of this LocationConstraint would be api:placement-id, where api comes from the zonegroup's api_name field (and must be non-empty). This placement target would override any default_placement configured on the user.


Related issues 3 (0 open3 closed)

Related to rgw - Documentation #38008: How to configure storage classes for lifecycle transitionsResolved01/22/2019

Actions
Copied to rgw - Backport #38796: luminous: How to configure user- or bucket-specific data placementResolvedCasey BodleyActions
Copied to rgw - Backport #38797: mimic: How to configure user- or bucket-specific data placementResolvedCasey BodleyActions
Actions #1

Updated by Konstantin Shalygin over 5 years ago

As we can see comments on reddit this also need configured realm.

Actions #2

Updated by Casey Bodley about 5 years ago

Actions #3

Updated by Casey Bodley about 5 years ago

  • Status changed from New to Pending Backport
  • Backport set to luminous mimic
Actions #4

Updated by Casey Bodley about 5 years ago

  • Copied to Backport #38796: luminous: How to configure user- or bucket-specific data placement added
Actions #5

Updated by Casey Bodley about 5 years ago

  • Copied to Backport #38797: mimic: How to configure user- or bucket-specific data placement added
Actions #6

Updated by Nathan Cutler about 5 years ago

  • Pull request ID set to 26997
Actions #7

Updated by Nathan Cutler about 5 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF