ZFS send/recv issue

svendsen

Renowned Member
Apr 18, 2012
60
1
73
Hi guys!

I'm trying to migrate from a Proxmox server to another. Plan is/was to use zfs send/recv for this.
When executing following:

zfs send rpool/data/vm-100-disk-0 |ssh xxx.xxx.xxx.xxx zfs recv rpool/data/vm-100-disk-0

I get this:

warning: cannot send 'rpool/data/vm-100-disk-0': target is busy; if a filesystem, it must not be mounted
root@xxx.xxx.xxx.xxx's password:
cannot receive: failed to read from stream

I've tried to unmount data on the target node with both:
zfs umount /rpool/data
and
umount /rpool/data
I've also tried to disable the local-zfs storage in the GUI

# zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 1.41G 28.2T 104K /rpool
rpool/ROOT 1.41G 28.2T 96K /rpool/ROOT
rpool/ROOT/pve-1 1.41G 28.2T 1.41G /
rpool/data 96K 28.2T 96K /rpool/data


Any ideas?
 
Ok - I think I found the answer.
Turns out that zfs send/recv requires a snapshot. It wasn't clear in the docs.
So, by creating a snapshot first and then run zfs send on the snapshot, everything works :)