一、卷的刪除
第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