Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pve-manager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
pve-manager
Commits
ce09e072
Commit
ce09e072
authored
Dec 31, 2013
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pveceph: allow to set min_size for pools
parent
5468b95b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
Ceph.pm
PVE/API2/Ceph.pm
+11
-0
Ceph.js
www/manager/node/Ceph.js
+9
-0
No files found.
PVE/API2/Ceph.pm
View file @
ce09e072
...
...
@@ -965,6 +965,14 @@ __PACKAGE__->register_method ({
minimum
=>
1
,
maximum
=>
3
,
},
min_size
=>
{
description
=>
'
Minimum number of replicas per object
',
type
=>
'
integer
',
default
=>
1
,
optional
=>
1
,
minimum
=>
1
,
maximum
=>
3
,
},
pg_num
=>
{
description
=>
"
Number of placement groups.
",
type
=>
'
integer
',
...
...
@@ -986,9 +994,12 @@ __PACKAGE__->register_method ({
my
$pg_num
=
$param
->
{
pg_num
}
||
512
;
my
$size
=
$param
->
{
size
}
||
2
;
my
$min_size
=
$param
->
{
min_size
}
||
1
;
&
$run_ceph_cmd
(['
osd
',
'
pool
',
'
create
',
$param
->
{
name
},
$pg_num
]);
&
$run_ceph_cmd
(['
osd
',
'
pool
',
'
set
',
$param
->
{
name
},
'
min_size
',
$min_size
]);
&
$run_ceph_cmd
(['
osd
',
'
pool
',
'
set
',
$param
->
{
name
},
'
size
',
$size
]);
return
undef
;
...
...
www/manager/node/Ceph.js
View file @
ce09e072
...
...
@@ -32,6 +32,15 @@ Ext.define('PVE.CephCreatePool', {
maxValue
:
3
,
allowBlank
:
false
},
{
xtype
:
'
numberfield
'
,
fieldLabel
:
gettext
(
'
Min. Size
'
),
name
:
'
min_size
'
,
value
:
1
,
minValue
:
1
,
maxValue
:
3
,
allowBlank
:
false
},
{
xtype
:
'
numberfield
'
,
fieldLabel
:
'
pg_num
'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment