[SOLVED] change num-replicas on ceph rool online?

blowfish

New Member
Jul 12, 2013
15
0
1
hi to all
can I change num-replicas on pool online? I need to change it from 2 to 3 and
min_size from 1 to 2
can i do it on the fly? and if yes, than how? from gui (how?), or from console by command
Code:
ceph osd pool set data size 3
ceph osd pool set data min_size 2
thanks!
 
Hi,
on any ceph node you run command:
Code:
ceph osd pool set POOL_NAME size3
get message:
Code:
set pool 90 size to 3

and then:
Code:
ceph osd pool set POOL_NAME min_size 2
get message:
Code:
set pool 90 min_size to 2

Now ceph do recover objects - create new copies.
Code:
2016-02-04 12:30:14.321049 mon.0 172.16.172.1:6789/0 16026809 : cluster [INF] pgmap v51235464: 1024 pgs: 750 active+clean, 269 active+degraded, 5 active+recovering+degraded; 3218 GB data, 9663 GB used, 18192 GB / 27856 GB avail; 26543 kB/s rd, 1295 kB/s wr, 170 op/s; 1686/2474064 objects degraded (0.068%); 196 MB/s, 49 objects/s recovering
2016-02-04 12:30:18.315133 mon.0 172.16.172.1:6789/0 16026811 : cluster [INF] pgmap v51235466: 1024 pgs: 776 active+clean, 245 active+degraded, 3 active+recovering+degraded; 3218 GB data, 9664 GB used, 18191 GB / 27856 GB avail; 14416 kB/s rd, 171 kB/s wr, 54 op/s; 1540/2474064 objects degraded (0.062%); 146 MB/s, 36 objects/s recovering
2016-02-04 12:30:19.319843 mon.0 172.16.172.1:6789/0 16026812 : cluster [INF] pgmap v51235467: 1024 pgs: 776 active+clean, 244 active+degraded, 4 active+recovering+degraded; 3218 GB data, 9664 GB used, 18191 GB / 27856 GB avail; 18355 kB/s rd, 302 kB/s wr, 93 op/s; 1534/2474064 objects degraded (0.062%); 206 MB/s, 51 objects/s recovering

Anything is online and safe.
 
Should I edit ceph.conf after changing replica size via cli? Because it still says replica 3 after doing
ceph osd pool set POOL_NAME size 4.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!