mirror_zfs/cmd
Mariusz Zaborski a57d3d45d6
Add option for forcible unmounting dataset while receiving snapshot.
Currently when the dataset is in use we can't receive snapshots.

    zfs send test/1@asd | zfs recv -FM test/2
    cannot unmount '/test/2': Device busy

This commits add option 'M' which attempts to forcibly unmount the
dataset.  Thanks to this we can enforce receiving snapshots in a
single step.

Note that this functionality is not supported on Linux because the
VFS will prevent active mounted filesystems from being unmounted,
even with the force option.  This is the intended VFS behavior.

Test cases were added to verify the expected behavior based on
the platform.

Discussed-with: Pawel Jakub Dawidek <pjd@FreeBSD.org>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Allan Jude <allanjude@freebsd.org>
External-issue: https://reviews.freebsd.org/D22306
Closes #9904
2020-03-17 10:08:32 -07:00
..
arc_summary arc_summary: Make get_descriptions per platform 2020-02-27 17:15:06 -08:00
arcstat Add FreeBSD code to arc_summary and arcstat 2019-11-30 15:43:23 -08:00
dbufstat Detect if sed supports --in-place 2019-10-16 19:19:48 -07:00
fsck_zfs Fix typos in cmd/ 2019-08-30 09:43:30 -07:00
mount_zfs OpenZFS restructuring - libspl 2019-10-02 10:39:48 -07:00
raidz_test Add AltiVec RAID-Z 2020-01-23 11:01:24 -08:00
vdev_id Fix typos in cmd/ 2019-08-30 09:43:30 -07:00
zdb Improve zfs destroy performance with zio_t-free zio_free() 2020-02-28 14:49:44 -08:00
zed Systemd mount generator: Generate noauto units; add control properties 2020-02-14 15:32:55 -08:00
zfs Add option for forcible unmounting dataset while receiving snapshot. 2020-03-17 10:08:32 -07:00
zgenhostid bash scripts: use /usr/bin/env for bash shebangs 2020-02-10 13:13:46 -08:00
zhack Add zfs_file_* interface, remove vnodes 2019-11-21 09:32:57 -08:00
zinject Remove ECKSUM alias in zinject 2019-11-01 10:31:42 -07:00
zpool Add trim support to zpool wait 2020-03-04 15:07:11 -08:00
zstreamdump fix zstreamdump -C 2020-02-13 11:24:57 -08:00
ztest libzfs: Fix bounds checks for float parsing 2020-03-16 11:56:29 -07:00
zvol_id OpenZFS restructuring - libspl 2019-10-02 10:39:48 -07:00
zvol_wait zvol_wait should ignore redacted zvols 2019-11-06 10:51:19 -08:00
Makefile.am Isolate code specific to Linux in cmd/ 2019-11-11 09:24:04 -08:00