Setting up democratic-csi volumes using nomad

Hi! I’ve had some measure of success using nomad and democratic-csi.

However, I’ve run into some problems. The documentation for configuring nomad volumes doesn’t seem to be accurate any more.

I’ve seen problems like the mount_options need to be an array, and it’s making me wonder what other things might be wrong.

I’m unable to get a volume set up using democratic-csi through the nomad volume create command. Why doesn’t the volume creation work completely? Is my volume configuration wrong?

Given a volume configuration:

id           = "lam-config"
name         = "lam-config"
type         = "csi"
plugin_id    = "truenas"
capacity_max = "5Gib"
capacity_min = "1Gib"

//Suggested to have only one capability
// capability {
//   access_mode     = "single-node-reader-only"
//   attachment_mode = "block-device"
// }

capability {
  access_mode     = "single-node-writer"
  attachment_mode = "file-system"
}

mount_options {
  fs_type     = "ext4"
  mount_flags = ["noatime"]
}

creating the volume “succeeds” using nomad volume create:

❯ nomad volume create config-volume.hcl
Created external volume lam-config with ID lam-config

However:

❯ nomad volume status
Container Storage Interface
ID             Name           Plugin ID  Schedulable  Access Mode
lam-config     lam-config     truenas    true         <none>
radarr-volume  radarr-volume  truenas    true         single-node-writer

The radarr volume is one I created using the csc command directly following some guidance on the democratic-csi page.

I have a github issue open with the author, and we’re working through some things, but I think I’ve worked out the issues with democratic-csi, and am now bumping into nomad issues.

Thanks in advance!

1 Like