连接Global Cache
ccm list nodeList
- 命令功能
ccm list nodeList命令用来打印所有节点信息。
- 命令格式
ccm list nodeList
- 参数说明
NA
- 使用实例
globalcache:/mgrtool>ccm list nodeList -NodeList------------------------------------------------------------ -currentNodeNum is 3 -configNodeNum is 3 nodeId: 0, state: NODE_STATE_RUNNING, NODE_STATE_IN, ip: 192.168.200.68, public ip: 192.168.200.68, cluster ip: 192.168.200.68, diskNum: 2, portNum: 2, port: 7880 7881 diskId: 0, diskName: /dev/nvme0n1p13, diskSn: 032VTYFSK3006305-13, capacity: 3600399(MB), state: VDISK_STATE_UP diskId: 1, diskName: /dev/nvme1n1p13, diskSn: 032VTYFSK3006016-13, capacity: 3600399(MB), state: VDISK_STATE_UP nodeId: 1, state: NODE_STATE_RUNNING, NODE_STATE_IN, ip: 192.168.200.70, public ip: 192.168.200.70, cluster ip: 192.168.200.70, diskNum: 2, portNum: 2, port: 7880 7881 diskId: 2, diskName: /dev/nvme0n1p13, diskSn: 032VTYFSK3006069-13, capacity: 3600399(MB), state: VDISK_STATE_UP diskId: 3, diskName: /dev/nvme1n1p13, diskSn: 032VTYFSK3006141-13, capacity: 3600399(MB), state: VDISK_STATE_UP nodeId: 2, state: NODE_STATE_RUNNING, NODE_STATE_IN, ip: 192.168.200.72, public ip: 192.168.200.72, cluster ip: 192.168.200.72, diskNum: 2, portNum: 2, port: 7880 7881 diskId: 4, diskName: /dev/nvme0n1p13, diskSn: 032VTYFSK3006009-13, capacity: 3600399(MB), state: VDISK_STATE_UP diskId: 5, diskName: /dev/nvme1n1p13, diskSn: 032VTYFSK3006064-13, capacity: 3600399(MB), state: VDISK_STATE_UP
实例中的相关参数释义如表1所示。
表1 参数释义 字段名
含义
举例
nodeId
节点编号
0,表示该节点为集群中第0个节点。
state
节点状态
NODE_STATE_INVALID,表示无效。
NODE_STATE_UP,表示节点正在启动。
NODE_STATE_RUNNING,表示节点启动完成。
NODE_STATE_DOWN,表示节点处于down状态,不能正常工作。
NODE_STATE_IN,表示节点在集群中。
NODE_STATE_OUT,表示节点不在集群中,等待扩容后加入集群。
ip
IP地址,管理网络IP地址
172.17.0.3
public ip
客户端与服务端交互IP地址,public网段
192.168.0.3
cluster ip
GlobalCache节点之间交互使用地址,cluster网段
192.168.0.2
port
端口号
12345
portNum
端口数量
1
diskNum
磁盘个数,表示该节点上的磁盘的个数
2
diskList
磁盘列表
磁盘列表信息[diskId, diskName, diskSn, capacity,state],详见ccm list diskList。
ccm show clusterStatus
- 命令功能
ccm show clusterStatus命令用来查看集群状态。
- 命令格式
ccm show clusterStatus
- 参数说明
无
- 使用实例
root:/mgrtool>ccm show clusterStatus CLUSTER_STATE_OK.
实例中相关参数释义如表2所示。
ccm show ptView
- 命令功能
ccm show ptView显示PT(Partition)视图。
- 命令格式
ccm show ptView
- 参数说明
NA
- 使用实例
root:/mgrtool>ccm show ptView -[ptView]----------------------------------------------------------------------------- -gv: 1 -ptNum: 90 ptId | bv | state| indexInNode | ptInfo 0 | 1 | PT_STATE_OK | 0 | [(0, 0, 0) (0, 0, 0)] 1 | 1 | PT_STATE_OK | 0 | [(1, 2, 4) (1, 2, 4)] 2 | 1 | PT_STATE_OK | 0 | [(2, 4, 8) (2, 4, 8)] 3 | 1 | PT_STATE_OK | 1 | [(0, 1, 1) (0, 1, 1)] 4 | 1 | PT_STATE_OK | 1 | [(1, 3, 5) (1, 3, 5)] 5 | 1 | PT_STATE_OK | 1 | [(2, 5, 9) (2, 5, 9)] 6 | 1 | PT_STATE_OK | 2 | [(0, 0, 2) (0, 0, 2)] 7 | 1 | PT_STATE_OK | 2 | [(1, 2, 6) (1, 2, 6)]
实例中相关参数释义如表3所示。表3 参数释义 字段
含义
举例
ptNum
总PT数量
128
gv
globalVerSion(PT视图版本号)
1
ptId
PT唯一标识ID
4
bv
PT的版本号
3
state
PT状态
PT_STATE_OK: PT处于OK状态,可以服务IO
PT_STATE_NOK: PT处于NOK状态,不可以服务IO
indexInNode
PT在对应节点上的映射索引,用于客户端请求分发运算
5
ptInfo
pt信息,第一个为PT当前信息,第二个为PT的原始信息(用于故障恢复后回切)
({nodeId}, {diskId}, {vnodeId}),每个3元组的第一个为NodeId,第二个为磁盘ID,第三个为VnodeID
ccm show pgView
- 命令功能
ccm show pgView显示PG视图。
- 命令格式
ccm show pgView
- 参数说明
无
- 使用实例
root:/mgrtool>ccm show pgView -[pgView]----------------------------------------------------------------------------- -globalVersion is 0 -pgNum is 180 -copyNum is 3 pgId | bv | masterNode | masterDisk | state | coyNum | copyInfo 0 | 1 | 0 | 0 | PG_STATE_NORMAL | 3 |[<0, 0, PG_COPY_STATE_RUNNING>, <1, 2, PG_COPY_STATE_RUNNING>, <2, 4, PG_COPY_STATE_RUNNING>, ] 1 | 1 | 1 | 2 | PG_STATE_NORMAL | 3 |[<1, 2, PG_COPY_STATE_RUNNING>, <0, 0, PG_COPY_STATE_RUNNING>, <2, 5, PG_COPY_STATE_RUNNING>, ] 2 | 1 | 2 | 4 | PG_STATE_NORMAL | 3 |[<2, 4, PG_COPY_STATE_RUNNING>, <0, 1, PG_COPY_STATE_RUNNING>, <1, 2, PG_COPY_STATE_RUNNING>, ] 3 | 1 | 0 | 1 | PG_STATE_NORMAL | 3 |[<0, 1, PG_COPY_STATE_RUNNING>, <2, 4, PG_COPY_STATE_RUNNING>, <1, 3, PG_COPY_STATE_RUNNING>, ]
实例中相关参数释义如表4所示。表4 参数释义 字段
含义
举例
pgId
PG唯一标识ID
29
bv
当前PG的版本号
1
masterNode
PG主副本所在节点ID
1
masterDisk
PG主副本所在的磁盘ID
2
state
PG状态
PG_STATE_NORMAL:正常状态,可以服务IO
PG_STATE_DOWN:PG处于切主状态
PG_STATE_DEGRADE_LOSS1: PG处于降级状态,丢失一个副本
PG_STATE_DEGRADE_LOSS2: PG处于降级状态,丢失两个副本
PG_STATE_RECOVERY:PG正处于恢复状态
PG_STATE_FAULT:PG处于故障状态,不能提供IO服务
copyNum
PG当前副本数量
3
copyInfo
PG三副本布局情况<nodeId, diskId, copyState>
<3, 6, PG_COPY_STATE_RUNNING>, copyState有如下值:
PG_COPY_STATE_RUNNING:副本处于运行状态
PG_COPY_STATE_DOWN:副本所在节点或者磁盘处于DOWN状态
PG_COPY_STATE_OUT:副本所在节点或者磁盘处于OUT状态
PG_COPY_STATE_RECOVERY:副本处于恢复状态
ccm list diskList
- 命令功能
ccm list diskList命令用来查看disk列表。
- 命令格式
ccm list diskList
- 参数说明
NA
- 使用实例
root:/mgrtool>ccm list diskList -----------DiskList--------------- diskId: 0, diskName: /dev/nvme0n1p13, diskSn: 033FWJ10L3000868-13, capacity: 2837312(MB), state: VDISK_STATE_UP diskId: 1, diskName: /dev/nvme1n1p13, diskSn: 033FWJ10L3001092-13, capacity: 2837312(MB), state: VDISK_STATE_UP diskId: 2, diskName: /dev/nvme0n1p13, diskSn: 033FWJ10L3001101-13, capacity: 2837312(MB), state: VDISK_STATE_UP diskId: 3, diskName: /dev/nvme1n1p13, diskSn: 033FWJ10L3000963-13, capacity: 2837312(MB), state: VDISK_STATE_UP diskId: 4, diskName: /dev/nvme0n1p13, diskSn: 032VTYFSK3006091-13, capacity: 3600399(MB), state: VDISK_STATE_UP diskId: 5, diskName: /dev/nvme1n1p13, diskSn: 033FWJ10L3001165-13, capacity: 2837312(MB), state: VDISK_STATE_UP
实例中相关参数释义如表5所示。
ccm show ptIoStat
- 命令功能
ccm show ptIoStat命令用来展示每个PT接收到的读写请求个数和请求总大小等IO统计信息。
- 命令格式
ccm show ptIoStat
- 参数说明
NA
- 使用实例
root:/mgrtool>ccm show ptIoStat ------iostat--------- ptNum: 128 ptId: 0, ioCount: 2, readCount: 1, readSize: 4096, writeCount: 1: writeSize: 4096. ptId: 1, ioCount: 0, readCount: 0, readSize: 0, writeCount: 0: writeSize: 0. ptId: 2, ioCount: 0, readCount: 0, readSize: 0, writeCount: 0: writeSize: 0. ptId: 3, ioCount: 0, readCount: 0, readSize: 0, writeCount: 0: writeSize: 0. ptId: 4, ioCount: 0, readCount: 0, readSize: 0, writeCount: 0: writeSize: 0. ptId: 5, ioCount: 0, readCount: 0, readSize: 0, writeCount: 0: writeSize: 0. ptId: 6, ioCount: 0, readCount: 0, readSize: 0, writeCount: 0: writeSize: 0. ptId: 7, ioCount: 0, readCount: 0, readSize: 0, writeCount: 0: writeSize: 0. ptId: 8, ioCount: 0, readCount: 0, readSize: 0, writeCount: 0: writeSize: 0. ptId: 9, ioCount: 0, readCount: 0, readSize: 0, writeCount: 0: writeSize: 0. ...
实例中相关参数释义如表6所示。
ccm show pgViewOnNode
- 命令功能
ccm show pgViewOnNode显示某个节点上的所有PG。
- 命令格式
ccm show pgViewOnNode [nodeId]
- 参数说明
nodeId:节点ID
- 使用实例
root:/mgrtool>ccm show pgViewOnNode 1 primaryPg: pgId | bv | masterNode | masterDisk | state | coyNum | copyInfo 1 | 1 | 1 | 2 | PG_STATE_NORMAL | 3 |[<1, 2, PG_COPY_STATE_RUNNING>, <2, 4, PG_COPY_STATE_RUNNING>, <0, 0, PG_COPY_STATE_RUNNING>, ] 5 | 1 | 1 | 3 | PG_STATE_NORMAL | 3 |[<1, 3, PG_COPY_STATE_RUNNING>, <0, 0, PG_COPY_STATE_RUNNING>, <3, 6, PG_COPY_STATE_RUNNING>, ] 9 | 1 | 1 | 2 | PG_STATE_NORMAL | 3 |[<1, 2, PG_COPY_STATE_RUNNING>, <3, 7, PG_COPY_STATE_RUNNING>, <0, 1, PG_COPY_STATE_RUNNING>, ] 13 | 1 | 1 | 3 | PG_STATE_NORMAL | 3 |[<1, 3, PG_COPY_STATE_RUNNING>, <2, 5, PG_COPY_STATE_RUNNING>, <0, 1, PG_COPY_STATE_RUNNING>, ] 17 | 1 | 1 | 2 | PG_STATE_NORMAL | 3 |[<1, 2, PG_COPY_STATE_RUNNING>, <2, 4, PG_COPY_STATE_RUNNING>, <3, 6, PG_COPY_STATE_RUNNING>, ] 21 | 1 | 1 | 3 | PG_STATE_NORMAL | 3 |[<1, 3, PG_COPY_STATE_RUNNING>, <0, 0, PG_COPY_STATE_RUNNING>, <3, 7, PG_COPY_STATE_RUNNING>, ] 25 | 1 | 1 | 2 | PG_STATE_NORMAL | 3 |[<1, 2, PG_COPY_STATE_RUNNING>, <3, 7, PG_COPY_STATE_RUNNING>, <2, 5, PG_COPY_STATE_RUNNING>, ] 29 | 1 | 1 | 3 | PG_STATE_NORMAL | 3 |[<1, 3, PG_COPY_STATE_RUNNING>, <2, 5, PG_COPY_STATE_RUNNING>, <0, 1, PG_COPY_STATE_RUNNING>, ] secondaryPg: pgId | bv | masterNode | masterDisk | state | coyNum | copyInfo 0 | 1 | 0 | 0 | PG_STATE_NORMAL | 3 |[<0, 0, PG_COPY_STATE_RUNNING>, <1, 2, PG_COPY_STATE_RUNNING>, <3, 6, PG_COPY_STATE_RUNNING>, ] 2 | 1 | 2 | 4 | PG_STATE_NORMAL | 3 |[<2, 4, PG_COPY_STATE_RUNNING>, <3, 6, PG_COPY_STATE_RUNNING>, <1, 2, PG_COPY_STATE_RUNNING>, ] 6 | 1 | 2 | 5 | PG_STATE_NORMAL | 3 |[<2, 5, PG_COPY_STATE_RUNNING>, <1, 2, PG_COPY_STATE_RUNNING>, <0, 0, PG_COPY_STATE_RUNNING>, ] 7 | 1 | 3 | 7 | PG_STATE_NORMAL | 3 |[<3, 7, PG_COPY_STATE_RUNNING>, <2, 4, PG_COPY_STATE_RUNNING>, <1, 2, PG_COPY_STATE_RUNNING>, ] 10 | 1 | 2 | 4 | PG_STATE_NORMAL | 3 |[<2, 4, PG_COPY_STATE_RUNNING>, <0, 1, PG_COPY_STATE_RUNNING>, <1, 3, PG_COPY_STATE_RUNNING>, ] 11 | 1 | 3 | 6 | PG_STATE_NORMAL | 3 |[<3, 6, PG_COPY_STATE_RUNNING>, <1, 3, PG_COPY_STATE_RUNNING>, <2, 5, PG_COPY_STATE_RUNNING>, ] total: primaryPg: 32, secondaryPg: 64
实例中相关参数释义如表4所示。
ccm show pgViewOnDisk
- 命令功能
ccm show pgViewOnDisk显示某个磁盘上的所有PG。
- 命令格式
ccm show pgViewOnDisk [DiskId]
- 参数说明
diskId: 磁盘的全局ID
- 使用实例
root:/mgrtool>ccm show pgViewOnDisk 1 primaryPg: pgId | bv | masterNode | masterDisk | state | coyNum | copyInfo 4 | 1 | 0 | 1 | PG_STATE_NORMAL | 3 |[<0, 1, PG_COPY_STATE_RUNNING>, <3, 6, PG_COPY_STATE_RUNNING>, <2, 4, PG_COPY_STATE_RUNNING>, ] 12 | 1 | 0 | 1 | PG_STATE_NORMAL | 3 |[<0, 1, PG_COPY_STATE_RUNNING>, <1, 3, PG_COPY_STATE_RUNNING>, <3, 7, PG_COPY_STATE_RUNNING>, ] 20 | 1 | 0 | 1 | PG_STATE_NORMAL | 3 |[<0, 1, PG_COPY_STATE_RUNNING>, <3, 6, PG_COPY_STATE_RUNNING>, <2, 5, PG_COPY_STATE_RUNNING>, ] 28 | 1 | 0 | 1 | PG_STATE_NORMAL | 3 |[<0, 1, PG_COPY_STATE_RUNNING>, <1, 3, PG_COPY_STATE_RUNNING>, <3, 7, PG_COPY_STATE_RUNNING>, ] secondaryPg: pgId | bv | masterNode | masterDisk | state | coyNum | copyInfo 9 | 1 | 1 | 2 | PG_STATE_NORMAL | 3 |[<1, 2, PG_COPY_STATE_RUNNING>, <3, 7, PG_COPY_STATE_RUNNING>, <0, 1, PG_COPY_STATE_RUNNING>, ] 10 | 1 | 2 | 4 | PG_STATE_NORMAL | 3 |[<2, 4, PG_COPY_STATE_RUNNING>, <0, 1, PG_COPY_STATE_RUNNING>, <1, 3, PG_COPY_STATE_RUNNING>, ] 13 | 1 | 1 | 3 | PG_STATE_NORMAL | 3 |[<1, 3, PG_COPY_STATE_RUNNING>, <2, 5, PG_COPY_STATE_RUNNING>, <0, 1, PG_COPY_STATE_RUNNING>, ] 15 | 1 | 3 | 7 | PG_STATE_NORMAL | 3 |[<3, 7, PG_COPY_STATE_RUNNING>, <0, 1, PG_COPY_STATE_RUNNING>, <2, 5, PG_COPY_STATE_RUNNING>, ] total: primaryPg: 16, secondaryPg: 33
实例中相关参数如表4所示。
ccm show ptViewOnNode
- 命令功能
ccm show ptViewOnNode显示某个节点上的所有PT。
- 命令格式
ccm show ptViewOnNode [nodeId]
- 参数说明
nodeId:节点ID
- 使用实例
root:/mgrtool>ccm show ptViewOnNode 0 ptView: ptId | bv | state | indexInNode | ptInfo 0 | 1 | PT_STATE_OK | 0 | [(0, 0, 0), (0, 0, 0)] 3 | 1 | PT_STATE_OK | 1 | [(0, 1, 1), (0, 1, 1)] 6 | 1 | PT_STATE_OK | 2 | [(0, 0, 2), (0, 0, 2)] 9 | 1 | PT_STATE_OK | 3 | [(0, 1, 3), (0, 1, 3)] 12 | 1 | PT_STATE_OK | 4 | [(0, 0, 0), (0, 0, 0)] 15 | 1 | PT_STATE_OK | 5 | [(0, 1, 1), (0, 1, 1)] 18 | 1 | PT_STATE_OK | 6 | [(0, 0, 2), (0, 0, 2)] total: ptNum: 30
实例中相关参数释义如表3所示。
ccm show ptViewOnDisk
- 命令功能
ccm show ptViewOnDisk显示某个磁盘上的所有PT。
- 命令格式
ccm show ptViewOnDisk [DiskId]
- 参数说明
DiskId: 磁盘的全局ID
- 使用实例
root:/mgrtool>ccm show ptViewOnDisk 0 ptView: ptId | bv | state | indexInNode | ptInfo 0 | 1 | PT_STATE_OK | 0 | [(0, 0, 0), (0, 0, 0)] 6 | 1 | PT_STATE_OK | 2 | [(0, 0, 2), (0, 0, 2)] 12 | 1 | PT_STATE_OK | 4 | [(0, 0, 0), (0, 0, 0)] 18 | 1 | PT_STATE_OK | 6 | [(0, 0, 2), (0, 0, 2)] 24 | 1 | PT_STATE_OK | 8 | [(0, 0, 0), (0, 0, 0)] 30 | 1 | PT_STATE_OK | 10 | [(0, 0, 2), (0, 0, 2)] total: ptNum: 15
实例中相关参数释义如表3所示。
ccm get localdiskid
- 命令功能
ccm get localdiskid用于获取一个全局磁盘ID在当前节点上的本地磁盘ID。
- 命令格式
ccm get localdiskid [globalDiskId]
- 参数说明
globalDiskId:全局diskID(可以通过ccm list nodeList或者ccm list diskList获取)
- 使用实例
root:/mgrtool>ccm get localdiskid 3 global_disk_id: 3 --- local_disk_id: 1
实例中相关参数释义如表7所示。
ccm show snapshot
- 命令功能
ccm show snapshot用于获取快照视图。
- 命令格式
ccm show snapshot
- 参数说明
NA
- 使用实例
root:/mgrtool>ccm show snapshot poolNum is 1 poolId: 62, imageNum: 1 imageId: 117393341787926, snapshotNum: 1, [4, 1]
实例中相关参数释义如表8所示。
ccm show poolView
- 命令功能
ccm show poolView用于获取当前Ceph中所有Pool的ID。
- 命令格式
ccm show poolView
- 参数说明
NA
- 使用实例
root:/mgrtool>ccm show poolView poolNum: 1 ------------------------------ poolId: 62, state: 1
实例中相关参数释义如表9所示。
ccm show faultdomain
- 命令功能
ccm show faultdomain查询GlobalCache故障域配置信息。
- 命令格式
ccm show faultdomain
- 参数说明
NA
ccm show version
- 命令功能
ccm show version用于获取当前Global Cache的版本。
- 命令格式
ccm show version
- 参数说明
NA
- 使用实例
root:/mgrtool>ccm show version Kunpeng BoostKit-globalcache 1.3.015.SPC2
版本显示格式为“产品名-Global Cache软件版本号”,如以上实例中:
- Kunpeng BoostKit是产品名称。
- globalcache 1.3.015.SPC2是Global Cache软件版本号。其中,一般Global Cache软件版本号的结构为“Global Cache + 软件架构版本 + 大颗粒特性版本 + 转测版本序号”,即Global Cache 1(第一个架构版本).3(支持扩容特性).015(第15次转测版本)。此次为补丁版本,SPC是补丁号。