From patchwork Wed Mar 9 14:25:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan van der Ster X-Patchwork-Id: 8546771 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 67E0AC0553 for ; Wed, 9 Mar 2016 14:26:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E8114201BC for ; Wed, 9 Mar 2016 14:26:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CB93B20138 for ; Wed, 9 Mar 2016 14:26:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932845AbcCIO0T (ORCPT ); Wed, 9 Mar 2016 09:26:19 -0500 Received: from mail-lb0-f177.google.com ([209.85.217.177]:33813 "EHLO mail-lb0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932719AbcCIO0Q (ORCPT ); Wed, 9 Mar 2016 09:26:16 -0500 Received: by mail-lb0-f177.google.com with SMTP id xr8so65505156lbb.1 for ; Wed, 09 Mar 2016 06:26:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vanderster.com; s=google; h=mime-version:from:date:message-id:subject:to; bh=kVXtc7R3D37y6syPnnX/lEOFayhHHInqXu1sTtHI8wU=; b=VS9ZGBmzcRZZeUhyX9v44Kt91TuAIHFhx2/rVqtvUcmr4MmFnw8r/sVIP9xYcfHOHp wOIficP93e2ngGkDcGfP5ygPOOuCGdIuvxkoTCeqKEKLcOW10wGl4l2dty9AXEsKfzNK Q6AY8VuIbfLf3xNAwPUj5Z7DLFqX1eoKHoh/w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=kVXtc7R3D37y6syPnnX/lEOFayhHHInqXu1sTtHI8wU=; b=dNtGssEiAsl1bwBNdWHr7cm7LBgfBDKt06iFzhh5ELNu7j94nmEpOqXQmk5E2W2Hc1 PWRBzh+j2aDD6g1jNhhlycwEmKqpQ45PgcTcGPu6NN6AQ0mAbYB8+qArc6S1smn+Da97 sm77XyW278ZHvgzloaEYxgT0sRa3gAWIsacF07o3RhDrawKHYEJLANPTccwPi6hQXYfb b8gCGvZuuc9CMkr0BwZa4Mnw3sObKlfxd94ysgZT0gYVzO0GkU2t3Hq6NU45OpkhYVsb RohVERJnMFJjboxx7X6a6gLaxbaIaQqQex0ac6vnDMWrhCPXbVod41lDYmITzgzTnDlX 86xg== X-Gm-Message-State: AD7BkJKZJ390l7d2OUQ47yfV5c/+G9X+ttbF5SOOrOXqpc9M3Ly7hosKbuX62Oe5z6CkEQ== X-Received: by 10.112.157.234 with SMTP id wp10mr5753076lbb.56.1457533574281; Wed, 09 Mar 2016 06:26:14 -0800 (PST) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com. [209.85.217.173]) by smtp.gmail.com with ESMTPSA id l5sm1332187lfd.22.2016.03.09.06.26.13 for (version=TLSv1/SSLv3 cipher=OTHER); Wed, 09 Mar 2016 06:26:13 -0800 (PST) Received: by mail-lb0-f173.google.com with SMTP id xr8so65503660lbb.1 for ; Wed, 09 Mar 2016 06:26:13 -0800 (PST) X-Received: by 10.112.50.144 with SMTP id c16mr7305068lbo.128.1457533572229; Wed, 09 Mar 2016 06:26:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.151.132 with HTTP; Wed, 9 Mar 2016 06:25:32 -0800 (PST) From: Dan van der Ster Date: Wed, 9 Mar 2016 15:25:32 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: default min_size for erasure pools To: "ceph-devel@vger.kernel.org" Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, For replicated pools we default to min_size=2 when size=3 (size-size/2) in order to avoid the split brain scenario, for example as described here: http://www.spinics.net/lists/ceph-devel/msg27008.html But for erasure pools we default to min_size=k which I think is a recipe for similar problems. Shouldn't we default to at least min_size=k+1?? break; Cheers, Dan --- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 77e26de..5d51686 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -4427,7 +4427,7 @@ int OSDMonitor::prepare_pool_size(const unsigned pool_type, err = get_erasure_code(erasure_code_profile, &erasure_code, ss); if (err == 0) { *size = erasure_code->get_chunk_count(); - *min_size = erasure_code->get_data_chunk_count(); + *min_size = erasure_code->get_data_chunk_count() + 1; } }