All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Roy <imjustmatthew@gmail.com>
To: ceph-devel@vger.kernel.org
Cc: Matthew Roy <matthew@royhousehold.net>
Subject: mkcephfs "max osd in /etc/ceph/ceph.conf is 2, num osd is 3"
Date: Tue, 4 Jan 2011 05:04:43 -0500	[thread overview]
Message-ID: <AANLkTike0z5eyVd-wY+hxtNv3wqEE_DmLxfA98CT5q=5@mail.gmail.com> (raw)

When building a new cluster with 3 osd using mkcephfs I'm getting the
message "max osd in /etc/ceph/ceph.conf is 2, num osd is 3". The
ceph.conf initially didn't define a max osd line at all and adding
"max osd = 4" or "osd max = 4" didn't seem to have any effect on the
message, regardless of the section of the conf file. Looking in
config.cc there doesn't seem to be any option field related to max osd
at all.

After building the cluster anyway, the ceph command reports that
maxosd is now 3 - a workable value, but not what I wanted.

Looking at mkcephfs.in, line 120, where the message originates, it
looks to me like the message is referring to the maximum id listed in
the conf file without any relation to the maxosd parameter of the
cluster. mkcephfs.in seems to be looking for the highest osd id and
incrementing by one to figure out the number of configured osds.

If my understanding is correct this patch will clarify the message and
add a comment explaining what the block of script is doing - nothing
having to do with the cluster maxosd parameter.



From 4b0239b9e4d907ce0c3d1ab75b49fef8c1a708ac Mon Sep 17 00:00:00 2001
From: Matthew Roy <matthew@royhousehold.net>
Date: Fri, 31 Dec 2010 02:42:14 -0500
Subject: [PATCH] mkcephfs: Clarified numosd message

Signed-off-by: Matthew Roy <matthew@royhousehold.net>
---
 src/mkcephfs.in |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/mkcephfs.in b/src/mkcephfs.in
index cac7c39..ee9764e 100644
--- a/src/mkcephfs.in
+++ b/src/mkcephfs.in
@@ -115,9 +115,10 @@ if true; then
     # build osdmap
     osdmap="/tmp/osdmap.$$"
     if [ -z "$numosd" ]; then
+	# find highest osd id - assumes the conf file complies with osd
numbering requirements
 	maxosd=`$CCONF -c $conf -l osd | egrep -v '^osd$' | cut -c 4- | sort
-n | tail -1`
 	numosd=$(($maxosd + 1))
-	echo max osd in $conf is $maxosd, num osd is $numosd
+	echo Highest osd in $conf is osd$maxosd, number of osd is $numosd.
     fi
     $BINDIR/osdmaptool --clobber --createsimple $numosd $osdmap || exit 1

-- 
1.7.1

             reply	other threads:[~2011-01-04 10:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-04 10:04 Matthew Roy [this message]
2011-01-04 17:17 ` mkcephfs "max osd in /etc/ceph/ceph.conf is 2, num osd is 3" Sage Weil

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='AANLkTike0z5eyVd-wY+hxtNv3wqEE_DmLxfA98CT5q=5@mail.gmail.com' \
    --to=imjustmatthew@gmail.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=matthew@royhousehold.net \
    /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.