For the globalcache Process
ccm list nodeList
- Function
Prints the information about all nodes.
- Syntax
ccm list nodeList
- Parameters
N/A
- Example
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
Table 1 describes the parameters in the example.
Table 1 Parameter description Field
Description
Example
nodeId
Node ID
0, indicating that the node is node 0 in the cluster.
state
Node status
NODE_STATE_INVALID: The node is invalid
NODE_STATE_UP: The node is being started.
NODE_STATE_RUNNING: The node has been started.
NODE_STATE_DOWN: The node is down and cannot work.
NODE_STATE_IN: The node is in the cluster.
NODE_STATE_OUT: The node is not in the cluster and can be added to the cluster after capacity expansion.
ip
Management network IP address
172.17.0.3
public ip
IP address for interaction between the client and server, which is on a public network segment.
192.168.0.3
cluster ip
IP address for interaction between Global Cache nodes, which is on a cluster network segment.
192.168.0.2
port
Port number
12345
portNum
Number of ports
1
diskNum
Number of drives on the node
2
diskList
Drive list.
Drive list format: [diskId, diskName, diskSn, capacity, state]. For details, see ccm list diskList.
ccm show clusterStatus
- Function
Views the cluster status.
- Syntax
ccm show clusterStatus
- Parameters
N/A
- Example
root:/mgrtool>ccm show clusterStatus CLUSTER_STATE_OK.
Table 2 describes the parameters in the example.Table 2 Parameter description Field
Description
Example
clusterStatus
Cluster status
CLUSTER_STATE_STARTING: The cluster is powered on.
CLUSTER_STATE_WARN: The cluster is in the WARN state.
CLUSTER_STATE_ERROR: The cluster is faulty.
CLUSTER_STATE_OK: The cluster is running properly.
CLUSTER_STATE_UNKNOWN: The cluster is in the UNKNOWN state.
PROTECTED_MODE: The cluster is protected.
ccm show ptView
- Function
Displays the partition (PT) view.
- Syntax
ccm show ptView
- Parameters
N/A
- Example
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)]
Table 3 describes the parameters in the example.Table 3 Parameter description Field
Description
Example
ptNum
Number of PTs
128
gv
PT view version
1
ptId
Unique ID of a PT
4
bv
PT version
3
state
PT status
PT_STATE_OK: The PT is in the OK state and can provide I/O services.
PT_STATE_NOK: The PT is in the NOK state and cannot provide I/O services.
indexInNode
Mapping index of a PT on the corresponding node, which is used for client request distribution calculation.
5
ptInfo
PT information. The first one is the current PT information, and the second one is the original PT information (for switchback after fault recovery).
({nodeId}, {diskId}, {vnodeId}). In each triplet, the first is the node ID, the second is the drive ID, and the third is the vnode ID.
ccm show pgView
- Function
Displays the PG view.
- Syntax
ccm show pgView
- Parameters
N/A
- Example
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>, ]
Table 4 describes the parameters in the example.Table 4 Parameter description Field
Description
Example
pgId
Unique ID of a PG
29
bv
Current PG version
1
masterNode
ID of the node where the primary PG copy resides.
1
masterDisk
ID of the drive where the primary PG copy resides.
2
state
PG status
PG_STATE_NORMAL: The PG is normal and can provide I/O services.
PG_STATE_DOWN: The PG is in the primary/secondary switchover state.
PG_STATE_DEGRADE_LOSS1: The PG is in the DEGRADE state and loses one copy.
PG_STATE_DEGRADE_LOSS2: The PG is in the DEGRADE state and loses two copies.
PG_STATE_RECOVERY: The PG is being restored.
PG_STATE_FAULT: The PG is faulty and cannot provide I/O services.
copyNum
Number of current PG copies
3
copyInfo
PG three-copy layout in the <nodeId, diskId, copyState> format
<3, 6, PG_COPY_STATE_RUNNING>. copyState can be:
PG_COPY_STATE_RUNNING: The copy is running.
PG_COPY_STATE_DOWN: The node or drive where the copy resides is in the Down state.
PG_COPY_STATE_OUT: The node or drive where the copy resides is in the OUT state.
PG_COPY_STATE_RECOVERY: The copy is being restored.
ccm list diskList
- Function
Displays the drive list.
- Syntax
ccm list diskList
- Parameters
N/A
- Example
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
Table 5 describes the parameters in the example.Table 5 Parameter description Field
Description
Example
diskId
Drive ID, which is globally unique.
1
diskName
Drive name
/dev/nvme0n1p13
diskSn
Drive SN
033FWJ10L3000868
capacity
Drive capacity
2837312 (MB)
state
Drive status
VDISK_STATE_UP: The drive is in the UP state and can provide I/O services.
VDISK_STATE_DOWN: The drive is in the DOWN state and cannot provide I/O services.
ccm show ptIoStat
- Function
Views I/O statistics such as the number of read and write requests received by each PT and the total request size.
- Syntax
ccm show ptIoStat
- Parameters
N/A
- Example
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. ...Table 6 describes the parameters in the example.Table 6 Parameter description Field
Description
Example
ptNum
Number of PTs in the cluster
128
ptId
ptID
0
ioCount
Total number of I/Os
2, indicating that the PT receives two requests.
readCount
Number of read requests
1, indicating that the PT receives one read request.
readSize
Total size of read requests
4096, indicating that 4 KB data is read from the PT.
writeCount
Number of write requests
1, indicating that the PT receives one write request.
writeSize
Total size of write requests
4096, indicating that 4 KB data is written to the PT.
ccm show pgViewOnNode
- Function
Displays all PGs on a node.
- Syntax
ccm show pgViewOnNode [nodeId]
- Parameters
nodeId indicates the node ID.
- Example
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
Table 4 describes the parameters in the example.
ccm show pgViewOnDisk
- Function
Displays all PGs on a drive.
- Syntax
ccm show pgViewOnDisk [DiskId]
- Parameters
diskId specifies the global ID of a drive.
- Example
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
Table 4 describes the parameters in the example.
ccm show ptViewOnNode
- Function
Displays all partitions on a node.
- Syntax
ccm show ptViewOnNode [nodeId]
- Parameters
nodeId indicates the node ID.
- Example
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
Table 3 describes the parameters in the example.
ccm show ptViewOnDisk
- Function
Displays all partitions on a drive.
- Syntax
ccm show ptViewOnDisk [DiskId]
- Parameters
DiskId specifies the global ID of a drive.
- Example
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
Table 3 describes the parameters in the example.
ccm get localdiskid
- Function
Obtains the local drive ID of a global drive ID on the current node.
- Syntax
ccm get localdiskid [globalDiskId]
- Parameters
globalDiskId specifies the global drive ID, which can be obtained by running the ccm list nodeList or ccm list diskList command.
- Example
root:/mgrtool>ccm get localdiskid 3 global_disk_id: 3 --- local_disk_id: 1
Table 7 describes the parameters in the example.
ccm show snapshot
- Function
Obtains the snapshot view.
- Syntax
ccm show snapshot
- Parameters
N/A
- Example
root:/mgrtool>ccm show snapshot poolNum is 1 poolId: 62, imageNum: 1 imageId: 117393341787926, snapshotNum: 1, [4, 1]
Table 8 describes the parameters in the example.
Table 8 Parameter description Field
Description
Example
poolNum
Number of pools that have snapshots.
1
poolId
ID of pools that have snapshots.
62, indicating that a snapshot is created for an image in Ceph pool 62.
imageNum
Number of Ceph images that have snapshots in the pool.
1
imageId
imgae ID
117393341787926
snapshotNum
Number of snapshots
1
snapshotList
Snapshot chain [{snapshotId}, {deletedFlag}]
snapshotId indicates the snapshot ID.
deletedFlag indicates whether the snapshot is deleted. The value 1 indicates that the snapshot is not deleted, and the value 0 indicates that the snapshot is deleted.
ccm show poolView
- Function
Obtains the IDs of all Ceph pools.
- Syntax
ccm show poolView
- Parameters
N/A
- Example
root:/mgrtool>ccm show poolView poolNum: 1 ------------------------------ poolId: 62, state: 1
Table 9 describes the parameters in the example.
Table 9 Parameter description Field
Description
Example
poolNum
Number of Ceph pools
1
poolId
Ceph Pool ID
62, indicating that Ceph pool 62 has been created. This command and the ceph df command can be used to verify each other.
state
Ceph pool status
1: CCM_POOL_STATE_RUNNING
2: CCM_POOL_STATE_DELETING
ccm show faultdomain
- Function
Queries the configuration of Global Cache fault domains.
- Syntax
ccm show faultdomain
- Parameters
N/A
ccm show version
- Function
Obtains the current Global Cache version.
- Syntax
ccm show version
- Parameters
N/A
- Example
root:/mgrtool>ccm show version Kunpeng BoostKit-globalcache 1.3.015
The version is displayed in the format of "product version + Global Cache software version". In the preceding example, Kunpeng BoostKit 22.0.RC2 is the product version, and Global Cache 1.3.013 is the Global Cache software version. In addition, the format of the Global Cache software version is "Global Cache software architecture version.large-granularity feature version.test version number". In the preceding example, 1 indicates the first architecture version, 3 indicates the capacity expansion feature, and 013 indicates the thirteenth test version.
Global Cache versions with the following large-granularity features have been released:
- Acceleration of block storage basic read/write (released in December 2021)
- Fault recovery (released in March 2022)
- Capacity expansion (released in June 2022)
- Pool-specific acceleration (released in October 2022)