I have a cluster with a ZFS-backed storage pool (named test) containing a storage volume (named testvol):
administrator@modgunn:~$ lxc storage volume list test
+--------+-----------+-------------+---------+----------+
| TYPE | NAME | DESCRIPTION | USED BY | LOCATION |
+--------+-----------+-------------+---------+----------+
| custom | testvol | | 0 | modgunn |
+--------+-----------+-------------+---------+----------+
I also have a container (called testcont):
administrator@modgunn:~$ lxc list
+-------------+---------+--------------------+------+-----------+-----------+----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | LOCATION |
+-------------+---------+--------------------+------+-----------+-----------+----------+
| testcont | RUNNING | | | CONTAINER | 0 | modgunn |
+-------------+---------+--------------------+------+-----------+-----------+----------+
If I like to move this container from one node in the cluster to another node, I can issue these commands:
administrator@modgunn:~$ lxc stop testcont
administrator@modgunn:~$ lxc move testcont testcont --target mode
administrator@modgunn:~$ lxc list
+-------------+---------+--------------------+------+-----------+-----------+----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | LOCATION |
+-------------+---------+--------------------+------+-----------+-----------+----------+
| testcont | STOPPED | | | CONTAINER | 0 | mode |
+-------------+---------+--------------------+------+-----------+-----------+----------+
However, I’m not able to move the storage volume from one node to another using similar commands:
administrator@modgunn:~$ lxc storage volume move test/testvol test/testvol --target oden
Error: Volume by that name already exists
administrator@modgunn:~$ lxc storage volume move test/testvol test/testvol2 --target oden
Error: not found
administrator@modgunn:~$ lxc storage volume list test
+--------+-----------+-------------+---------+----------+
| TYPE | NAME | DESCRIPTION | USED BY | LOCATION |
+--------+-----------+-------------+---------+----------+
| custom | testvol2 | | 0 | modgunn |
+--------+-----------+-------------+---------+----------+
administrator@modgunn:~$ lxc storage volume move test/testvol2 testvol3 --target oden
Error: No storage pool for target volume specified
How do I accomplish this with LXD?
I assume remote:
is not used within a cluster, right?
If it’s of importance, this is how I setup my test storage pool:
administrator@modgunn:~$ sudo zfs create hddpool/test
administrator@mode:~$ sudo zfs create hddpool/test
administrator@oden:~$ sudo zfs create hddpool/test
administrator@modgunn:~$ lxc storage create test zfs source=hddpool/test --target modgunn
Storage pool test pending on member modgunn
administrator@modgunn:~$ lxc storage create test zfs source=hddpool/test --target mode
Storage pool test pending on member mode
administrator@modgunn:~$ lxc storage create test zfs source=hddpool/test --target oden
Storage pool test pending on member oden
administrator@modgunn:~$ lxc storage create test zfs
Storage pool test created
I run lxd version 3.20 (installed with snap).