Unable to delete CSI NFS Volume in Nomad

Hi Guys,

TL;DR:

Can’t delete CSI NFS volume. Getting error:
Error deleting volume: Unexpected response code: 500 (controller delete volume: CSI.ControllerDeleteVolume: missing ExternalVolumeID)

The longer version:
I’m kind of a N00b here, but I started with Nomad in my Homelab as a proof of concept for container orchestration for possible application at work.

I’m using an NFS server and used the following tutorial to create CSI NFS volumes:

Nomad: NFS CSI Volume – HashiCorp Help Center

One of these volumes is no longer necessary and I want to delete it, but, it seems Nomad (or CSI) won’t let me.

Can you point me to what I’m doing wrong?

Thanks!

Ronald

Hi. Try nomad volume deregister -namespace=default nfs.

Yes, that worked. I was a bit reluctant to try this because the documentation stated:

The volume deregister command deregisters external storage volumes with Nomad’s Container Storage Interface (CSI) support. The volume will be removed from Nomad’s state store but not deleted from the external storage provider. Note that deregistering a volume prevents Nomad from deleting it via volume delete at a later time.

but for know, it’s gone from Nomad. And that was the purpose.