glusterfs卷--删除
在之前我们创建了一个分布式类型的glusterfs卷v1,
现在我们来删除它,看看会遇到什么问题。
1、在客户端上卸载挂载点(client节点)
# rm -rf /mnt/*
# umount /mnt
2、停止glusterfs卷
# gluster volume stop v1
Stopping volume will make its data inaccessible. Do you want to continue? (y/n) y
volume stop: v1: success
3、删除glusterfs卷
# gluster volume delete v1
Deleting volume will erase all information about the volume. Do you want to continue? (y/n) y
volume delete: v1: success
查看glusterfs卷
# gluster volume list
No volumes present in cluster
4、再次创建glusterfs卷
# gluster volume create v1 node1:/xx/data node2:/yy/data
volume create: v1: failed: /xx/data is already part of a volume
注意:
再次创建时提示已存在;
这是因为我们只是删除了glusterfs卷v1,底层分区中的记录依然存在;
解决方法:
1)对分区重新格式化 #这个太麻烦
2)强制创建卷 #建议
# gluster volume create v1 node1:/xx/data node2:/yy/data force
volume create: v1: success: please start the volume to access data
# gluster volume list
v1