Moving volumes and snapshots
Moving volumes
A volume could be moved both with (live) or without attachment (offline) to a neighbor sub-cluster in a multi-cluster environment. This is available only for multi-cluster and not possible for Multi site, where only snapshots could be transferred.
To move a volume:
# storpool volume <volumeName> moveToRemote <clusterName>
The above command will succeed only in case the volume is not attached on any of the nodes in this sub-cluster.
To move the volume live while it is still attached an additional option onAttached should instruct the cluster how to proceed, for example this command:
Lab-D-cl1> volume test moveToRemote Lab-D-cl2 onAttached export
It will move the volume to the Lab-D-cl2 sub-cluster, and if the volume is attached in the present cluster will export it back to Lab-D-cl1.
This is an equivalent to:
Lab-D-cl1> multiCluster on
[MC] Lab-D-cl1> cluster cmd Lab-D-cl2 attach volume test client 12
OK
Or, directly executing the same CLI command in multi-cluster mode at a host in Lab-D-cl2 cluster.
Note
Moving a volume will also trigger moving all of its snapshots. In a case where there are parent snapshots with many child volumes they might end up in each sub-cluster their child volumes ended up being moved to as a space-saving measure.
Moving snapshots
Moving a snapshot is essentially the same as moving a volume, with the difference that it cannot be moved when attached. For example:
Lab-D-cl1> snapshot testsnap moveToRemote Lab-D-cl2
This will succeed only if the snapshot is not attached locally. A snapshot part of a volume snapshot chain will trigger copying also the parent snapshots which will be automatically managed by the cluster.