使用本文教程,应该按照前面教程搭建好了 swarm集群 ,ceph集群,配置了 swarm集群客户端。

如何创建存储卷?

docker volume create --driver=rexray/rbd:latest --name=vbox2 --opt=size=2
vbox2

这个size的单位是GB。

Additional, valid options for the -o|–opt parameter include

optiondescription
sizeSize in GB
IOPSIOPS
volumeTypeType of Volume or Storage Pool
volumeNameCreate from an existing volume name
volumeIDCreate from an existing volume ID
snapshotNameCreate from an existing snapshot name
snapshotIDCreate from an existing snapshot ID

如何调整存储卷大小?

在ceph管理节点,在rbd的pool中,我们存储卷以镜像的形式存在,更新镜像的大小即可。

rbd resize --size 2048 ceph_test1

我们的rbd还有很多其他的指令