On 6/4/20 12:24 AM, Frank Schilder wrote:
> You can use the command-line without editing the crush map. Look at the
> documentation of commands like
>
> ceph osd crush add-bucket ...
> ceph osd crush move ...
>
> Before starting this, set "ceph osd set norebalance" and unset after you are
> happy with the crush tree. Let everything peer. You should see misplaced
> objects and remapped PGs, but no degraded objects or PGs.
>
> Do this only when cluster is helth_ok, otherwise things can get really
> complicated.
>
Yes and No. This will cause many CRUSHMap updates where a manual update
is only a single change.
I would do:
$ ceph osd getcrushmap -o crushmap
$ cp crushmap crushmap.backup
$ crushtool -d crushmap -o crushmap.txt
$ vi crushmap.txt (now make your changes)
$ crushtool -c crushmap.txt -o crushmap.new
$ crushtool -i crushmap.new --tree (check if all OK)
$ crushtool -i crushmap.new --test --rule 0 --num-rep 3 --show-mappings
If all is good:
$ ceph osd setcrushmap -i crushmap.new
If all goes bad, simply revert to your old crushmap.
Wido
> Best regards,
> =================
> Frank Schilder
> AIT Risø Campus
> Bygning 109, rum S14
>
> ________________________________________
> From: Kyriazis, George <george.kyria...@intel.com>
> Sent: 03 June 2020 22:45:11
> To: ceph-users
> Subject: [ceph-users] Best way to change bucket hierarchy
>
> Helo,
>
> I have a live ceph cluster, and I’m in the need of modifying the bucket
> hierarchy. I am currently using the default crush rule (ie. keep each
> replica on a different host). My need is to add a “chassis” level, and keep
> replicas on a per-chassis level.
>
> From what I read in the documentation, I would have to edit the crush file
> manually, however this sounds kinda scary for a live cluster.
>
> Are there any “best known methods” to achieve that goal without messing
> things up?
>
> In my current scenario, I have one host per chassis, and planning on later
> adding nodes where there would be >1 hosts per chassis. It looks like “in
> theory” there wouldn’t be a need for any data movement after the crush map
> changes. Will reality match theory? Anything else I need to watch out for?
>
> Thank you!
>
> George
>
> _______________________________________________
> ceph-users mailing list -- ceph-users@ceph.io
> To unsubscribe send an email to ceph-users-le...@ceph.io
> _______________________________________________
> ceph-users mailing list -- ceph-users@ceph.io
> To unsubscribe send an email to ceph-users-le...@ceph.io
>
_______________________________________________
ceph-users mailing list -- ceph-users@ceph.io
To unsubscribe send an email to ceph-users-le...@ceph.io