feat(doc): modification of blobstore single-machine deployment configuration

. #1000820716

Signed-off-by: zhumingze <zhumingze@oppo.com>
This commit is contained in:
zhumingze 2026-03-26 16:22:34 +08:00 committed by slasher
parent 37752c6dd8
commit d97edc3783
15 changed files with 43 additions and 27 deletions

3
.gitignore vendored
View File

@ -7,6 +7,7 @@ build/bin
build/include/
build/lib/
build/out/
build/run/
docker/bin
docker/docker_data
docker/log
@ -25,3 +26,5 @@ java/src/main/resources/*.so
blobstore/cpp/build
blobstore/cpp/**/*.pb.cc
blobstore/cpp/**/*.pb.h
blobstore/run/
.cursor

View File

@ -1,5 +1,11 @@
{
"bind_addr": ":9500",
"service_register": {
"consul_addr": "127.0.0.1:8500",
"service_ip": "127.0.0.1",
"node": "access-node1",
"health_port": [9700, 9799]
},
"log": {
"level": "info",
"filename": "./run/logs/access.log"

View File

@ -30,9 +30,14 @@
"disk_reserved_space_B": 1,
"compact_reserved_space_B": 1,
"data_qos": {
"read_mbps": 100,
"write_mbps": 60,
"background_mbps": 20
"disk_bandwidth_mb": 100,
"disk_iops": 2000,
"level": {
"read": {"mbps": 100, "concurrency": 64},
"write": {"mbps": 60, "concurrency": 64},
"delete": {"mbps": 60, "concurrency": 32},
"background": {"mbps": 20, "concurrency": 32}
}
}
},
"log": {

View File

@ -40,7 +40,7 @@
}
},
"volume_mgr_config":{
"allocatable_size":1048576
"allocatable_size":16777216
},
"disk_mgr_config": {
"refresh_interval_s": 10,

View File

@ -40,7 +40,7 @@
}
},
"volume_mgr_config":{
"allocatable_size":1048576
"allocatable_size":16777216
},
"disk_mgr_config": {
"refresh_interval_s": 10,

View File

@ -40,7 +40,7 @@
}
},
"volume_mgr_config":{
"allocatable_size":1048576
"allocatable_size":16777216
},
"disk_mgr_config": {
"refresh_interval_s": 10,

View File

@ -42,8 +42,8 @@ function INIT()
touch ./build/bin/blobstore/profile
fi
echo "export JAVA_HOME=$rootPath/build/bin/blobstore/jdk1.8.0_321" > ./build/bin/blobstore/profile
echo "export PATH=$JAVA_HOME/bin:$PATH" >> ./build/bin/blobstore/profile
echo "export CLASSPATH=$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar" >> ./build/bin/blobstore/profile
echo 'export PATH="$JAVA_HOME/bin:$PATH"' >> ./build/bin/blobstore/profile
echo 'export CLASSPATH="$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar"' >> ./build/bin/blobstore/profile
source build/bin/blobstore/profile
fi

View File

@ -17,7 +17,8 @@ CubeFS 使用 **JSON** 作为配置文件的格式.
| walDir | string | raft wal日志存储目录. | 是 | |
| storeDir | string | RocksDB数据存储目录.此目录必须存在,如果目录不存在,无法启动服务 | 是 | |
| clusterName | string | 集群名字 | 是 | |
| ebsAddr | string | 纠删码子系统的地址,使用纠删码子系统时需配置 | 否 | |
| ebsAddr | string | Access 所使用的 Consul Agent 地址(`host:port`),客户端经此发现 Access。使用 BlobStore 卷时需与 `ebsServicePath` 同时配置。 | 否 | |
| ebsServicePath | string | Access 在 Consul 中注册的服务名,未显式配置时一般为 `access`。 | 否 | |
| exporterPort | int | prometheus获取监控数据端口 | 否 | |
| consulAddr | string | consul注册地址供prometheus exporter使用 | 否 | |
| metaNodeReservedMem | string | 元数据节点预留内存大小,单位:字节 | 否 | 1073741824 |

View File

@ -86,7 +86,7 @@ start blobstore service successfully, wait minutes for internal state preparatio
$>
```
纠删码子系统部署成功之后,修改 Master 配置文件中的 `ebsAddr` 配置项([更多配置参考](../ops/configs/master.md)),配置为 Access 节点注册的 Consul 地址,默认为`http://localhost:8500`
纠删码子系统部署成功之后,修改 Master 配置文件中的 `ebsAddr` `ebsServicePath`[更多配置参考](../ops/configs/master.md)`ebsAddr` 为 Access 节点注册的 Consul 地址,须与`access.conf` 里 `service_register.consul_addr` 一致,单机环境常见为 `127.0.0.1:8500``ebsServicePath` 为 Access 在 Consul 中注册的服务名,未显式配置时一般为 `access`
#### 停止集群
+ 使用脚本将会 stop server 和挂载点

View File

@ -90,11 +90,11 @@ $> ./bin/blobstore-cli -c conf/blobstore-cli.conf
# 上传一个文件,成功后会返回存储位置 (-d 参数后跟实际数据)
$> access put -v -d "test -data-"
#"code_mode":11 编码模式对应EC3P3
{"cluster_id":1,"code_mode":10,"size":11,"blob_size":8388608,"crc":2359314771,"blobs":[{"min_bid":1844899,"vid":158458,"count":1}]}
{"cluster_id":1,"code_mode":11,"size":11,"blob_size":4194304,"crc":2169337493,"blobs":[{"min_bid":2,"vid":7,"count":1}]}
# 下载文件
$> access get -v -l '{"cluster_id":1,"code_mode":10,"size":11,"blob_size":8388608,"crc":2359314771,"blobs":[{"min_bid":1844899,"vid":158458,"count":1}]}'
$> access get -v -l '{"cluster_id":1,"code_mode":11,"size":11,"blob_size":4194304,"crc":2169337493,"blobs":[{"min_bid":2,"vid":7,"count":1}]}'
# 删除文件
$> access del -v -l '{"cluster_id":1,"code_mode":10,"size":11,"blob_size":8388608,"crc":2359314771,"blobs":[{"min_bid":1844899,"vid":158458,"count":1}]}'
$> access del -v -l '{"cluster_id":1,"code_mode":11,"size":11,"blob_size":4194304,"crc":2169337493,"blobs":[{"min_bid":2,"vid":7,"count":1}]}'
```

View File

@ -30,13 +30,13 @@ curl -v "http://127.0.0.1:17010/vol/expand?name=test&authKey=57f0162b2303be3449c
如果有部署 Blobstore 纠删码子系统,可以创建纠删码卷以存放冷数据
```bash
curl -v 'http://127.0.0.1:17010/admin/createVol?name=test-cold&capacity=100&owner=cfs&volType=1'
curl -v 'http://127.0.0.1:17010/admin/createVol?name=test-cold&capacity=100&owner=cfs&volStorageClass=3'
```
- name卷名
- capacity卷配额如果配额用完之后需要扩容
- owner卷的所属用户
- volType卷类型0为副本卷1为纠删码卷默认为0
- volStorageClass卷存储类型。1 为 SSD 副本卷2 为 HDD 副本卷3 为纠删码卷BlobStore默认为 0由 master 自动选择)
## 开启多级缓存
@ -44,13 +44,13 @@ curl -v 'http://127.0.0.1:17010/admin/createVol?name=test-cold&capacity=100&owne
**缓存读数据**
```bash
curl -v 'http://127.0.0.1:17010/admin/createVol?name=test-cold&capacity=100&owner=cfs&volType=1&cacheCap=10&cacheAction=1'
curl -v 'http://127.0.0.1:17010/admin/createVol?name=test-cold&capacity=100&owner=cfs&volStorageClass=3&cacheCap=10&cacheAction=1'
```
- name卷名
- capacity卷配额如果配额用完之后需要扩容
- owner卷的所属用户
- volType卷类型0为副本卷1为纠删码卷默认为0
- volStorageClass卷存储类型。1 为 SSD 副本卷2 为 HDD 副本卷3 为纠删码卷BlobStore默认为 0由 master 自动选择)
- cacheCap缓存大小单位GB
- cacheAction缓存类型0表示不缓存1表示缓存读2表示缓存读写默认0
@ -63,6 +63,6 @@ curl -v 'http://127.0.0.1:17010/admin/createVol?name=test-cold&capacity=100&owne
- name卷名
- capacity卷配额如果配额用完之后需要扩容
- owner卷的所属用户
- volType卷类型0为副本卷1为纠删码卷默认为0
- volStorageClass卷存储类型。1 为 SSD 副本卷2 为 HDD 副本卷3 为纠删码卷BlobStore默认为 0由 master 自动选择)
- cacheCap缓存大小单位GB
- cacheAction缓存类型0表示不缓存1表示缓存读2表示缓存读写默认0

View File

@ -17,7 +17,8 @@ CubeFS uses **JSON** as the format of the configuration file.
| walDir | string | Directory for storing Raft WAL logs. | Yes | |
| storeDir | string | Directory for storing RocksDB data. This directory must exist. If the directory does not exist, the service cannot be started. | Yes | |
| clusterName | string | Cluster name | Yes | |
| ebsAddr | string | Address of the erasure coding subsystem. This must be configured when using the erasure coding subsystem. | No | |
| ebsAddr | string | Consul agent address (`host:port`) used by Access for registration; clients use it to discover Access. Configure together with `ebsServicePath` when using BlobStore volumes. | No | |
| ebsServicePath | string | Consul service name under which Access registers, typically `access` when not overridden. | No | |
| exporterPort | int | Port for Prometheus to obtain monitoring data | No | |
| consulAddr | string | Consul registration address, used by Prometheus exporter | No | |
| metaNodeReservedMem | string | Reserved memory size for metadata nodes, in bytes | No | 1073741824 |

View File

@ -86,7 +86,7 @@ start blobstore service successfully, wait minutes for internal state preparatio
$>
```
After the erasure code subsystem is deployed successfully, modify the `ebsAddr` configuration item in the Master configuration file ([more configuration reference](../ops/configs/master.md)) to the Consul address registered by the Access node, which is `http://localhost:8500` by default.
After the erasure code subsystem is deployed successfully, update the Master configuration file with `ebsAddr` and `ebsServicePath` ([more configuration reference](../ops/configs/master.md)): set `ebsAddr` to the Consul agent address used by Access, which must match `service_register.consul_addr` in `access.conf` (for example `127.0.0.1:8500` in a single-node setup); set `ebsServicePath` to Consul service name under which Access registers, typically `access` when not overridden.
#### Stop the Cluster
+ The script will stop the server and the mount point

View File

@ -92,11 +92,11 @@ $> ./bin/blobstore-cli -c conf/blobstore-cli.conf
$> access put -v -d "test -data-"
# Return result
#"code_mode":11 is the encoding mode specified in the clustermgr configuration file, and 11 is the EC3P3 encoding mode.
{"cluster_id":1,"code_mode":10,"size":11,"blob_size":8388608,"crc":2359314771,"blobs":[{"min_bid":1844899,"vid":158458,"count":1}]}
{"cluster_id":1,"code_mode":11,"size":11,"blob_size":4194304,"crc":2169337493,"blobs":[{"min_bid":2,"vid":7,"count":1}]}
# Download the file, use the location obtained above as the parameter (-l), and you can download the file content
$> access get -v -l '{"cluster_id":1,"code_mode":10,"size":11,"blob_size":8388608,"crc":2359314771,"blobs":[{"min_bid":1844899,"vid":158458,"count":1}]}'
$> access get -v -l '{"cluster_id":1,"code_mode":11,"size":11,"blob_size":4194304,"crc":2169337493,"blobs":[{"min_bid":2,"vid":7,"count":1}]}'
# Delete the file, use the location obtained above as the parameter (-l); deleting the file requires manual confirmation
$> access del -v -l '{"cluster_id":1,"code_mode":10,"size":11,"blob_size":8388608,"crc":2359314771,"blobs":[{"min_bid":1844899,"vid":158458,"count":1}]}'
$> access del -v -l '{"cluster_id":1,"code_mode":11,"size":11,"blob_size":4194304,"crc":2169337493,"blobs":[{"min_bid":2,"vid":7,"count":1}]}'
```

View File

@ -31,13 +31,13 @@ curl -v "http://127.0.0.1:17010/vol/expand?name=test&authKey=57f0162b2303be3449c
If the Blobstore erasure-coded subsystem is deployed, you can create an erasure-coded volume to store cold data.
```bash
curl -v 'http://127.0.0.1:17010/admin/createVol?name=test-cold&capacity=100&owner=cfs&volType=1'
curl -v 'http://127.0.0.1:17010/admin/createVol?name=test-cold&capacity=100&owner=cfs&volStorageClass=3'
```
- name: volume name
- capacity: volume quota. If the quota is used up, it needs to be expanded.
- owner: the owner of the volume.
- volType: volume type. 0 for replicated volume, 1 for erasure-coded volume. The default is 0.
- volStorageClass: storage class of the volume. 1 for SSD replica, 2 for HDD replica, 3 for erasure-coded (BlobStore). Default is 0 (master auto-selects).
## Enable Multi-Level Cache
@ -45,13 +45,13 @@ You can create an erasure-coded volume and set multiple replicas as read-write c
**Cache read data**
```bash
curl -v 'http://127.0.0.1:17010/admin/createVol?name=test-cold&capacity=100&owner=cfs&volType=1&cacheCap=10&cacheAction=1'
curl -v 'http://127.0.0.1:17010/admin/createVol?name=test-cold&capacity=100&owner=cfs&volStorageClass=3&cacheCap=10&cacheAction=1'
```
- name: volume name
- capacity: volume quota. If the quota is used up, it needs to be expanded.
- owner: the owner of the volume.
- volType: volume type. 0 for replicated volume, 1 for erasure-coded volume. The default is 0.
- volStorageClass: storage class of the volume. 1 for SSD replica, 2 for HDD replica, 3 for erasure-coded (BlobStore). Default is 0 (master auto-selects).
- cacheCap: cache size in GB.
- cacheAction: cache type. 0 for no cache, 1 for cache read, 2 for cache read-write. The default is 0.