The whole purpose is to move all the containers in project A to project B because I don’t want anymore that the scope of volumes, networks and other resources is private to the project. Project A was created as such in the beginning (features.*: true) while project B has been created with features.*: false.
I did the following:
$ lxc storage volume move pool01/vol01 pool01/vol01 --project A --target-project B
The operation is successful:
Then:
$ lxc storage volume list pool01 --project B
$ lxc storage volume list pool01 --all-projects
+-----------------+-----------+-----------------+------------------------------------------------+--------------+---------+
| PROJECT | TYPE | NAME | DESCRIPTION | CONTENT-TYPE | USED BY |
+-----------------+-----------+-----------------+------------------------------------------------+--------------+---------+
| B | custom | vol01 | my description | filesystem | 0 |
+-----------------+-----------+-----------------+------------------------------------------------+--------------+---------+
$ sudo zfs list -r pool01
NAME USED AVAIL REFER MOUNTPOINT
[...]
pool01/custom/B_vol01 0B 4.66G 67.9M legacy
[...]
pool01/deleted/custom/225b0a28-4f9b-4e55-bb86-3d849aa91e6e 67.9M 4.59G 67.9M legacy
[...]
So it seems my volume is trashed and visible only with the --all-projects flag.
I’m on 5.13
Did I do anything wrong? How can I restore my volume?
I’ve reproduced it, and the issue is that when the storage volume is moved to a project that has features.storage.volumes=false it incorrectly is recorded as being associated with the target project, rather than being associated (and renamed on the underlying storage pool) to being associated with the default project.
Because moving a storage volume to a project which doesn’t have storage volume support shouldn’t be allowed really, and instead you effectively need/want to move it to the default project.
Let me see if I can help you with a DB query to fix this…