From: Kefu Chai Date: Tue, 18 Sep 2018 03:32:56 +0000 (+0800) Subject: tools: fix typos in user-visible message and comments X-Git-Tag: v14.0.1~213^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=fda8befc533331fd5fc580d4ea12c5d62923c66a;p=ceph.git tools: fix typos in user-visible message and comments Signed-off-by: Kefu Chai --- diff --git a/src/tools/ceph-lazy/ceph-lazy b/src/tools/ceph-lazy/ceph-lazy index b3caafbbda1b5..39a331921ac8b 100755 --- a/src/tools/ceph-lazy/ceph-lazy +++ b/src/tools/ceph-lazy/ceph-lazy @@ -35,7 +35,7 @@ function echoerr() { function help() { >&2 echo "Usage : ceph-lazy [-d | -h] [command] [parameters] -Ceph complex quering tool - Version $VERSION +Ceph complex querying tool - Version $VERSION OPTIONS ======== @@ -174,13 +174,13 @@ function find_prim_pg_from_osd() { exit 1 fi - [ $DEBUG -eq 1 ] && echoinfo "Looking for primary PGs beloging to OSD $posd" + [ $DEBUG -eq 1 ] && echoinfo "Looking for primary PGs belonging to OSD $posd" $CEPH pg dump pgs --format json 2>/dev/null | $JQ --argjson posd $posd '.[] | select(.acting_primary==$posd).pgid' } # -# Print all pgs (primay & secondary) hosted by an OSD +# Print all pgs (primary & secondary) hosted by an OSD # function find_all_pg_from_osd() { diff --git a/src/tools/cephfs/cephfs-shell b/src/tools/cephfs/cephfs-shell index 08f555a3f720e..def2dc3517c85 100644 --- a/src/tools/cephfs/cephfs-shell +++ b/src/tools/cephfs/cephfs-shell @@ -182,7 +182,7 @@ def print_long(shell, file_name, is_dir, human_readable): def word_len(word): """ - Returns the word lenght, minus any color codes. + Returns the word length, minus any color codes. """ if word[0] == '\x1b': return len(word) - 9 diff --git a/src/tools/rbd_recover_tool/README b/src/tools/rbd_recover_tool/README index ccf55498be808..d289c11caac2a 100644 --- a/src/tools/rbd_recover_tool/README +++ b/src/tools/rbd_recover_tool/README @@ -4,9 +4,9 @@ ceph rbd recover tool is used for recovering ceph rbd image, when all ceph services are killed. it is based on ceph-0.80.x (Firefly and newer) - currently, ceph service(ceph-mon, ceph-osd) evently are not avaiable caused by bugs or sth else + currently, ceph service(ceph-mon, ceph-osd) evently are not available caused by bugs or sth else , especially on large scale ceph cluster, so that the ceph cluster can not supply service -and rbd images can not be accessed. In this case, a tool to recover rbd image is nessecary. +and rbd images can not be accessed. In this case, a tool to recover rbd image is necessary. ceph rbd recover tool is just used for this, it can collect all objects of an image from distributed osd nodes with the latest pg epoch, and splice objects by offset to a complete image. To make sure object data is complete, this tool does flush osd journal on each osd node before recovering. @@ -36,9 +36,9 @@ admin_node -----------+---- osd.1 admin_node: {rbd-recover-tool common_h epoch_h metadata_h database_h} osd: {osd_job common_h epoch_h metadata_h} #/var/rbd_tool/osd_job in this architecture, admin_node acts as client, osds act as server. -so, they run diffrent files: +so, they run different files: on admin_node run: rbd-recover-tool [] -on osd node run: ./osd_job +on osd node run: ./osd_job admin_node will copy files: osd_job, common_h, epoch_h, metadata_h to remote osd node @@ -83,7 +83,7 @@ recover [@[]] [/path/to/store/image] #recover im if admin_node operation is failed, you can check it on osd node cd /var/rbd_tool/osd_job ./osd_job - : + : do_image_id #get image id of image format v2 do_image_id #get image id of image format v1 do_image_metadata_v1 #get image metadata of image format v1, maybe pg epoch is not latest diff --git a/src/tools/rbd_recover_tool/common_h b/src/tools/rbd_recover_tool/common_h index 187bcd0805839..f2df662ad692b 100644 --- a/src/tools/rbd_recover_tool/common_h +++ b/src/tools/rbd_recover_tool/common_h @@ -65,7 +65,7 @@ function gen_md5() } # on each osd node -# check ceph enviroment: ssh, ceph-kvstore-tool, osd_data_path +# check ceph environment: ssh, ceph-kvstore-tool, osd_data_path function check_ceph_env() { local func="check_ceph_env" @@ -309,7 +309,7 @@ function get_map_header_key() local keyword=$1 local res=`cat $omap_list| grep $keyword` if [ "$res"x = ""x ];then - #echo "$func: map_header_key = $keyword not exisits" + #echo "$func: map_header_key = $keyword not exists" exit fi echo $res|awk -F ":" '{print $2}' diff --git a/src/tools/rbd_recover_tool/database_h b/src/tools/rbd_recover_tool/database_h index d72c6be707e5c..4ff20425ace52 100644 --- a/src/tools/rbd_recover_tool/database_h +++ b/src/tools/rbd_recover_tool/database_h @@ -507,7 +507,7 @@ function discover_image_snap() local func="discover_image_snap" echo "$func ..." if [ $# -lt 3 ];then - echo "$func: paramters: []" + echo "$func: parameters: []" exit fi local pool_id=$1 @@ -726,7 +726,7 @@ function collect_image_snap_objects() fi # speed up copy snapshot - # lookup the coresponding head hobject of snap hobject + # lookup the corresponding head hobject of snap hobject # use command: grep # # eg. @@ -1073,7 +1073,7 @@ function recover_image() echo "$func ..." if [ $# -lt 3 ];then - echo "$func: paramters: []" + echo "$func: parameters: []" exit fi diff --git a/src/tools/rbd_recover_tool/metadata_h b/src/tools/rbd_recover_tool/metadata_h index 55c21d2573a91..4aa491b5bd7b8 100644 --- a/src/tools/rbd_recover_tool/metadata_h +++ b/src/tools/rbd_recover_tool/metadata_h @@ -66,7 +66,7 @@ function get_image_format_by_hobject() } #======================================== image format v1 ======================================== -# .rbd inlude 3 parts: +# .rbd include 3 parts: # header + snap_count*snapshot + snap_count*snap_name # # struct rbd_obj_header_ondisk { diff --git a/src/tools/rbd_recover_tool/rbd-recover-tool b/src/tools/rbd_recover_tool/rbd-recover-tool index 70f4e7c1dc6f1..b7a258650e5f2 100755 --- a/src/tools/rbd_recover_tool/rbd-recover-tool +++ b/src/tools/rbd_recover_tool/rbd-recover-tool @@ -192,7 +192,7 @@ function usage() before to lookup & recover" echo "$cmd_name lookup /[@[]] show image metadata: image format, rbd id, size, order, snapseq - In addtion, for image with snapshots, + In addition, for image with snapshots, this will list all snapshot infomations" echo "$cmd_name recover /[@[]] [] all snapshots share one image head, to economize disk space