To move a ZVol, you would first create a snapshot of the ZVol, then use the zfs send
and zfs receive
commands to transfer the snapshot data to the target pool. For example:
Move a zvol called myVol
from pool aaa
to pool bbb
zfs snapshot -r aaa/myVol@relocate
zfs send aaa/myVol@relocate | zfs receive -v bbb/myVol@relocate
Move a dataset called myDS
from pool aaa
to pool bbb
zfs snapshot -r aaa/myDS@relocate
zfs send aaa/myDS@relocate | zfs receive -v bbb/myDS@relocate
It is important to note that the zfs send
and zfs receive
commands can be used to transfer datasets and ZVols between pools on the same system, or between different systems over a network. This allows you to easily move data between pools, whether they are on the same system or on different systems.