我已經創建並啓動了一些GlusterFS(3.7.11版)卷,經過一些測試後,我停止手動刪除這些卷,但它們仍保留在GlusterFS服務器中。如何完全刪除GlusterFS卷
例如,我有3臺服務器,並在/ GFS保存磚:
[[email protected] ~]$ sudo gluster volume create test-vol gfs-server-1:/gfs/test-vol gfs-server-2:/gfs/test-vol gfs-server-3:/gfs/test-vol force
volume create: test-vol: success: please start the volume to access data
[[email protected] ~]$ sudo gluster volume start test-vol
volume start: test-vol: success
[[email protected] ~]$ mkdir /tmp/test
[[email protected] ~]$ sudo mount -t glusterfs gfs-server-1:/test-vol /tmp/test
[[email protected] ~]$ sudo touch /tmp/test/`date +%s`.txt
[[email protected] ~]$ sudo touch /tmp/test/`date +%s`.txt
[[email protected] ~]$ sudo touch /tmp/test/`date +%s`.txt
[[email protected] ~]$ sudo touch /tmp/test/`date +%s`.txt
[[email protected] ~]$ sudo ls /tmp/test/
1469617442.txt 1469617446.txt 1469617447.txt 1469617449.txt
[[email protected] ~]$ ls /gfs/test-vol/
1469617449.txt
[[email protected] ~]$ sudo umount /tmp/test
刪除卷後,我仍然可以看到該文件保留在GlusterFS服務器:
[[email protected] ~]$ sudo gluster volume stop test-vol
Stopping volume will make its data inaccessible. Do you want to continue? (y/n) y
volume stop: test-vol: success
[[email protected] ~]$ sudo gluster volume delete test-vol
Deleting volume will erase all information about the volume. Do you want to continue? (y/n) y
volume delete: test-vol: success
[[email protected] ~]$ ls /gfs/test-vol/
1469617449.txt