How to move profiles or images to other storage?

Hi, Stéphane, thanks for the reply.

  1. Profiles
  2. Image(s)

Profiles:

Yeah that became obvious, and it would have been a clue, that the old pool only listed 3 profiles out of many more.
The 3 listed profiles were those that referenced a pool, like:
lxc profile edit <profile-name>

config: {}
devices:
  root:
    path: /
    pool: <old-pool-name>
    type: disk
...

So after editing to reference the new pool, those 3 profiles were automagically shown in the new pool.

[root@asusi7 storage-pools]# lxc storage show <new-pool-name>
used_by:
- /1.0/profiles/brpool00_default [renamed]
- /1.0/profiles/default
- /1.0/profiles/only_disk

Image(s):

The image was a little trickier.
The command lxc storage volume delete defnew image/FINGERPRINT did not work, and I tried a number of variations of lxc storage volume delete, but none worked.
Then it struck me that the thing I wanted to delete was understood as both a volume and an image:

  • lxc image ls
  • lxc storage volume list defnew
image   FINGERPRINT:    '524f749ce98a'
volume  NAME:           '524f749ce98abd92ea3c8badd01a66cf8baa1daef5054516a4f60a27fb6a6c1e'

So this worked:
lxc image delete 524f749ce98a
It also “removed” the volume, and the container referencing the volume started speedily without any errors.
The cache-image is apparently not recreated, so that is moot?
I did notice another thread, where you solved a similar problem by lxd sql global "DELETE FROM storage_volumes WHERE name="focaltest"
But I persisted with lxc and solved it by addressing the image instead of the volume.
(Maybe there be issues with lxc storage volume delete ?)

Goal:

After editing profiles and deleting image, the old pool was now “empty” and could be deleted.

lxc storage show <old-pool-name>
    used_by: []

lxc storage delete <old-pool-name>
[root@asusi7 storage-pools]# lxc storage ls
+----------+--------+--------------------------------------+-------------+---------+---------+
|   NAME   | DRIVER |                SOURCE                | DESCRIPTION | USED BY |  STATE  |
+----------+--------+--------------------------------------+-------------+---------+---------+
| brpool00 | btrfs  | 7115d9f6-f852-43a9-a626-3870e74596e8 |             | 27      | CREATED |
+----------+--------+--------------------------------------+-------------+---------+---------+

Old pool gone, only new pool remains.

So goal achieved, thanks for the help.