Skip to content

Commit

Permalink
init-ceph: fix osd_data location when checking df utilization
Browse files Browse the repository at this point in the history
Do not assume default osd data location.

Fixes: ceph#4951
Backport: cuttlefish, bobtail
Signed-off-by: Sage Weil <[email protected]>
Reviewed-by: Gary Lowelll <[email protected]>
  • Loading branch information
Sage Weil committed May 8, 2013
1 parent 61354b2 commit f2a54cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/init-ceph.in
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down

0 comments on commit f2a54cc

Please sign in to comment.