Deleting a GlusterFS volume is a final cluster metadata operation for a storage namespace that should no longer be mounted, replicated, or recovered through its volume name. The risky part is confirming that no clients or applications still depend on the volume before the stop and delete prompts remove it from the trusted pool.
The gluster volume stop command takes the volume out of service and makes mounted data paths inaccessible. The gluster volume delete command then removes the volume definition that glusterd stores for the cluster, including the brick layout and volume options.
Deleting the volume does not wipe brick directories from disk. Keep a snapshot, backup, or other recovery path when the data may be needed later, unmount clients first, and only remove brick paths after the volume no longer exists in GlusterFS.
Related: How to create a GlusterFS snapshot
Related: How to start and stop a GlusterFS volume
Steps to delete a GlusterFS volume:
- List volumes from a cluster node and confirm the exact target name.
$ sudo gluster volume list gvol-data gvol-archive
- Record the target volume layout and brick paths before stopping it.
$ sudo gluster volume info gvol-data Volume Name: gvol-data Type: Replicate Status: Started Number of Bricks: 1 x 2 = 2 Transport-type: tcp Bricks: Brick1: node1:/srv/gluster/brick1/gvol-data Brick2: node2:/srv/gluster/brick1/gvol-data
Save the Bricks entries if disk cleanup or recovery checks may be needed after deletion.
- Confirm no clients are still connected to the volume.
$ sudo gluster volume status gvol-data clients Brick node1:/srv/gluster/brick1/gvol-data Client connections: 0 Brick node2:/srv/gluster/brick1/gvol-data Client connections: 0
Active clients can see application errors when the volume stops. Move workloads away or stop the applications before continuing.
Related: How to check GlusterFS volume status
- Unmount the volume from every client that still has it mounted.
$ sudo umount /mnt/gvol-data
Remove or disable matching /etc/fstab entries and automount units so the retired volume is not mounted again.
Related: How to mount a GlusterFS volume in Linux - Stop the volume and confirm the prompt.
$ sudo gluster volume stop gvol-data Stopping volume will make its data inaccessible. Do you want to continue? (y/n) y volume stop: gvol-data: success
Stopping the volume makes remaining mounts return I/O errors until the volume is started again or removed from the clients.
- Confirm the volume reports Stopped before deletion.
$ sudo gluster volume info gvol-data Volume Name: gvol-data Type: Replicate Status: Stopped Number of Bricks: 1 x 2 = 2 ##### snipped #####
- Delete the stopped volume and confirm the prompt.
$ sudo gluster volume delete gvol-data Deleting volume will erase all information about the volume. Do you want to continue? (y/n) y volume delete: gvol-data: success
Deletion removes the volume from GlusterFS management. Use a snapshot or backup for recovery; the volume name and options are no longer available through the cluster.
- Verify the volume definition is gone.
$ sudo gluster volume info gvol-data Volume gvol-data does not exist
- Remove the recorded brick directories only when disk space must be reclaimed.
$ sudo rm -rf /srv/gluster/brick1/gvol-data
Run the cleanup on each brick host only after confirming the recorded path belongs to the deleted volume and is not shared with another volume.
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.