创建卷
命令行方式创建
执行如下命令,创建一个卷名为volname1, 用户为userid1,容量为10G的副本卷:
./udbto-cli volume create volname1 userid1 --capacity 10
Create a new volume:
Name : volname1
Owner : userid1
capacity : 10 G
deleteLockTime : 0 h
crossZone : false
DefaultPriority : false
description :
mpCount : 3
dpCount : 10
replicaNum :
dpSize : 120 G
followerRead : false
readOnlyWhenFull : false
zoneName :
cacheRuleKey :
ebsBlkSize : 8388608 byte
cacheCapacity : 0 G
cacheAction : 0
cacheThreshold : 10485760 byte
cacheTTL : 30 day
cacheHighWater : 80
cacheLowWater : 60
cacheLRUInterval : 5 min
TransactionMask :
TransactionTimeout : 1 min
TxConflictRetryNum : 0
TxConflictRetryInterval : 0 ms
volStorageClass : 0
allowedStorageClass :
enableQuota : false
metaFollowerRead : false
maximallyRead : false
remoteCacheEnable :
remoteCacheAutoPrepare :
remoteCachePath :
remoteCacheTTL : 432000 s
remoteCacheReadTimeout : 100 ms
remoteCacheMaxFileSizeGB : 128 G
remoteCacheOnlyForNotSSD : false
remoteCacheMultiRead : false
flashNodeTimeoutCount : 5
rcSameZoneTimeout : 400 microSecond
rcSameRegionTimeout : 2 ms
Confirm (yes/no)[yes]: yes
Create volume success.
./udbto-cli volume create --help 可以查看更多的参数选项。
创建好卷后,可以通过如下命令查看卷的详细信息:
./udbto-cli volume info volname1
Summary:
ID : 8
Name : volname1
Owner : userid1
Authenticate : Disabled
Capacity : 10 GB
Create time : 2025-09-10 11:15:17
DeleteLockTime : 0
Cross zone : Disabled
DefaultPriority : false
Dentry count : 0
Description :
DpCnt : 10
DpReplicaNum : 3
Follower read : Disabled
Meta Follower read : Disabled
Direct Read : Disabled
Maximally Read : Disabled
Inode count : 1
Max metaPartition ID : 3
Max DataPartition ID : 10
MpCnt : 3
MpReplicaNum : 3
NeedToLowerReplica : Disabled
RwDpCnt : 10
Status : Normal
ZoneName : default
VolType : 0
DpReadOnlyWhenVolFull : false
Transaction Mask : rename
Transaction timeout : 1
Tx conflict retry num : 121
Tx conflict retry interval(ms) : 500
Tx limit interval(s) : 0
Forbidden : false
DisableAuditLog : false
TrashInterval : 0s
DpRepairBlockSize : 128KB
EnableAutoDpMetaRepair : false
Quota : Disabled
AccessTimeValidInterval : 24h0m0s
MetaLeaderRetryTimeout : 0s
EnablePersistAccessTime : false
ForbidWriteOpOfProtoVer0 : true
VolStorageClass : ReplicaSSD
AllowedStorageClass : [ReplicaSSD]
CacheDpStorageClass : Unspecified
QuotaOfClass(ReplicaSSD) : no limit(0)
remoteCacheEnable : false
remoteCachePath :
remoteCacheAutoPrepare : false
remoteCacheTTL : 432000
remoteCacheReadTimeout : 100 ms
remoteCacheMaxFileSizeGB : 128 G
remoteCacheOnlyForNotSSD : false
remoteCacheMultiRead : false
flashNodeTimeoutCount : 5
remoteCacheSameZoneTimeout : 400
remoteCacheSameRegionTimeout : 2
Resultful方式创建
使用如下命令,创建一个卷名为volume2,用户为userid2,容量为100G的副本卷。volType参数指定为0,创建副本卷; 指定为1, 创建纠删码卷。注意如果不指定卷类型,默认为副本卷。
curl -v "http://192.168.2.160:15010/admin/createVol?name=volname2&capacity=10&owner=userid2&volType=0"
* About to connect() to 192.168.2.160 port 15010 (#0)
* Trying 192.168.2.160...
* Connected to 192.168.2.160 (192.168.2.160) port 15010 (#0)
> GET /admin/createVol?name=volname2&capacity=10&owner=userid2 HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 192.168.2.160:15010
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Length: 104
< Content-Type: application/json
< Date: Wed, 10 Sep 2025 03:25:41 GMT
<
* Connection #0 to host 192.168.2.160 left intact
{"code":0,"msg":"success","data":"create vol[volname2] successfully, has allocate [10] data partitions"}