ceph: allow to specify crush ruleset on pool creation

This commit is contained in:
Dietmar Maurer 2014-01-03 11:39:41 +01:00
parent 1e5253ca39
commit c8243f20d6
3 changed files with 26 additions and 1 deletions

View File

@ -980,7 +980,15 @@ __PACKAGE__->register_method ({
optional => 1,
minimum => 8,
maximum => 32768,
},
},
crush_ruleset => {
description => "The ruleset to use for mapping object placement in the cluster.",
type => 'integer',
minimum => 0,
maximum => 32768,
default => 0,
optional => 1,
},
},
},
returns => { type => 'null' },
@ -1002,6 +1010,10 @@ __PACKAGE__->register_method ({
&$run_ceph_cmd(['osd', 'pool', 'set', $param->{name}, 'size', $size]);
if (defined($param->{crush_ruleset})) {
&$run_ceph_cmd(['osd', 'pool', 'set', $param->{name}, 'crush_ruleset', $param->{crush_ruleset}]);
}
return undef;
}});

View File

@ -3,6 +3,10 @@ pve-manager (3.1-33) unstable; urgency=low
* ceph: return decompiled crush map in text format
* ceph: try to unmount OSD after removal
* ceph: only use 64 PGs by default
* ceph: allow to specify crush ruleset on pool creation
-- Proxmox Support Team <support@proxmox.com> Fri, 03 Jan 2014 10:58:49 +0100

View File

@ -41,6 +41,15 @@ Ext.define('PVE.CephCreatePool', {
maxValue: 3,
allowBlank: false
},
{
xtype: 'numberfield',
fieldLabel: gettext('Crush RuleSet'),
name: 'crush_ruleset',
value: 0,
minValue: 0,
maxValue: 32768,
allowBlank: false
},
{
xtype: 'numberfield',
fieldLabel: 'pg_num',