How to set a storage pool to pending state?

I want to edit the config of a storage pool. But when I finish my edits and click “save” on the editor, I get an error message “Cannot save while not in pending state”.

What should I do to set the storage pool’s state to pending?

Thank you.

What are you trying to change?

I recovered a storage pool which was in an external HD. LXD restore added the source as /dev/sdb1 instead of UUID. Tried to edit the storage configuration and it mentioned Config parsing error: Pool source cannot be changed when not in pending state. It would be helpful to change the source configuration to avoid future issues.

I have a similar issue. New installation, no existing containers. I would like to change the zfs storage location for the default pool.

Was this question dealt with off line? You responded with a question, but no answer.

Editing the source of a storage pool once it is setup is not supported.

You can modify the settings in an unsupported way using lxd sql global command, but be warned that you can easily lose configuration data (and thus LXD functionality) this way.

The supported method is to create a new storage pool where you want it and then move the instances and volumes from the old pool to the new pool using:

  • lxc move
  • lxc storage volume move

Thanks Tom,

“lxc move” makes sense. I think the name “default” makes sense for the default storage pool, and am trying to start over with a new pool that maintains the name “default”. I know I have done it once, just need to tweak a few brain cells.

Rich

You can update the default profile root disk to use the new pool too so you won’t have to specify it each time.

Success. Warning do not do this if you have any interest in preserving your existing environment. I am building a new system, so it works for me.

  1. Check your default storage pools dependencies:
    lxc storage show default

  2. Remove any images that are listed in dependencies.

  3. Edit default profile, changing the name to something else.

  4. Re-init lxd:
    lxd init

Hope that helps someone else.

Note, lxd is a very cool tool and I hope to implement it to achieve cluster multi-tenancy, however the init process could be clearer. This is the second time I have
created the default zfs storage pool at the root of my zfs pool.

Rich