Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zfs: add option for forcible unmounting dataset while receiving snapshot. #9904

Merged
merged 3 commits into from
Mar 17, 2020

Commits on Mar 11, 2020

  1. zfs: add option for forcible unmounting dataset while receiving snaps…

    …hot.
    
    Currently when the dataset is in use we can't receive snapshot.
    zfs send test/1@asd | zfs recv -FM test/2
    cannot unmount '/test/2': Device busy
    
    The same goes for the Linux version:
    oshogbo@u-wing:/test$ sudo sudo zfs send test/1@b | sudo zfs recv -F test/2
    umount: /test/2: target is busy.
    cannot unmount '/test/2': umount failed
    oshogbo@u-wing:/test$ uname -a
    Linux u-wing 4.18.0-25-generic openzfs#26-Ubuntu SMP Mon Jun 24 09:32:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
    
    This commits add option 'M' which forcible unmounting the dataset.
    Thanks to to that we can enforce receiving snapshot in single step.
    
    Discussed with: pjd
    Reviewed by:	AllanJude (FreeBSD version)
    FreeBSD review:	https://reviews.freebsd.org/D22306
    
    Signed-off-by: Mariusz Zaborski <oshogbo@vexillium.org>
    oshogbo committed Mar 11, 2020
    Configuration menu
    Copy the full SHA
    5d8f4fb View commit details
    Browse the repository at this point in the history
  2. Add note that the M flag in recv is not supported on Linux.

    As pointed out by behlendorf, Linux does not support forcible
    unmount. Document this behavior.
    
    Signed-off-by: Mariusz Zaborski <oshogbo@vexillium.org>
    oshogbo committed Mar 11, 2020
    Configuration menu
    Copy the full SHA
    c58bd79 View commit details
    Browse the repository at this point in the history
  3. Add tests for forcibly unmount filesystem while receiving stream.

    Signed-off-by: Mariusz Zaborski <oshogbo@vexillium.org>
    oshogbo committed Mar 11, 2020
    Configuration menu
    Copy the full SHA
    7eceb06 View commit details
    Browse the repository at this point in the history