From: Sage Weil Date: Fri, 15 Apr 2011 22:11:25 +0000 (-0700) Subject: mkcephfs: fix check for highest osd X-Git-Tag: v0.27~9^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ff5bc8fd7b93aefa935d36820506806082d1a29c;p=ceph.git mkcephfs: fix check for highest osd This breaks on osd0. I was doing something stupid with sed but I can't figure out what right now, but osdN support is going away anyway. Signed-off-by: Sage Weil --- diff --git a/src/mkcephfs.in b/src/mkcephfs.in index 834d776fc4a5..40a1cf90596d 100644 --- a/src/mkcephfs.in +++ b/src/mkcephfs.in @@ -291,7 +291,7 @@ if [ $preparemon -eq 1 ]; then echo "Building osdmap" # find highest osd id - assumes the conf file complies with osd numbering requirements - maxosd=`$CCONF -c $conf -l osd | egrep -v '^osd$' | sed 's/^\.//' | cut -c 4- | sort -n | tail -1` + maxosd=`$CCONF -c $conf -l osd | grep -v ^osd\$ | cut -c 5- | sort -n | tail -1` echo " highest numbered osd in $conf is osd.$maxosd" lastosd=$(($maxosd + 1))