[ceph-users] New OSD with weight 0, rebalance still happen...

Paweł Sadowsk ceph at sadziu.pl
Thu Nov 22 06:23:17 PST 2018


On 11/22/18 12:22 PM, Jarek wrote:
> On Thu, 22 Nov 2018 12:05:12 +0100
> Marco Gaiarin <gaio at 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 at 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.

Exactly, your 'new' OSD have weight 1.81999 (osd.12, osd.13) and 0.90999
(osd.14, osd.15). As Jarek pointed out you should add them using

  'osd crush initial weight = 0'

and the use

  'ceph osd crush reweight osd.x 0.05'

to slowly increase weight on them.

>From your osd tree it looks like you used 'ceph osd reweight'.

-- 
PS


More information about the ceph-users mailing list