1
// Copyright 2022 The CubeFS Authors.
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
7
// http://www.apache.org/licenses/LICENSE-2.0
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12
// implied. See the License for the specific language governing
13
// permissions and limitations under the License.
20
"github.com/cubefs/cubefs/blobstore/common/proto"
23
type DiskHeartBeatInfo struct {
24
DiskID proto.DiskID `json:"disk_id"`
25
Used int64 `json:"used"` // disk used space
26
Free int64 `json:"free"` // remaining free space on the disk
27
Size int64 `json:"size"` // total physical disk space
28
MaxChunkCnt int64 `json:"max_chunk_cnt"` // note: maintained by clustermgr
29
FreeChunkCnt int64 `json:"free_chunk_cnt"` // note: maintained by clustermgr
30
UsedChunkCnt int64 `json:"used_chunk_cnt"` // current number of chunks on the disk
34
ClusterID proto.ClusterID `json:"cluster_id"`
35
Idc string `json:"idc"`
36
Rack string `json:"rack"`
37
Host string `json:"host"`
38
Path string `json:"path"`
39
Status proto.DiskStatus `json:"status"` // normal、broken、repairing、repaired、dropped
40
Readonly bool `json:"readonly"`
41
CreateAt time.Time `json:"create_time"`
42
LastUpdateAt time.Time `json:"last_update_time"`
46
type ChunkInfo struct {
47
Id ChunkId `json:"id"`
48
Vuid proto.Vuid `json:"vuid"`
49
DiskID proto.DiskID `json:"diskid"`
50
Total uint64 `json:"total"` // ChunkSize
51
Used uint64 `json:"used"` // user data size
52
Free uint64 `json:"free"` // ChunkSize - Used
53
Size uint64 `json:"size"` // Chunk File Size (logic size)
54
Status ChunkStatus `json:"status"` // normal、readOnly
55
Compacting bool `json:"compacting"`
58
type ShardInfo struct {
59
Vuid proto.Vuid `json:"vuid"`
60
Bid proto.BlobID `json:"bid"`
61
Size int64 `json:"size"`
62
Crc uint32 `json:"crc"`
63
Flag ShardStatus `json:"flag"` // 1:normal,2:markDelete
64
Inline bool `json:"inline"`