The reason for the rebalance is you are using straw algorithms.  If you swift 
to straw2, no data will be moved.

________________________________________
From: ceph-users <ceph-users-boun...@lists.ceph.com> on behalf of Jarek 
<j.moc...@nettelekom.pl>
Sent: Thursday, November 22, 2018 19:22
To: Marco Gaiarin
Cc: ceph-users@lists.ceph.com
Subject: Re: [ceph-users] New OSD with weight 0, rebalance still happen...

On Thu, 22 Nov 2018 12:05:12 +0100
Marco Gaiarin <g...@sv.lnf.it> wrote:

> Mandi! Paweł Sadowsk
>   In chel di` si favelave...
>
> > We did similar changes a many times and it always behave as
> > expected.
>
> Ok. Good.
>
> > Can you show you crushmap/ceph osd tree?
>
> Sure!
>
>  root@blackpanther:~# ceph osd tree
>  ID WEIGHT   TYPE NAME               UP/DOWN REWEIGHT
> PRIMARY-AFFINITY -1 21.83984 root
> default -2  5.45996     host
> capitanamerica 0  1.81999         osd.0                up
> 1.00000          1.00000 1  1.81999         osd.1                up
> 1.00000          1.00000 10  0.90999         osd.10               up
> 1.00000          1.00000 11  0.90999         osd.11               up
> 1.00000          1.00000 -3  5.45996     host
> vedovanera 2  1.81999         osd.2                up
> 1.00000          1.00000 3  1.81999         osd.3                up
> 1.00000          1.00000 4  0.90999         osd.4                up
> 1.00000          1.00000 5  0.90999         osd.5                up
> 1.00000          1.00000 -4  5.45996     host
> deadpool 6  1.81999         osd.6                up  1.00000
> 1.00000 7  1.81999         osd.7                up  1.00000
> 1.00000 8  0.90999         osd.8                up  1.00000
> 1.00000 9  0.90999         osd.9                up  1.00000
> 1.00000 -5  5.45996     host
> blackpanther 12  1.81999         osd.12               up
> 0.04999          1.00000 13  1.81999         osd.13               up
> 0.04999          1.00000 14  0.90999         osd.14               up
> 0.04999          1.00000 15  0.90999         osd.15               up
> 0.04999          1.00000
>
> OSD 12-15 are the new OSD; after creating it with 'noin' i've
> reweighted them to '0.05' (to make a test).
>
>
> Crush map attached. Thanks.

When an osd is added, even with the noin flag, weight of the host is
changed, which trigers rebalance.
Instead of the noin flag, set 'osd crush initial weight = 0' in
ceph.conf.

--
Pozdrawiam
Jarosław Mociak - Nettelekom GK Sp. z o.o.
_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to