CephM版本命令整理-創(chuàng)新互聯(lián)

bench --io-type < read | write | readwrite | rw> [--io-size size-in-B/K/M/G/T] [--io-threads num-ios-in-flight] [--io-total size-in-B/K/M/G/T] [--io-pattern seq | rand] [--rw-mix-read read proportion in readwrite] image-spec

   生成一系列IO和IO吞吐量以及延遲的圖表,如果沒有指定的單位(B/K/M),則假--io-size和--io-total為B,默認(rèn)的數(shù)值分別為:--io-size 4096, --io-threads 16, --io-total 1G, --io-pattern seq, --rw-mix-read 50

成都創(chuàng)新互聯(lián)長期為近1000家客戶提供的網(wǎng)站建設(shè)服務(wù),團(tuán)隊(duì)從業(yè)經(jīng)驗(yàn)10年,關(guān)注不同地域、不同群體,并針對不同對象提供差異化的產(chǎn)品和服務(wù);打造開放共贏平臺(tái),與合作伙伴共同營造健康的互聯(lián)網(wǎng)生態(tài)環(huán)境。為船山企業(yè)提供專業(yè)的網(wǎng)站建設(shè)、做網(wǎng)站,船山網(wǎng)站改版等技術(shù)服務(wù)。擁有10多年豐富建站經(jīng)驗(yàn)和眾多成功案例,為您定制開發(fā)。children snap-spec

    列出該快照的克隆卷,這個(gè)操作會(huì)檢查所有的pool,之后會(huì)輸出結(jié)果pool-name/image-name.

    但是需要這個(gè)image的format是2.

clone [–object-size size-in-B/K/M] [–stripe-unit size-in-B/K/M –stripe-count num] [–image-feature feature-name] [–image-shared] parent-snap-spec child-image-spec

    創(chuàng)建一個(gè)父快照的克隆卷,除非另外指定,否則object大小與父image和父快照的大小是相同的,--stripe-unit和    --stripe-count參數(shù)是可選的,但是必須同時(shí)使用。

    父快照的狀態(tài)需要是被保護(hù)的(protected)。

config global get config-entity key

    獲取覆蓋全局的配置。

config global list [--format plain|json|xml] [--pretty-format] config-entity

    列出覆蓋全局的配置。

config global set config-entity key value

    設(shè)置覆蓋全局的配置。

config global remove config-entity key

    刪除覆蓋全局的配置。

config image get image-spec key

    獲取覆蓋image級(jí)別的配置。

config image list [--format plain|json|xml] [--pretty-format] image-spec

    列出覆蓋image界別的配置。

config image set image-spec key value

    設(shè)置覆蓋image級(jí)別的設(shè)置。

config image remove image-spec key

    刪除覆蓋image級(jí)別的配置。

config pool get pool-name key

    獲取覆蓋pool級(jí)別的配置。

config pool set pool-name key value

    設(shè)置覆蓋pool級(jí)別的配置。

config pool remove pool-name key

    刪除覆蓋pool級(jí)別的配置。

cp (src-image-spec|sec-snap-spec) dest-image-spec

    將原image的內(nèi)容復(fù)制到目標(biāo)image中,目標(biāo)imgae具有和源image相同的大小、對象大小和image format。

create  (-s | --size size-in-M/G/T) [–image-format format-id] [–object-size size-in-B/K/M] [--stripe-unit size-in-B/K/M –stripe-count num] [--thick-provision] [--no-progress] [--image-feature feature-name]… [--image-shared] image-spec

    將會(huì)創(chuàng)建一個(gè)新的rbd image,需要在創(chuàng)建的同時(shí)指定image的大小。--stripe-unit and --stripe-count 是可選的,但是必須同時(shí)使用

deep cp (src-image-spec | src-snap-spec) dest-image-spec

    將源image的內(nèi)容深度復(fù)制到新創(chuàng)建的目標(biāo)image中,目標(biāo)image將會(huì)和源image有相同的大小、對象大小、format和快照

device list [-t | --device-type device-type] [--format plain | json | xml] --pretty-format

    顯示通過rbd內(nèi)核模塊(默認(rèn))映射的rbd image或其他支持的設(shè)備。

device map  [-t | --device-type device-type] [--read-only] [–exclusive] [-o | --options device-options] image-spec| snap-spec

指定的rbd image通過內(nèi)核模式映射到一個(gè)塊設(shè)備上或其他支持的設(shè)備上(linux上的nbd或FreeBSD傷的ggate)。

    選項(xiàng)參數(shù)是一個(gè)逗號(hào)分隔的設(shè)備類型特定選項(xiàng)列表(opt1,opt2=val,…)。

device unmap  [-t | –device-type device-type] [-o | --options device-options] image-spec | snap-spec | device-path

    取消通過內(nèi)核模塊(默認(rèn))或支持的其他設(shè)備上映射的rbd image。

    選項(xiàng)參數(shù)是一個(gè)逗號(hào)分隔的設(shè)備類型特定 選項(xiàng)列表(opt1,opt2=val,…)。

diff [--from-snap snap-name] [–whole-object] image-spec | snap-spec

   列出這個(gè)image從指定的快照創(chuàng)建時(shí)或從創(chuàng)建后已經(jīng)更改的字節(jié)區(qū)段列表,輸出行包括起始偏移量(以字節(jié)為單位),區(qū)域長度(以字節(jié)為單位)和“0”或“data”,以顯示該區(qū)域是已知的0還是可能包含其他的數(shù)據(jù)。

du [-p | --pool pool-name] [image-spec | snap-spec]

      該命令將會(huì)計(jì)算指定的存儲(chǔ)池中所有image和相關(guān)快照的實(shí)際磁盤使用情況,還可以用于單個(gè)image和快照。

      如果RBD image的fast-diff特性沒有啟用,這個(gè)操作將會(huì)查詢每個(gè)存在該image對象的OSD。

export [--export-format format (1 or 2)] (image-spec | snap-spec) [dest-path]

    導(dǎo)出image到指定的路徑中(用于標(biāo)準(zhǔn)輸出),--export-format目前接受“1”或者“2”,format 2不僅允許到處image的內(nèi)容,還允許導(dǎo)出快照的其他屬性,比如image_order,features。

export-diff [--from-snap snap-name] [–whole-object] (image-spec | snap-spec) dest-path

   導(dǎo)出image中的增量部分到指定的路徑下(用于標(biāo)準(zhǔn)輸出

),如果指定了初始快照,則只更改快照以后的增量,原本包含了image中任何包含數(shù)據(jù)的區(qū)域。使用標(biāo)準(zhǔn)的--snap選項(xiàng)或@snap語法指定快照。Image diff format 包含了元數(shù)據(jù),image的大小改變以及開始和結(jié)束的快照,它有效的表示了image的廢棄或“0”區(qū)域。

feature disable image-spec feature-name…

    禁用指定image上的指定特性,可以指定多個(gè)特性。

feature enable image-spec feature-name

    啟用指定image上的指定特性,可以指定多個(gè)特性。

flatten image-spec

    如果image是克隆的,從父快照復(fù)制了所有的共享塊,使子image獨(dú)立于父快照,該命令可以截?cái)喔缚煺蘸妥觟mage之間的聯(lián)系,如果父快照沒有進(jìn)一步的依賴克隆,則可以是unprotected并刪除它。

    這個(gè)命令需要image的format 是2.

group create group-spec

    創(chuàng)建一個(gè)image組。

group image add group-spec image-spec

    添加一個(gè)image到一個(gè)組中。

group image list group-spec

    列出這個(gè)組中的所有image。

group image remove group-spec image-spec

   將一個(gè)image從組中刪除。

group ls [-p|--pool pool-name]

    列出一個(gè)存儲(chǔ)池中的image組。

group rename src-group-spec dest-group-spec

    重命名一個(gè)image組。注意:不支持跨存儲(chǔ)池重命名。

group rm group-spec

    刪除一個(gè)image組。

group snap create group-snap-spec

    為一個(gè)組創(chuàng)建快照。

group snap list group-spec

    列出組的所有快照。

group snap rm goup-snap-spec

    刪除組的快照。

group snap rename group-snap-spec snap-name

   重命名一個(gè)組的快照。

group snap rollback group-snap-spec

    將image組回滾到快照位置。

image-meta get image-spec key

    獲取元數(shù)據(jù)鍵。

image-meta list image-spec

    顯示image中的元數(shù)據(jù),第一列是鍵,第二列是值。

image-meta remove image-spec key

    刪除原數(shù)據(jù)的鍵值。

image-meta set image-spec key value

    設(shè)置原數(shù)據(jù)的鍵值,設(shè)置的鍵值可以使用image-meta list列出。

import  [–export-format format (1 or 2)] [–image-format format-id] [–object-size size-in-B/K/M] [–stripe-unit size-in-B/K/M –stripe-count num] [–image-feature feature-name]… [–image-shared] src-path [image-spec]

    創(chuàng)建一個(gè)新的image并將指定位置的數(shù)據(jù)(用于標(biāo)準(zhǔn)輸入)導(dǎo)入到該image中,如果可能,導(dǎo)入操作將嘗試創(chuàng)建稀疏rbd image。對于從標(biāo)準(zhǔn)輸入的導(dǎo)入,稀疏單元是目標(biāo)image的數(shù)據(jù)塊大?。▽ο蟠笮。?。

    --stripe-unit和—stripe-count 是可選項(xiàng),但是必須同時(shí)使用。

    --export-format的可以是“1”或者“2”,但是format 2不僅允許導(dǎo)入image的內(nèi)容,還可以導(dǎo)入快照的其他屬性,例如image_order、feature。

import-diff src-path image-spec

    導(dǎo)入image的增量差異并將其應(yīng)用于當(dāng)前image。如果diff基于快照產(chǎn)生的,則在繼續(xù)之前驗(yàn)證快照已經(jīng)存在。如果有一個(gè)結(jié)束快照,我們將在應(yīng)用更改之前驗(yàn)證它不存在,并在完成更改后創(chuàng)建快照。

info image-spec|snap-spec

    將列出指定的image的信息(如大小,對象大小等),如果這個(gè)image是克隆卷,也會(huì)顯示其父對象信息;如果指定了一個(gè)快照則會(huì)顯示它是否是protected狀態(tài)。

journal client disconnect journal-spec

    標(biāo)記imgae客戶端為斷開連接。

journal export [--verbose] [--no-error] src-journal-spec path-name

    導(dǎo)出image日志到指定路徑下(用于標(biāo)準(zhǔn)輸出),在做危險(xiǎn)操作之前可以備份image的日志。

    注意:如果日志嚴(yán)重?fù)p壞,這個(gè)命令可能不生效。

journal import [--verbose] [--no-error] path-name dest-journal-spec

    從指定的路徑導(dǎo)入image的日志(用于標(biāo)準(zhǔn)輸入)。

journal info  journal-spec

    顯示image的日志信息。

journal inspect [--verbose] journal-spec

    檢查和報(bào)告image日志的結(jié)構(gòu)誤差。

journal reset journal-spec

    重置image的日志。

journal status journal-spec

    查看image日志的狀態(tài)。

lock add [--shared lock-tag] image-spec lock-id

    鎖定一個(gè)image,lock-id是為了方便用戶而設(shè)置的任意名稱。默認(rèn)情況下這是一個(gè)獨(dú)占鎖,這意味著如果在該image已經(jīng)鎖定的情況下再次執(zhí)行該操作將會(huì)失敗。參數(shù)--shared可以使這個(gè)image被多次鎖定。

注意:添加鎖之外不會(huì)影響任何操作,鎖不能保護(hù)image不被刪除。

lock ls imgae-spec

列出image上的鎖,第一列是與鎖刪除命令一起使用的鎖庫。

lock rm image-spec lock-id locker

釋放image上的鎖,lock-id和locker可以通過查看lock ls的輸出獲得。

ls [-l | –long] [pool-name]

    可以rbd image所有的rbd_directory對象。使用-l可以列出快照,并使用長格式輸出還會(huì)顯示包含大小、父image(如果是克?。?、format等。

merge-diff first-diff-path second-diff-path merged-diff-path

    把兩個(gè)連續(xù)的增量差異合并為單個(gè)差異。前一個(gè)差異的結(jié)束快照必須與后一個(gè)差異的起始快照相同。前一個(gè)差異可以是標(biāo)準(zhǔn)輸入,合并后的差異可以是標(biāo)準(zhǔn)輸出,這樣就可以合并多個(gè)差異文件,像這樣:“rbd merge-diff first second - | rbd merge-diff - third result”,注意,當(dāng)前次命令僅支持stripe_count== 1這樣的源增量差異。

migration abort image-spec

    取消image的遷移操作。此步驟可能在準(zhǔn)備遷移成功或失敗后執(zhí)行,并將image返回初始(遷移前)狀態(tài),對目標(biāo)image所有的修改都將丟失。

migration commit image-spec

    提交image遷移。這一步是在準(zhǔn)備遷移成功和遷移步驟后刪除源image數(shù)據(jù)后執(zhí)行的

migration execute image-spec

    執(zhí)行image的遷移操作。這個(gè)步驟是在遷移工作準(zhǔn)備成功并將image數(shù)據(jù)復(fù)制到目標(biāo)image后執(zhí)行的。

migration prepare [–order order] [–object-size object-size] [–image-feature image-feature] [–image-shared] [–stripe-unit stripe-unit] [–stripe-count stripe-count] [–data-pool data-pool] src-image-spec [dest-image-spec]

    準(zhǔn)備image遷移。這個(gè)遷移image的第一步,即更改image位置、format或者其他不能動(dòng)態(tài)更改的參數(shù)。目標(biāo)可以與源匹配,在這種情況下,可以省略dest-image-spec。在此步驟之后,源image被設(shè)置為目標(biāo)image的父image,并且根據(jù)目標(biāo)image規(guī)范該image可以在copy-on-write模式下訪問。

mirror image demote image-spec

    將主image降級(jí)為非主iamge。

mirror image disable [–force] image-spec

   為image禁用RBD mirror。如果mirror是以image pool的模式設(shè)置的,則可以現(xiàn)實(shí)禁用池中的每個(gè)image的mirror。

mirror image enable image-spec

為image啟用RBD mirror。如果mirror是以image pool的模式配置的,則可以顯示為啟用池中的每個(gè)image的mirror。

mirror image promote [--force] image-spec

為RBD image將非主image升級(jí)為主image。

mirror image resync image-spec

強(qiáng)制對RBDimage的主image進(jìn)行重新同步。

mirror image status image-spec

 顯示image的mirror狀態(tài)。

mirror pool demote [pool-name]

將RBD image的pool降級(jí)為非主要pool

mirror pool disable [pool-name]

默認(rèn)是池的情況下禁用RBD mirror,以這種方式禁用存儲(chǔ)池的mirror時(shí),對于已明確啟用的mirror的任何image(存儲(chǔ)池內(nèi))也將禁用mirror。

mirror pool enable [pool-name] mode

默認(rèn)時(shí)存儲(chǔ)池的情況下啟用RBD mirror。Mirror模式可以是存儲(chǔ)池或者是image,如果在存儲(chǔ)池模式下配置,則會(huì)啟用存儲(chǔ)池中具有啟用日志功能的所有image。如果在mirror模式下配置,則需要在每image上啟用mirror(通過mirror image enabl命令)。

mirror pool info [pool-name]

顯示有關(guān)存儲(chǔ)池mirror配置的信息。它包括mirror模式,對等UUID,遠(yuǎn)程集群名稱和遠(yuǎn)程客戶端名稱

mirror pool peer add [pool-name] remote-cluster-spec

將mirror對等體添加到存儲(chǔ)池中。Remot-cluster-spec是[遠(yuǎn)程客戶端名稱@]遠(yuǎn)程集群名稱。

默認(rèn)的遠(yuǎn)程客戶端名稱是“client.admin”。

需要啟用mirror模式。

mirror pool peer remove [pool-name] uuid

從存儲(chǔ)池中刪除mirror對等體,對等UUID可以通過mirror pool info命令獲得。

mirror pool peer set [pool-name] uuid key value

更新mirror對等設(shè)置。密鑰可以是客戶端或集群,該值對應(yīng)于遠(yuǎn)程客戶端名稱或遠(yuǎn)程集群名稱。

mirror pool promote [--force] [pool-name]

將存儲(chǔ)池中的每個(gè)非主image提升為主iamge,每個(gè)啟用mirror的image都將在存儲(chǔ)池中升級(jí)。

mirror pool status [--verbose] [pool-name]

顯示存儲(chǔ)池中所有的image mirror的狀態(tài),使用 –verbose還會(huì)為存儲(chǔ)池中的每個(gè)image mirror顯示輸出另外的詳細(xì)狀態(tài)信息。

mv src-image-spec dest-image-spec

    命名一個(gè)image,注意,不支持跨池重命名。

object-map check imag-spec | snap-spec

    驗(yàn)證對象映射是否正確

object-map rebuild imag-spec | snap-spec

    為指定的image重建無效的對象映射??梢詾橹付ǖ膇amge快照以重建快照的無效對象映射。

pool init [pool-name] [--force]

初始化存儲(chǔ)池以供RBD使用。新創(chuàng)建的存儲(chǔ)池必須在使用前初始化。

resize (-s | –size size-in-M/G/T) [–allow-shrink] image-spec

    調(diào)整rbd image的大小,還需要指定--size參數(shù),--all-shrink選項(xiàng)可以減小大小。

rm image-spec

    刪除rbd image(包含所有的數(shù)據(jù)塊),如果這個(gè)image有快照則無法刪除。

snap create snap-spec

    創(chuàng)建一個(gè)新快照,需要指定快照名稱參數(shù)。

snap limit clear image-spec

    刪除以前對image允許創(chuàng)建的快照數(shù)量的限制。

snap ls image-spec

    顯示指定的image的快照。

snap protect snap-spec

    保護(hù)快照不被刪除,以便可以對其進(jìn)行克隆。在科隆生成之前必須保護(hù)快照,保護(hù)意味著存在以來克隆的子節(jié)點(diǎn)來引用此快照,如果快照是不被保護(hù)的rbd clone命令將會(huì)失敗。

snap purge image-spec

    刪除image中所有不受保護(hù)的快照。

snap rename src-snap-spec dest-snap-spec

    重命名一個(gè)快照,注意,不支持跨池重命名。

snap rm [--force] snap-spec

    刪除指定的快照。

snap rollback snap-spec

    將image內(nèi)容會(huì)滾到快照階段,這將遍歷整個(gè)塊陣列并將數(shù)據(jù)頭內(nèi)容更新為快照版本。

snap unprotect snap-spec

    刪除快照保護(hù)(撤銷快照保護(hù)),如果克隆的子項(xiàng)仍然存在,則snap unprotect將失?。ㄕ堊⒁猓寺】赡艽嬖谟谂c富快照不同的存儲(chǔ)池中。)

    需要image的format 是2.

status image-spec

    顯示image的狀態(tài),包括哪些客戶端正在使用/打開。

trash ls [pool-name]

    列出延遲刪除的所有條目。

trash mv image-spec

   列出垃圾桶中的所有條目。

trash mv image-spec

    將image移動(dòng)到垃圾桶中,image即使是克隆正在使用的image可以克移動(dòng)到垃圾桶后再刪除。

trash purge [pool-name]

    刪除垃圾桶中所有過期的image。

trash restore image-id

    從垃圾桶中恢復(fù)某個(gè)image。

trash rm image-id

    從垃圾桶中刪除image,如果image掩飾刪除時(shí)間尚未到期,除非強(qiáng)制刪除,否則無法將其刪除,但是無法主動(dòng)刪除正在使用中的克隆或快照。

watch image-spec

    查看image上的活動(dòng)事件。

***轉(zhuǎn)載請注明出處***

另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。

標(biāo)題名稱:CephM版本命令整理-創(chuàng)新互聯(lián)
網(wǎng)站網(wǎng)址:http://muchs.cn/article16/dcogdg.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站維護(hù)域名注冊、微信公眾號(hào)、商城網(wǎng)站、網(wǎng)站設(shè)計(jì)公司、移動(dòng)網(wǎng)站建設(shè)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

成都定制網(wǎng)站建設(shè)