Date: Thu, 24 Sep 2020 16:14:42 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 249579] [ZFS] Can't resume a zfs receive stream to a dataset with a mounted clone Message-ID: <bug-249579-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D249579 Bug ID: 249579 Summary: [ZFS] Can't resume a zfs receive stream to a dataset with a mounted clone Product: Base System Version: 12.1-STABLE Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: asomers@FreeBSD.org On FreeBSD stable/12, you cannot receive a resumed ZFS stream into a dataset that has a mounted clone. The bug was likely introduced by r364412. The problem is that when receiving libzfs tries to unmount any dataset whose mountpoint might be changed. Such datasets include all children of the destination, as well as all clones of those children. Clones of the destination itself SHOULD NOT be included, but libzfs includes them anyway.= =20 Datasets whose mountpoint property is locally set also SHOULD NOT be includ= ed, but libzfs seems to include them anyway, too. The problem is not reproduci= ble on head (which has switched to OpenZFS), because OpenZFS's libzfs does not = try to unmount datasets when receiving a stream. I don't know why not. Steps to reproduce: > sudo zpool create tank vtbd1 > sudo zfs create tank/src > sudo dd if=3D/dev/zero bs=3D1m count=3D1024 of=3D/tank/src/zerofile 1024+0 records in 1024+0 records out 1073741824 bytes transferred in 8.282515 secs (129639593 bytes/sec) > sudo zfs snapshot tank/src@1 > sudo zfs send -R tank/src@1 | sudo zfs recv -vs tank/dst receiving full stream of tank/src@1 into tank/dst@1 received 1.00GB stream in 4 seconds (257MB/sec) > sudo zfs clone tank/dst@1 tank/clone > # In another shell, cd to /tank/clone > sudo dd if=3D/dev/zero bs=3D1m count=3D1024 of=3D/tank/src/zerofile2 1024+0 records in 1024+0 records out 1073741824 bytes transferred in 5.961812 secs (180103269 bytes/sec) > sudo zfs snapshot tank/src@2 > sudo zfs send -i tank/src@1 tank/src@2 | head -c 536870912 | sudo zfs rec= eive -vs tank/dst receiving incremental stream of tank/src@2 into tank/dst@2 warning: cannot send 'tank/src@2': signal received cannot receive incremental stream: checksum mismatch or incomplete stream. Partially received snapshot is saved. A resuming stream can be generated on the sending system by running: zfs send -t 1-XXXXXX > sudo zfs send -t 1-XXXXXX | sudo zfs receive -vs tank/dst cannot unmount '/tank/clone': Device busy --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-249579-227>