All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wido den Hollander <wido@widodh.nl>
To: Gandalf Corvotempesta <gandalf.corvotempesta@gmail.com>
Cc: ceph-devel@vger.kernel.org
Subject: Re: Rack Awareness
Date: Tue, 15 Jan 2013 11:59:39 +0100	[thread overview]
Message-ID: <50F5369B.10601@widodh.nl> (raw)
In-Reply-To: <CAJH6TXj96-OSbR+8MrS7o4bjzcC-zj=2z88sE=6TWzvadHNTTg@mail.gmail.com>

On 01/15/2013 11:34 AM, Gandalf Corvotempesta wrote:
> 2013/1/15 Wido den Hollander <wido@widodh.nl>:
>> Yes, no problem at all! That's where the crushmap is for. This way you can
>> tell Ceph exactly how to distribute your data.
>
> Cool.
> If I understood properly, I have to configure ceph with OSD in a
> standard way and then
> map these osd into a custom crushmap like this:
>
> host node1 {
>          id -1
>          alg straw
>          hash 0
>          item osd.0 weight 1.00
>          item osd.1 weight 1.00
> }
>
> host node2 {
>          id -2
>          alg straw
>          hash 0
>          item osd.2 weight 1.00
>          item osd.3 weight 1.00
> }
>
> rack rack1 {
>          id -3
>          alg straw
>          hash 0
>          item node1 weight 2.00
> }
>
> rack rack2 {
>          id -4
>          alg straw
>          hash 0
>          item node2 weight 2.00
> }
>
> This one should allow me to have 4 OSDs, 2 servers and 2 racks. Each
> rack with one server with 2 OSDs
> Data will be automatically striped across both rack, right?
>

Almost! A couple of things:

You don't have to sum the weight of a node in the rack, crush will sum 
the nodes automatically. If all nodes are equal there is no need to do so.


You need to add this as well:

root default {
         id -1
         alg straw
         hash 0
         item rack1
         item rack2
}

rule data {
         ruleset 0
         type replicated
         min_size 1
         max_size 10
         step take default
         step chooseleaf firstn 0 type rack
         step emit
}

You should know that you can never set replication higher then 2 with 
this setting since it always tries to pick a rack and you only have two.

Wido


  reply	other threads:[~2013-01-15 10:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-15 10:17 Rack Awareness Gandalf Corvotempesta
2013-01-15 10:24 ` Wido den Hollander
2013-01-15 10:34   ` Gandalf Corvotempesta
2013-01-15 10:59     ` Wido den Hollander [this message]
2013-01-15 11:14       ` Gandalf Corvotempesta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50F5369B.10601@widodh.nl \
    --to=wido@widodh.nl \
    --cc=ceph-devel@vger.kernel.org \
    --cc=gandalf.corvotempesta@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.