使用本文教程,应该按照前面教程搭建好了 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

| option | description |
|---|---|
| size | Size in GB |
| IOPS | IOPS |
| volumeType | Type of Volume or Storage Pool |
| volumeName | Create from an existing volume name |
| volumeID | Create from an existing volume ID |
| snapshotName | Create from an existing snapshot name |
| snapshotID | Create from an existing snapshot ID |

如何调整存储卷大小?

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

rbd resize --size 2048 ceph_test1


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