From f2a54cc9c98a9f31aef049c74ea932b2d9000d3c Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 8 May 2013 14:35:54 -0700 Subject: [PATCH] init-ceph: fix osd_data location when checking df utilization Do not assume default osd data location. Fixes: #4951 Backport: cuttlefish, bobtail Signed-off-by: Sage Weil Reviewed-by: Gary Lowelll --- src/init-ceph.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/init-ceph.in b/src/init-ceph.in index 57ae19b11e1bb..a9ee60b3280a8 100644 --- a/src/init-ceph.in +++ b/src/init-ceph.in @@ -310,8 +310,8 @@ for name in $what; do # command line, ceph.conf can override what it wants get_conf osd_location "" "osd crush location" get_conf osd_weight "" "osd crush initial weight" - defaultweight=`df /var/lib/ceph/osd/ceph-$id/ | tail -1 | awk '{ d= $2/1073741824 ; r = sprintf("%.2f", d); print r }'` - get_conf osd_keyring "/var/lib/ceph/osd/ceph-$id/keyring" "keyring" + defaultweight=`df $osd_data/. | tail -1 | awk '{ d= $2/1073741824 ; r = sprintf("%.2f", d); print r }'` + get_conf osd_keyring "$osd_data/keyring" "keyring" $BINDIR/ceph \ --name="osd.$id" \ --keyring="$osd_keyring" \ -- 2.39.5