Re: Newbie question: stretch ceph cluster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

You need to set the min_size to 2 in crush rule. 

The exact location and replication flow when a client writes data depends on the object name and num of pgs. the crush rule determines which osds will serve a pg, the first is the primary osd for that pg. The client computes the pg from the object name and writes the object to the primary osd for that pg, then primary osd is then responsible to replicate with the other osds serving this pg. So for the same client, some objects will be sent to datacenter 1 and some to 2 and the osds will do the rest.

The other point is regarding how to setup monitors across 2 datacenters and be able to function if one goes down, this is tricky since monitors do require an odd number and form a quorum. This link my is quite interesting, i am not sure if there are better ways to do it:

https://www.sebastien-han.fr/blog/2013/01/28/ceph-geo-replication-sort-of/


Maged

On 2018-02-14 04:12, ST Wong (ITSC) wrote:

Hi,

Thanks for your advice,

-----Original Message-----
From: ceph-users [mailto:ceph-users-bounces@xxxxxxxxxxxxxx] On Behalf Of Luis Periquito
Sent: Friday, February 09, 2018 11:34 PM
To: Kai Wagner
Cc: Ceph Users
Subject: Re: Newbie question: stretch ceph cluster

On Fri, Feb 9, 2018 at 2:59 PM, Kai Wagner <kwagner@xxxxxxxx> wrote:
Hi and welcome,


On 09.02.2018 15:46, ST Wong (ITSC) wrote:

Hi, I'm new to CEPH and got a task to setup CEPH with kind of DR feature.
We've 2 10Gb connected data centers in the same campus.    I wonder if it's
possible to setup a CEPH cluster with following components in each
data
center:


3 x mon + mds + mgr
In this scenario you wouldn't be any better, as loosing a room means loosing half of your cluster. Can you run the MON somewhere else that would be able to continue if you loose one of the rooms?

Will it be okay to have 3 x MON per DC so that we still have 3 x MON in case of losing 1 DC ?  Or need more in case of double fault - losing 1 DC and failure of any MON in remaining DC will make the cluster stop working?


As for MGR and MDS they're (recommended) active/passive; so one per room would be enough.

3 x OSD (replicated factor=2, between data center)

replicated with size=2 is a bad idea. You can have size=4 and
min_size=2 and have a crush map with rules something like:


rule crosssite {
        id 0
        type replicated
        min_size 4
        max_size 4
        step take default
        step choose firstn 2 type room
        step chooseleaf firstn 2 type host
        step emit
}

this will store 4 copies, 2 in different hosts and 2 different rooms.

Does it mean for new data write to hostA:roomA, replication will take place as following?
1. from hostA:roomA to hostB:roomA
2. from hostA:roomA to hostA, roomB
3. from hostB:roomA to hostB, roomB

If it works in this way, can copy in 3 be skipped so that for each piece of data, there are 3 replicas - original one, replica in same room, and replica in other room, in order to save some space?

Besides, would also like to ask if it's correct that the cluster will continue to work (degraded) if one room is lost?

Will there be any better way to setup such 'stretched' cluster between 2 DCs?  They're extension instead of real DR site...

Sorry for the newbie questions and we'll proceed to have more study and experiment on this.

Thanks a lot.






So that any one of following failure won't affect the cluster's
operation and data availability:

any one component in either data center failure of either one of the
data center


Is it possible?

In general this is possible, but I would consider that replica=2 is
not a good idea. In case of a failure scenario or just maintenance and
one DC is powered off and just one single disk fails on the other DC,
this can already lead to data loss. My advice here would be, if anyhow
possible, please don't do replica=2.

In case one data center failure case, seems replication can't occur any
more.   Any CRUSH rule can achieve this purpose?


Sorry for the newbie question.


Thanks a lot.

Regards

/st wong





_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com


--
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton,
HRB
21284 (AG Nürnberg)


_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com


_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux