所选语种没有对应资源,请选择:

本站点使用Cookies,继续浏览表示您同意我们使用Cookies。Cookies和隐私政策>

提示

尊敬的用户,您的IE浏览器版本过低,为获取更好的浏览体验,请升级您的IE浏览器。

升级

OceanStor Dorado V3系列 V300R002 高级运维命令参考(块业务)

本产品文档适用于OceanStor Dorado3000 V3, Dorado5000 V3, Dorado6000 V3和Dorado18000 V3。本文档针对CLI命令行,介绍如何使用CLI设置和管理存储系统,以及按功能分类详细介 绍各命令的使用方法。
评分并提供意见反馈 :
华为采用机器翻译与人工审校相结合的方式将此文档翻译成不同语言,希望能帮助您更容易理解此文档的内容。 请注意:即使是最好的机器翻译,其准确度也不及专业翻译人员的水平。 华为对于翻译的准确性不承担任何责任,并建议您参考英文文档(已提供链接)。
ccdb.sh

ccdb.sh

命令功能

ccdb.sh命令用于CCDB模块运行信息查询及故障恢复。

命令格式

ccdb.sh -c clearccdb [local | peer | all]

ccdb.sh -c cleardbfile [dbName]

ccdb.sh -c cleardblog [dbName]

ccdb.sh -c exportdb

ccdb.sh -c operdb [dbName] [cmdpath]

ccdb.sh -c showstate

ccdb.sh -c showdbinfo

ccdb.sh -c showdb [dbName]

ccdb.sh -c showbackupdb

ccdb.sh -c showmd

ccdb.sh -c startccdb [local | peer | all]

ccdb.sh -c stopccdb [local | peer | all]

ccdb.sh -c recoverymd [cmdpath] [online | offline]

ccdb.sh -c repairdb [db | all] [backupfile] [dbName]

ccdb.sh -h

ccdb.sh -a

ccdb.sh -c showccdbdirtyflag [mem | disk]

ccdb.sh -c setccdbdirtyflag [nid] [type] [validFlag]

ccdb.sh -c resetccdbdirtyflag

ccdb.sh -c clearccdbblkraidinfo

ccdb.sh -c showccdbblkraidinfo

ccdb.sh -c resetstarttime

ccdb.sh -c checkmd

ccdb.sh -c removemddisk [diskId]

ccdb.sh -c setfaultdisk [diskId]

参数说明

参数

参数说明

取值

c clearccdb

清理本引擎CCDB数据。

-

c cleardbfile [dbName]

清理本引擎DB文件。

dbName:业务DB名称,DB名请使用“ccdb.sh -c showdbinfo”命令查询。

模式

最小模式

使用指南

此命令为系统集群配置数据库定位/修复命令,仅在集群配置数据库发生异常时使用,若使用不当,可能会导致系统集群配置数据发生破坏,请慎用。

具体功能包括:

1.清理本引擎CCDB数据。

2.清理本引擎DB文件。

3.清理本引擎DB日志文件。

4.将DB文件导出到'/home/permitdir/export_import'目录。

5.使用SQL操作本引擎DB文件。

6.查询CCDB服务状态信息。

7.查询所有DB名称。

8.查看DB信息,包括DB版本号和健康度。

9.查看备份日志文件信息。

10.查看CCDB使用块设备信息。

11.启动本引擎CCDB服务。

12.停止本引擎CCDB服务。

13.恢复CCDB使用的块设备。

14.用备份文件自动恢复DB。

15.显示命令帮助信息。

16.查看所有命令。

17.查询脏节点数据标记。

18.设置脏节点数据标记。

19.重置脏节点数据标记。

20.清理CCDB RAID信息。

21.查询CCDB RAID信息。

22.重置CCDB开工等待时间。

23.检查CCDB使用块设备状态。

24.从CCDB RAID中移除块设备。

25.将CCDB块设备置为故障。

使用实例

  • 清理本节点CCDB数据。
    Storage: minisystem> ccdb.sh -c clearccdb local 
    DANGER: You are going to perform a danger command. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Enter "I have read and understand the consequences associated with performing this operation." to confirm running this command. 
    I have read and understand the consequences associated with performing this operation. 
    DANGER: You are going to perform a danger command, this behavior causes database service interruption. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Are you sure you really want to perform the operation?(y/n) 
    y 
    admin:/diagnose>ccdb stopserver 
    stop CCDB server success. 
    admin:/diagnose>exit 
    CCDB stop peer service. 
    admin:/diagnose>ccdb clearlocal 
    clear local CCDB success 
    admin:/diagnose>exit
  • 清理本引擎内对端节点CCDB数据。
    Storage: minisystem> ccdb.sh -c clearccdb peer 
    DANGER: You are going to perform a danger command. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Enter "I have read and understand the consequences associated with performing this operation." to confirm running this command. 
    I have read and understand the consequences associated with performing this operation. 
    DANGER: You are going to perform a danger command, this behavior causes database service interruption. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Are you sure you really want to perform the operation?(y/n) 
    y 
    admin:/diagnose>ccdb stopserver 
    stop CCDB server success. 
    admin:/diagnose>exit 
    CCDB stop peer service. 
    Clear peer CCDB. 
    Storage: minisystem>
  • 清理本引擎CCDB数据。
    Storage: minisystem> ccdb.sh -c clearccdb all 
    DANGER: You are going to perform a danger command. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Enter "I have read and understand the consequences associated with performing this operation." to confirm running this command. 
    I have read and understand the consequences associated with performing this operation. 
    DANGER: You are going to perform a danger command, this behavior causes database service interruption. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Are you sure you really want to perform the operation?(y/n) 
    y 
    admin:/diagnose>ccdb stopserver 
    stop CCDB server success. 
    admin:/diagnose>exit 
    CCDB stop peer service. 
    admin:/diagnose>ccdb clearlocal 
    clear local CCDB success 
    admin:/diagnose>exit 
    Clear peer CCDB. 
    Storage: minisystem>
  • 清理本引擎内DB名为“DLMDB”的数据库文件。此命令将会停止CCDB服务,可以执行命令“ccdb.sh -c startccdb all”重启CCDB服务。
    Storage: minisystem> ccdb.sh -c cleardbfile DLMDB 
    DANGER: You are going to perform a danger command. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Enter "I have read and understand the consequences associated with performing this operation." to confirm running this command. 
    I have read and understand the consequences associated with performing this operation. 
    DANGER: You are going to perform a danger command, this behavior causes database service interruption. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Are you sure you really want to perform the operation?(y/n) 
    y 
    admin:/diagnose>ccdb stopserver 
    stop CCDB server success. 
    admin:/diagnose>exit 
    CCDB stop peer service. 
    admin:/diagnose>ccdb cleardbfile DLMDB 
    clear CCDB db file success. 
    admin:/diagnose>exit 
    Storage: minisystem>
  • 清理本引擎内DB名为“DLMDB”的数据库日志文件。此命令将会停止CCDB服务,可以执行命令“ccdb.sh -c startccdb all”重启CCDB服务。
    Storage: minisystem> ccdb.sh -c cleardblog DLMDB 
    DANGER: You are going to perform a danger command, this behavior causes database service interruption. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Are you sure you really want to perform the operation?(y/n) 
    y 
    admin:/diagnose>ccdb stopserver 
    stop CCDB server success. 
    admin:/diagnose>exit 
    CCDB stop peer service. 
    admin:/diagnose>ccdb cleardblogfile DLMDB 
    clear CCDB db file success. 
    admin:/diagnose>exit 
    Storage: minisystem>
  • 查看ccdb.sh命令列表。
    Storage: minisystem> ccdb.sh -a 
    ccdb.sh -c clearccdb [local | peer | all]              : clear local-engine ccdb data. 
    ccdb.sh -c cleardbfile [dbName]                        : clear local-engine db file. 
    ccdb.sh -c cleardblog [dbName]                         : clear local-engine db log file. 
    ccdb.sh -c exportdb                                    : force export db file to '/home/permitdir/export_import'. 
    ccdb.sh -c operdb [dbName] [cmdpath]                   : operate local-engine db by SQL. 
    ccdb.sh -c showstate                                   : show ccdb service information. 
    ccdb.sh -c showdbinfo                                  : show all db name. 
    ccdb.sh -c showdb [dbName]                             : show db information, including version,health degree. 
    ccdb.sh -c showbackupdb                                : show ccdb backup file. 
    ccdb.sh -c showmd                                      : show information about block device to be used ccdb. 
    ccdb.sh -c startccdb [local | peer | all]              : start local-engine ccdb service. 
    ccdb.sh -c stopccdb [local | peer | all]               : stop local-engine ccdb service. 
    ccdb.sh -c recoverymd [cmdpath] [online | offline]     : recovery block device to be used ccdb. 
    ccdb.sh -c repairdb [db | all] [backupfile] [dbName]   : auto repair db by the history backup db file. 
    ccdb.sh -c showccdbdirtyflag  [mem | disk]             : show ccdb dirty flag. 
    ccdb.sh -c setccdbdirtyflag [nid] [type] [validFlag]   : set ccdb dirty flag, [type] is [0|1|2],0:nodeFlag,1:nvram, 2:mem. 
    ccdb.sh -c resetccdbdirtyflag                          : restore factory settings. 
    ccdb.sh -c clearccdbblkraidinfo                        : clear ccdb blk raid info. 
    ccdb.sh -c showccdbblkraidinfo                         : show ccdb blk raid info. 
    ccdb.sh -c resetstarttime                              : reset ccdb start work delay time. 
    ccdb.sh -c checkmd                                     : check block device to be used ccdb. 
    ccdb.sh -c removemddisk [diskId]                       : remove disk of md200. 
    ccdb.sh -c setfaultdisk [diskId]                       : set fault disk of md200. 
    Storage: minisystem>
  • 查看ccdb.sh命令帮助信息。
    Storage: minisystem> ccdb.sh -h 
    ccdb.sh [-h] | [-a] | [-c] : It is just a cluster configuration database command. Enter ccdb.sh -a to obtain more information. 
    Storage: minisystem>
  • 停止本引擎内本地节点和对端节点CCDB服务。
    Storage: minisystem> ccdb.sh -c stopccdb all 
    DANGER: You are going to perform a danger command, this behavior causes database service interruption. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Are you sure you really want to perform the operation?(y/n) 
    y 
    admin:/diagnose>ccdb stopserver 
    stop CCDB server success. 
    admin:/diagnose>exit 
    CCDB stop peer service. 
    Storage: minisystem>
  • 停止本引擎内对端节点CCDB服务。
    Storage: minisystem> ccdb.sh -c stopccdb peer 
    DANGER: You are going to perform a danger command, this behavior causes database service interruption. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Are you sure you really want to perform the operation?(y/n) 
    y 
    CCDB stop peer service. 
    Storage: minisystem>
  • 查询所有数据库备份文件。
    Storage: minisystem> ccdb.sh -c showbackupdb  
    backup-2015-09-13-18-00-53.tar backup-2015-09-14-16-58-36.tar backup-2015-09-14-18-51-47.tar 
    Storage: minisystem>
  • 导出DB文件到/home/permirdir/export_import。此命令将会停止CCDB服务,可以执行命令“ccdb.sh -c startccdb all”重启CCDB服务。
    Storage: minisystem> ccdb.sh -c exportdb  
    DANGER: You are going to perform a danger command, this behavior causes database service interruption. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Are you sure you really want to perform the operation?(y/n) 
    y 
    admin:/diagnose>ccdb stopserver 
    stop CCDB server success. 
    admin:/diagnose>exit 
    CCDB stop peer service. 
    admin:/diagnose>ccdb exportdb /home/permitdir/export_import 
    export db success. 
    admin:/diagnose>exit 
    Storage: minisystem>
  • 查询名为“DLMDB”的数据库版本号及健康状态。此命令将会停止CCDB服务,可以执行命令“ccdb.sh -c startccdb all”重启CCDB服务。
    Storage: minisystem> ccdb.sh -c showdb DLMDB 
    DANGER: You are going to perform a danger command, this behavior causes database service interruption. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Are you sure you really want to perform the operation?(y/n) 
    y 
    admin:/diagnose>ccdb stopserver 
    stop CCDB server success. 
    admin:/diagnose>exit 
    CCDB stop peer service. 
    admin:/diagnose>ccdb mountmd 
    admin:/diagnose>exit 
    DB Name : DLMDB 
    ------------------------------------------------------ 
    admin:/diagnose>ccdb showversion /OSM/ccdb/store/DLMDB_0/DLMDB 
    snapshot version 
    -------------- 
    17 
    admin:/diagnose>exit 
    admin:/diagnose>ccdb checkup /OSM/ccdb/store/DLMDB_0/DLMDB 
    health 
    ----- 
    ok 
    admin:/diagnose>exit 
    admin:/diagnose>ccdb unmountmd 
    admin:/diagnose>exit 
    Storage: minisystem>
  • 查询所有业务DB版本号及健康状态。此命令将会停止CCDB服务,可以执行命令“ccdb.sh -c startccdb all”重启CCDB服务。
    Storage: minisystem> ccdb.sh -c showdbinfo  
    DANGER: You are going to perform a danger command, this behavior causes database service interruption. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Are you sure you really want to perform the operation?(y/n) 
    y 
    admin:/diagnose>ccdb stopserver 
    stop CCDB server success. 
    admin:/diagnose>exit 
    CCDB stop peer service. 
    admin:/diagnose>ccdb showdbname 
    . 
    .|-- DLMDB_0 
    .|-- ccdb_metadata.db_0 
    .| |-- ccdb_metadata.db 
    .| |-- ccdb_metadata.db-shm 
    .| |-- ccdb_metadata.db-wal 
    .| |-- paxos_ccdb_metadata.db-epoch.log 
    .| `-- paxos_ccdb_metadata.db_1-magic.log 
    .|-- cmr_db_0_0 
    .| |-- cmr_db_0 
    .| |-- cmr_db_0-shm 
    .| |-- cmr_db_0-wal 
    .| |-- paxos_cmr_db_0-epoch.log 
    .| `-- paxos_cmr_db_0_1-magic.log 
    .|-- dbRepRm.db_0 
    .| |-- dbRepRm.db 
    .| |-- dbRepRm.db-shm 
    .| |-- dbRepRm.db-wal 
    .| |-- paxos_dbRepRm.db-epoch.log 
    .| `-- paxos_dbRepRm.db_1-magic.log 
    .|-- dbRepSdddb_0 
    .| |-- dbRepSdddb 
    .| |-- dbRepSdddb-shm 
    .| |-- dbRepSdddb-wal 
    .| |-- paxos_dbRepSdddb-epoch.log 
    .| `-- paxos_dbRepSdddb_1-magic.log 
    .|-- dbRepSvc.db_0 
    .| |-- dbRepSvc.db 
    .| |-- dbRepSvc.db-shm 
    .| |-- dbRepSvc.db-wal 
    .| |-- paxos_dbRepSvc.db-epoch.log 
    .| `-- paxos_dbRepSvc.db_1-magic.log 
    .|-- dbRepUtil.db_0 
    .| |-- dbRepUtil.db 
    .| |-- dbRepUtil.db-shm 
    .| |-- dbRepUtil.db-wal 
    .| |-- paxos_dbRepUtil.db-epoch.log 
    .| `-- paxos_dbRepUtil.db_1-magic.log 
    .`-- lost+found 
    . 
    .8 directories, 30 files 
    .admin:/diagnose>exit 
    Storage: minisystem>  
    Storage: minisystem> ccdb.sh -c showdb  
    DANGER: You are going to perform a danger command, this behavior causes database service interruption. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Are you sure you really want to perform the operation?(y/n) 
    y 
    admin:/diagnose>ccdb stopserver 
    stop CCDB server success. 
    admin:/diagnose>exit 
    CCDB stop peer service. 
    admin:/diagnose>ccdb mountmd 
    admin:/diagnose>exit 
    DB Name : ccdb_metadata.db 
    ------------------------------------------------------ 
    admin:/diagnose>ccdb showversion /OSM/ccdb/store/ccdb_metadata.db_0/ccdb_metadata.db 
    snapshot version 
    -------------- 
    6 
    admin:/diagnose>exit 
    admin:/diagnose>ccdb checkup /OSM/ccdb/store/ccdb_metadata.db_0/ccdb_metadata.db 
    health 
    ----- 
    ok 
    admin:/diagnose>exit 
    DB Name : cmr_db_0 
    ------------------------------------------------------ 
    admin:/diagnose>ccdb showversion /OSM/ccdb/store/cmr_db_0_0/cmr_db_0 
    snapshot version 
    -------------- 
    17 
    admin:/diagnose>exit 
    admin:/diagnose>ccdb checkup /OSM/ccdb/store/cmr_db_0_0/cmr_db_0 
    health 
    ----- 
    ok 
    admin:/diagnose>exit 
    DB Name : dbRepRm.db 
    ------------------------------------------------------ 
    admin:/diagnose>ccdb showversion /OSM/ccdb/store/dbRepRm.db_0/dbRepRm.db 
    snapshot version 
    -------------- 
    0 
    admin:/diagnose>exit 
    admin:/diagnose>ccdb checkup /OSM/ccdb/store/dbRepRm.db_0/dbRepRm.db 
    health 
    ----- 
    ok 
    admin:/diagnose>exit 
    DB Name : dbRepSdddb 
    ------------------------------------------------------ 
    admin:/diagnose>ccdb showversion /OSM/ccdb/store/dbRepSdddb_0/dbRepSdddb 
    snapshot version 
    -------------- 
    0 
    admin:/diagnose>exit 
    admin:/diagnose>ccdb checkup /OSM/ccdb/store/dbRepSdddb_0/dbRepSdddb 
    health 
    ----- 
    ok 
    admin:/diagnose>exit 
    DB Name : dbRepSvc.db 
    ------------------------------------------------------ 
    admin:/diagnose>ccdb showversion /OSM/ccdb/store/dbRepSvc.db_0/dbRepSvc.db 
    snapshot version 
    -------------- 
    0 
    admin:/diagnose>exit 
    admin:/diagnose>ccdb checkup /OSM/ccdb/store/dbRepSvc.db_0/dbRepSvc.db 
    health 
    ----- 
    ok 
    admin:/diagnose>exit 
    DB Name : dbRepUtil.db 
    ------------------------------------------------------ 
    admin:/diagnose>ccdb showversion /OSM/ccdb/store/dbRepUtil.db_0/dbRepUtil.db 
    snapshot version 
    -------------- 
    128 
    admin:/diagnose>exit 
    admin:/diagnose>ccdb checkup /OSM/ccdb/store/dbRepUtil.db_0/dbRepUtil.db 
    health 
    ----- 
    ok 
    admin:/diagnose>exit 
    admin:/diagnose>ccdb unmountmd 
    admin:/diagnose>exit 
    Storage: minisystem>
  • 查询CCDB集群状态及集群内节点心跳信息。
    Storage: minisystem> ccdb.sh -c showstate 
    CCDB cluster heartbeat information: 
    -------------------------------------------- 
    admin:/diagnose>mon showhb 
    nid = 0 ,role = 0 (1:M,2:S,3:R),status = 0 (1:R,2:N,3:AbN),is join = 0 ,epoch = 0 ,schema version = 0 ,engineId = 65535  
    nid = 1 ,role = 0 (1:M,2:S,3:R),status = 0 (1:R,2:N,3:AbN),is join = 0 ,epoch = 0 ,schema version = 0 ,engineId = 65535  
    nid = 2 ,role = 0 (1:M,2:S,3:R),status = 0 (1:R,2:N,3:AbN),is join = 0 ,epoch = 0 ,schema version = 0 ,engineId = 65535  
    nid = 3 ,role = 0 (1:M,2:S,3:R),status = 0 (1:R,2:N,3:AbN),is join = 0 ,epoch = 0 ,schema version = 0 ,engineId = 65535  
    admin:/diagnose>exit 
    CCDB cluster Finite State Machine information: 
    -------------------------------------------- 
    admin:/diagnose>mon showsm 
    [2018-08-02 10:56:43.472] init(sys set master event)---->recovery [reason:set master,the master's Nid is 0] 
    [2018-08-02 10:57:00.334] recovery(silent timeout event)---->elect [reason:] 
    [2018-08-02 10:57:03.514] elect(heartbeat collect event)---->failover_sync [reason:server master id is 0] 
    [2018-08-02 10:57:03.516] failover_sync(sync master succ event)---->normal [reason:] 
    [2018-08-02 10:57:03.516] normal(conf event)---->config [reason:master's Nid is 0,conf nodemap is 3] 
    [2018-08-02 10:57:09.050] config(conf succ event)---->normal [reason:] 
    admin:/diagnose>exit 
    Storage: minisystem> 
  • 对DLMDB执行操作,操作的SQL保存在/home/permitdir/execsql文件内。此命令将会停止CCDB服务,可以执行命令“ccdb.sh -c startccdb all”重启CCDB服务。
    Storage: minisystem> ccdb.sh -c operdb DLMDB /home/permitdir/execsql 
    DANGER: You are going to perform a danger command. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Enter "I have read and understand the consequences associated with performing this operation." to confirm running this command. 
    I have read and understand the consequences associated with performing this operation. 
    DANGER: You are going to perform a danger command, this behavior causes database service interruption. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Are you sure you really want to perform the operation?(y/n) 
    y 
    admin:/diagnose>ccdb stopserver 
    stop CCDB server success. 
    admin:/diagnose>exit 
    CCDB stop peer service. 
    admin:/diagnose>ccdb mountmd 
    admin:/diagnose>exit 
    admin:/diagnose>ccdb execsql /OSM/ccdb/store/DLMDB_0/DLMDB ""select * from DLM_CCDB_INTERNAL_NODE_EVENT_S;;"" 
    exec sql statement failed. 
    admin:/diagnose>exit 
    admin:/diagnose>ccdb unmountmd 
    admin:/diagnose>exit 
    Storage: minisystem> 
  • 查询当前所有业务DB信息。此命令将会停止CCDB服务,可以执行命令“ccdb.sh -c startccdb all”重启CCDB服务。
    Storage: minisystem> ccdb.sh -c showdbinfo  
    DANGER: You are going to perform a danger command, this behavior causes database service interruption. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Are you sure you really want to perform the operation?(y/n) 
    y 
    admin:/diagnose>ccdb stopserver 
    stop CCDB server success. 
    admin:/diagnose>exit 
    CCDB stop peer service. 
    admin:/diagnose>ccdb showdbname 
    . 
    .|-- DLMDB_0 
    .|-- ccdb_metadata.db_0 
    .| |-- ccdb_metadata.db 
    .| |-- ccdb_metadata.db-shm 
    .| |-- ccdb_metadata.db-wal 
    .| |-- paxos_ccdb_metadata.db-epoch.log 
    .| `-- paxos_ccdb_metadata.db_1-magic.log 
    .|-- cmr_db_0_0 
    .| |-- cmr_db_0 
    .| |-- cmr_db_0-shm 
    .| |-- cmr_db_0-wal 
    .| |-- paxos_cmr_db_0-epoch.log 
    .| `-- paxos_cmr_db_0_1-magic.log 
    .|-- dbRepRm.db_0 
    .| |-- dbRepRm.db 
    .| |-- dbRepRm.db-shm 
    .| |-- dbRepRm.db-wal 
    .| |-- paxos_dbRepRm.db-epoch.log 
    .| `-- paxos_dbRepRm.db_1-magic.log 
    .|-- dbRepSdddb_0 
    .| |-- dbRepSdddb 
    .| |-- dbRepSdddb-shm 
    .| |-- dbRepSdddb-wal 
    .| |-- paxos_dbRepSdddb-epoch.log 
    .| `-- paxos_dbRepSdddb_1-magic.log 
    .|-- dbRepSvc.db_0 
    .| |-- dbRepSvc.db 
    .| |-- dbRepSvc.db-shm 
    .| |-- dbRepSvc.db-wal 
    .| |-- paxos_dbRepSvc.db-epoch.log 
    .| `-- paxos_dbRepSvc.db_1-magic.log 
    .|-- dbRepUtil.db_0 
    .| |-- dbRepUtil.db 
    .| |-- dbRepUtil.db-shm 
    .| |-- dbRepUtil.db-wal 
    .| |-- paxos_dbRepUtil.db-epoch.log 
    .| `-- paxos_dbRepUtil.db_1-magic.log 
    .`-- lost+found 
    . 
    .8 directories, 30 files 
    .admin:/diagnose>exit 
    Storage: minisystem>
  • 查询CCDB使用块设备信息。此命令将会停止CCDB服务,可以执行命令“ccdb.sh -c startccdb all”重启CCDB服务。
    Storage: minisystem> ccdb.sh -c showmd 
    DANGER: You are going to perform a danger command, this behavior causes database service interruption. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Are you sure you really want to perform the operation?(y/n) 
    y 
    admin:/diagnose>ccdb stopserver 
    stop CCDB server success. 
    admin:/diagnose>exit 
    CCDB stop peer service. 
    admin:/diagnose>ccdb opermd "mdadm --detail /dev/md200" 
    /dev/md200: 
    . Version : 1.2 
    . Creation Time : Mon Sep 14 17:28:03 2015 
    . Raid Level : raid1 
    . Array Size : 2096064 (2047.28 MiB 2146.37 MB) 
    . Used Dev Size : 2096064 (2047.28 MiB 2146.37 MB) 
    . Raid Devices : 6 
    . Total Devices : 6 
    . Persistence : Superblock is persistent 
    . 
    . Intent Bitmap : Internal  
    . 
    . Update Time : Mon Sep 14 19:01:53 2015 
    . State : clean  
    . Active Devices : 6 
    .Working Devices : 6 
    . Failed Devices : 0 
    . Spare Devices : 0 
      
    .Consistency Policy : unknown 
      
    . Name : Storage:CCDB_RAID_DEVICE (local to host Storage) 
    . UUID : fec7b53d:372104b6:4b575544:a44492cb 
    . Events : 29 
    . 
    . Number Major Minor RaidDevice State 
    . 0 252 48 0 active sync /dev/ld259a 
    . 1 252 304 1 active sync /dev/ld275a 
    . 2 252 4288 2 active sync writemostly /dev/ld12a 
    . 3 252 4304 3 active sync writemostly /dev/ld13a 
    . 4 252 4320 4 active sync writemostly /dev/ld14a 
    . 5 252 4336 5 active sync writemostly /dev/ld15a 
    .admin:/diagnose>exit 
    Storage: minisystem>
  • 启动本地节点CCDB服务。
    Storage: minisystem> ccdb.sh -c startccdb local 
    admin:/diagnose>ccdb startserver 
    start CCDB server success. 
    admin:/diagnose>exit 
    Storage: minisystem>
  • 启动本引擎内对端节点CCDB服务。
    Storage: minisystem> ccdb.sh -c startccdb peer 
    CCDB start peer service. 
    Storage: minisystem>
  • 启动本引擎内本地节点和对端节点CCDB服务。
    Storage: minisystem> ccdb.sh -c startccdb all 
    admin:/diagnose>ccdb startserver 
    start CCDB server success. 
    admin:/diagnose>exit 
    CCDB start peer service. 
    Storage: minisystem>
  • 停止本地节点CCDB服务。
    Storage: minisystem> ccdb.sh -c stopccdb local 
    DANGER: You are going to perform a danger command, this behavior causes database service interruption. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Are you sure you really want to perform the operation?(y/n) 
    y 
    admin:/diagnose>ccdb stopserver 
    stop CCDB server success. 
    admin:/diagnose>exit 
    Storage: minisystem>
  • 对CCDB使用的块设备执行操作,操作的命令保存在/home/permitdir/execcmd文件内,命令操作模式为离线。此命令将会停止CCDB服务,可以执行命令“ccdb.sh -c startccdb all”重启CCDB服务。
    Storage: minisystem> ccdb.sh -c recoverymd /home/permitdir/execmd offline 
    DANGER: You are going to perform a danger command. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Enter "I have read and understand the consequences associated with performing this operation." to confirm running this command. 
    I have read and understand the consequences associated with performing this operation. 
    DANGER: You are going to perform a danger command, this behavior causes database service interruption. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Are you sure you really want to perform the operation?(y/n) 
    y 
    admin:/diagnose>ccdb stopserver 
    stop CCDB server success. 
    admin:/diagnose>exit 
    CCDB stop peer service. 
    admin:/diagnose>ccdb opermd "mdadm --detail /dev/md200" 0 
    /dev/md200: 
    . Version : 1.2 
    . Creation Time : Mon Sep 14 17:28:03 2015 
    . Raid Level : raid1 
    . Array Size : 2096064 (2047.28 MiB 2146.37 MB) 
    . Used Dev Size : 2096064 (2047.28 MiB 2146.37 MB) 
    . Raid Devices : 6 
    . Total Devices : 6 
    . Persistence : Superblock is persistent 
    .  
    . Update Time : Mon Sep 14 19:37:48 2015 
    . State : clean  
    . Active Devices : 6 
    .Working Devices : 6 
    . Failed Devices : 0 
    . Spare Devices : 0 
    . 
    . Name : Storage:CCDB_RAID_DEVICE (local to host Storage) 
    . UUID : fec7b53d:372104b6:4b575544:a44492cb 
    . Events : 67 
    . 
    . Number Major Minor RaidDevice State 
    . 0 252 48 0 active sync /dev/ld259a 
    . 1 252 304 1 active sync /dev/ld275a 
    . 6 252 4288 2 active sync writemostly /dev/ld12a 
    . 3 252 4304 3 active sync writemostly /dev/ld13a 
    . 4 252 4320 4 active sync writemostly /dev/ld14a 
    . 5 252 4336 5 active sync writemostly /dev/ld15a 
    .admin:/diagnose>exit 
    Storage: minisystem>
  • 对CCDB使用的块设备执行操作,操作的命令保存在/home/permitdir/execcmd文件内,命令操作模式为在线。
    Storage: minisystem> ccdb.sh -c recoverymd /home/permitdir/execmd online 
    DANGER: You are going to perform a danger command. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Enter "I have read and understand the consequences associated with performing this operation." to confirm running this command. 
    I have read and understand the consequences associated with performing this operation. 
    DANGER: You are going to perform a danger command, this behavior causes database service interruption. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Are you sure you really want to perform the operation?(y/n) 
    y 
    /dev/md200 
    admin:/diagnose>ccdb opermd "mdadm --manage /dev/md200 --fail /dev/ld12a" 1 
    admin:/diagnose>exit 
    Storage: minisystem>
  • 使用backup-2015-09-13-18-00-53.tar文件恢复DLMDB的DB文件。此命令将会停止CCDB服务,可以执行命令“ccdb.sh -c startccdb all”重启CCDB服务。
    Storage: minisystem> ccdb.sh -c showbackupdb  
    backup-2015-09-13-18-00-53.tar backup-2015-09-14-16-58-36.tar backup-2015-09-14-18-51-47.tar 
    Storage: minisystem> ccdb.sh -c repairdb db backup-2015-09-14-18-51-47.tar DLMDB 
    DANGER: You are going to perform a danger command. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Enter "I have read and understand the consequences associated with performing this operation." to confirm running this command. 
    I have read and understand the consequences associated with performing this operation. 
    DANGER: You are going to perform a danger command, this behavior causes database service interruption. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Are you sure you really want to perform the operation?(y/n) 
    y 
    admin:/diagnose>ccdb stopserver 
    stop CCDB server success. 
    admin:/diagnose>exit 
    CCDB stop peer service. 
    admin:/diagnose>ccdb recoveryccdb 0 backup-2015-09-14-18-51-47.tar DLMDB 
    recover CCDB db success. 
    admin:/diagnose>exit
  • 使用backup-2015-09-13-18-00-53.tar文件恢复DLMDB的所有内容。此命令将会停止CCDB服务,可以执行命令“ccdb.sh -c startccdb all”重启CCDB服务。
    Storage: minisystem> ccdb.sh -c repairdb all backup-2015-09-14-18-51-47.tar DLMDB 
    DANGER: You are going to perform a danger command. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Enter "I have read and understand the consequences associated with performing this operation." to confirm running this command. 
    I have read and understand the consequences associated with performing this operation. 
    DANGER: You are going to perform a danger command, this behavior causes database service interruption. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Are you sure you really want to perform the operation?(y/n) 
    y 
    admin:/diagnose>ccdb stopserver 
    stop CCDB server success. 
    admin:/diagnose>exit 
    CCDB stop peer service. 
    admin:/diagnose>ccdb recoveryccdb 2 backup-2015-09-14-18-51-47.tar DLMDB 
    recover CCDB db success. 
    admin:/diagnose>exit 
    Storage: minisystem>
  • 查询脏节点数据标记。
    Storage: minisystem> ccdb.sh -c showccdbdirtyflag mem 
    admin:/diagnose>ccdbDirty showmemflag 
    nodeid:0, type:0, flag:1  
    nodeid:0, type:1, flag:1  
    nodeid:0, type:2, flag:1  
    nodeid:1, type:0, flag:1  
    nodeid:1, type:1, flag:1  
    nodeid:1, type:2, flag:1  
    nodeid:2, type:0, flag:2  
    nodeid:2, type:1, flag:2  
    nodeid:2, type:2, flag:0  
    nodeid:3, type:0, flag:2  
    nodeid:3, type:1, flag:2  
    nodeid:3, type:2, flag:0  
    nodeid:4, type:0, flag:2  
    nodeid:4, type:1, flag:2  
    nodeid:4, type:2, flag:0  
    nodeid:5, type:0, flag:2  
    nodeid:5, type:1, flag:2  
    nodeid:5, type:2, flag:0  
    nodeid:6, type:0, flag:2  
    nodeid:6, type:1, flag:2  
    nodeid:6, type:2, flag:0  
    nodeid:7, type:0, flag:2  
    nodeid:7, type:1, flag:2  
    nodeid:7, type:2, flag:0  
    admin:/diagnose>exit 
    Storage: minisystem> ccdb.sh -c showccdbdirtyflag disk            
    admin:/diagnose>ccdbDirty showdiskflag 
     disk dirty flag magic:0xabcd5555.  
     disk dirty flag version:1.  
    nodeid:0, type:0, flag:1  
    nodeid:0, type:1, flag:1  
    nodeid:0, type:2, flag:0  
    nodeid:1, type:0, flag:1  
    nodeid:1, type:1, flag:1  
    nodeid:1, type:2, flag:0  
    nodeid:2, type:0, flag:2  
    nodeid:2, type:1, flag:2  
    nodeid:2, type:2, flag:0  
    nodeid:3, type:0, flag:2  
    nodeid:3, type:1, flag:2  
    nodeid:3, type:2, flag:0  
    nodeid:4, type:0, flag:2  
    nodeid:4, type:1, flag:2  
    nodeid:4, type:2, flag:0  
    nodeid:5, type:0, flag:2  
    nodeid:5, type:1, flag:2  
    nodeid:5, type:2, flag:0  
    nodeid:6, type:0, flag:2  
    nodeid:6, type:1, flag:2  
    nodeid:6, type:2, flag:0  
    nodeid:7, type:0, flag:2  
    nodeid:7, type:1, flag:2  
    nodeid:7, type:2, flag:0  
    admin:/diagnose>exit
  • 设置脏节点数据标记。
    Storage: minisystem> ccdb.sh -c setccdbdirtyflag 0 2 1 
    DANGER: You are going to perform a danger command. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Enter "I have read and understand the consequences associated with performing this operation." to confirm running this command. 
    I have read and understand the consequences associated with performing this operation. 
    DANGER: You are going to perform a danger command, this behavior causes database service interruption. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Are you sure you really want to perform the operation?(y/n) 
    y 
    admin:/diagnose>ccdbDirty setflag 0 2 1 
    nodeid:0, type:2, flag:1 successfully.  
    admin:/diagnose>exit
  • 重置脏节点数据标记。
    Storage: minisystem> ccdb.sh -c resetccdbdirtyflag 
    DANGER: You are going to perform a danger command. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Enter "I have read and understand the consequences associated with performing this operation." to confirm running this command. 
    I have read and understand the consequences associated with performing this operation. 
    DANGER: You are going to perform a danger command, this behavior causes database service interruption. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Are you sure you really want to perform the operation?(y/n) 
    y 
    admin:/diagnose>ccdbDirty setdefaultflag 
    set ccdb dirty default flag successfully.  
    admin:/diagnose>exit 
    Storage: minisystem>
  • 清理CCDB RAID信息。此命令将会停止CCDB服务,可以执行命令“ccdb.sh -c startccdb all”重启CCDB服务。
    Storage: minisystem> ccdb.sh -c clearccdbblkraidinfo 
    DANGER: You are going to perform a danger command. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Enter "I have read and understand the consequences associated with performing this operation." to confirm running this command. 
    I have read and understand the consequences associated with performing this operation. 
    DANGER: You are going to perform a danger command, this behavior causes database service interruption. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Are you sure you really want to perform the operation?(y/n) 
    y 
    admin:/diagnose>ccdb stopserver 
    stop CCDB server success. 
    admin:/diagnose>exit 
    CCDB stop peer service. 
    admin:/diagnose>blkRaid clearBlkRaid 0 
    clear module[0] blkRaid ok 
    admin:/diagnose>exit
  • 查询CCDB RAID信息。
    Storage: minisystem> ccdb.sh -c showccdbblkraidinfo 
    admin:/diagnose>blkRaid showDiskSuper 0 
    ******************BLK RAID DISK SUPER INFO *********** 
    moduleId    = 0  
    diskId      = 0xc  
     magic       = 0xabab2015  
     productSn    = 2102350BSE10G6000067  
     serialNum   = 0x17  
     crc         = 0  
     Create UTC time   =2017-11-10 : 8 : 3 :19  
     Save UTC time   =2017-11-10 : 8 : 26 :49  
    moduleId    = 0  
    diskId      = 0xd  
     magic       = 0xabab2015  
     productSn    = 2102350BSE10G6000067  
     serialNum   = 0x17  
     crc         = 0  
     Create UTC time   =2017-11-10 : 8 : 3 :19  
     Save UTC time   =2017-11-10 : 8 : 26 :49  
    moduleId    = 0  
    diskId      = 0xe  
     magic       = 0xabab2015  
     productSn    = 2102350BSE10G6000067  
     serialNum   = 0x17  
     crc         = 0  
     Create UTC time   =2017-11-10 : 8 : 3 :19  
     Save UTC time   =2017-11-10 : 8 : 26 :49  
    moduleId    = 0  
    diskId      = 0xf  
     magic       = 0xabab2015  
     productSn    = 2102350BSE10G6000067  
     serialNum   = 0x17  
     crc         = 0  
     Create UTC time   =2017-11-10 : 8 : 3 :19  
     Save UTC time   =2017-11-10 : 8 : 26 :49  
    admin:/diagnose>exit
  • 重置CCDB开工等待时间。
    Storage: minisystem> ccdb.sh -c resetstarttime 
    admin:/diagnose>mon resetstarttime 
    reset start time success. 
    admin:/diagnose>exit
  • 检查CCDB使用块设备状态。
    Storage: minisystem> ccdb.sh -c checkmd 
    admin:/diagnose>ccdb checkmd 
    CCDB Raid Status:Normal 
    admin:/diagnose>exit 
    Storage: minisystem>
  • 从CCDB RAID中删除ld12a的盘。
    Storage: minisystem> ccdb.sh -c removemddisk ld12a 
    DANGER: You are going to perform a danger command, this behavior causes database service interruption. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Are you sure you really want to perform the operation?(y/n) 
    y 
    remove md disk /dev/ld12a of md200 success
  • 将ld12a盘设置为故障。
    Storage: minisystem> ccdb.sh -c setfaultdisk 12 
    DANGER: You are going to perform a danger command, this behavior causes database service interruption. 
    Suggestion: Before you perform this operation, make sure that the operation will not affect working of system. 
    Have you read danger alert message carefully?(y/n) 
    y 
    Are you sure you really want to perform the operation?(y/n) 
    y 
    ibc_os_hs:/diagnose>ccdb setfaultdisk 12 
    set fault disk success. 
    ibc_os_hs:/diagnose>exit 
    Storage: minisystem> 

输出说明

无。

翻译
下载文档
更新时间:2019-07-17

文档编号:EDOC1100049100

浏览量:51762

下载量:66

平均得分:
本文档适用于这些产品
相关文档
相关版本
Share
上一页 下一页