From: Chris MacNaughton Date: Mon, 11 Jan 2016 16:07:55 +0000 (-0500) Subject: use 4 decimal places for default weight X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=479525ca52d09ffdb58034c0e2a930bd755c9c53;p=ceph.git use 4 decimal places for default weight using 2 places means that when deploying a test cluster on tiny OSDs does not work Signed-off-by: Chris MacNaughton --- diff --git a/src/upstart/ceph-osd.conf b/src/upstart/ceph-osd.conf index 6fa97ed1d23..c75dbfd8463 100644 --- a/src/upstart/ceph-osd.conf +++ b/src/upstart/ceph-osd.conf @@ -24,7 +24,7 @@ pre-start script fi location="$($hook --cluster ${cluster:-ceph} --id $id --type osd)" weight="$(ceph-conf --cluster=${cluster:-ceph} --name=osd.$id --lookup osd_crush_initial_weight || :)" - defaultweight=`df -P -k /var/lib/ceph/osd/${cluster:-ceph}-$id/ | tail -1 | awk '{ d= $2/1073741824 ; r = sprintf("%.2f", d); print r }'` + defaultweight=`df -P -k /var/lib/ceph/osd/${cluster:-ceph}-$id/ | tail -1 | awk '{ d= $2/1073741824 ; r = sprintf("%.4f", d); print r }'` ceph \ --cluster="${cluster:-ceph}" \ --name="osd.$id" \