一、卷的删除
第1步: 先在客户端umount已经挂载的目录(在umount之前把测试的数据先删除)
client# rm /test0/* -rf
client# umount /test0
第2步: 在任一个storage服务器上使用下面的命令停止gv0并删除,我这里是在storage1上操作
storage1# gluster volume stop gv0
Stopping volume will make its data inaccessible. Do you want to continue? (y/n) y volume stop: gv0: success
storage1# gluster volume delete gv0
Deleting volume will erase all information about the volume. Do you want to continue? (y/n) y
volume delete: gv0: success
第3步: 在所有storage服务器上都可以查看,没有gv0的信息了,说明这个volumn被删除了
# gluster volume info gv0
Volume gv0 does not exist
二、卷在线裁减
要看是哪一种模式的卷,比如stripe模式就不允许在线裁减。下面我以distributed卷来做裁减与扩容 ( 注意要remove没有数据的brick )
# gluster volume remove-brick gv1 storage4:/data/gv1 force
Removing brick(s) can result in data loss. Do you want to Continue? (y/n) y volume remove-brick commit force: success
三、卷在线扩容
# gluster volume add-brick gv1 storage4:/data/gv1 force
volume add-brick: success