[Bug 248606] zfs receive: Input/output error accessing dataset after resuming interrupted receive

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Aug 11 16:36:39 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248606

            Bug ID: 248606
           Summary: zfs receive: Input/output error accessing dataset
                    after resuming interrupted receive
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs at FreeBSD.org
          Reporter: asomers at FreeBSD.org

If "zfs send" gets interrupted the destination dataset will be left in a
mounted, accessible state.  However, after resuming the transfer (with zfs send
-t) the destination dataset will be left in a mounted by inaccessible state,
returning EIO for all accesses.  Unmounting and remounting it suffices to fix
the problem.

Steps to reproduce:
$ cd /
$ sudo zpool create testpool vtbd1
$ sudo zfs create testpool/src
$ sudo zfs create testpool/dst
$ sudo dd if=/dev/zero bs=1m count=2048 of=/testpool/src/zerofile
2048+0 records in
2048+0 records out
2147483648 bytes transferred in 8.584807 secs (250149331 bytes/sec)
$ sudo zfs snapshot testpool/src at 1
$ sudo zfs send -v testpool/src at 1 | sudo zfs recv -Fsv testpool/dst
full send of testpool/src at 1 estimated size is 2.00G
total estimated size is 2.00G
full send of testpool/src at 1 estimated size is 2.00G
TIME        SENT   SNAPSHOT
receiving full stream of testpool/src at 1 into testpool/dst at 1
10:31:19   83.3M   testpool/src at 1
10:31:20    479M   testpool/src at 1
10:31:21    479M   testpool/src at 1
cannot receive new filesystem 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-bfb9f6182-b8-789c636064000310a500c4ec50360710e72765a52697303030419460caa7a515a7968064441461f26c48f2499525a9c540fa82b9962236fd25f9e9a599290c0cd71e84f16f0ff8705d03499e132c9f97989b0aa4538b4b0af2f373f48b8b921d0c216e010068421904
fish: Process 37889, 'sudo' 'sudo zfs send -v testpool/src at 1…' terminated by
signal SIGTERM (Polite quit request)

# (In another terminal)
$ sudo pkill -f "zfs send -v testpool/src at 1"

# (Back in the original terminal)
$ ls -a testpool/dst
./      ../
$ zfs get mounted testpool/dst
NAME          PROPERTY  VALUE    SOURCE
testpool/dst  mounted   yes
$ sudo zfs send -t
1-bfb9f6182b8-789c636064000310a500c4ec50360710e72765a52697303030419460caa7a515a7968064441461f26c48f2499525a9c540fa82b9962236fd25f9e9a599290c0cd71e84f16f0ff8705d03499e132c9f97989b0aa4538b4b0af2f373f48b8b921d0c216e010068421904
| sudo zfs recv -Fsv testpool/dst
$ ls -a testpool/dst
ls: testpool/dst: Input/output error
$ zfs get mounted testpool/dst
NAME          PROPERTY  VALUE    SOURCE
testpool/dst  mounted   yes      -
$ sudo zfs unmount testpool/dst && sudo zfs mount testpool/dst
$ ls -a testpool/dst
./              ../             zerofile

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list