https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204705
Bug ID: 204705
Summary: zfs receive mounts received dataset even if -u is
given
Product: Base System
Version: 10.2-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: [email protected]
Reporter: [email protected]
It appears that `zfs send -R <root-dataset-snapshot> | zfs receive -Fdu
<external-media-dataset>` will mount the received dataset despite the -u
flag. I discovered this sending the root partition having mountpoint=/ which
broke devfs. Below is a session done in a clean new (KVM) VM install with two
disks to replicate the issue:
root@freebsd:~ # zpool status
pool: zroot
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
zroot ONLINE 0 0 0
vtbd0p2 ONLINE 0 0 0
errors: No known data errors
root@freebsd:~ # zpool list
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
zroot 3.97G 830M 3.16G - 13% 20% 1.00x ONLINE -
root@freebsd:~ # zfs list
NAME USED AVAIL REFER MOUNTPOINT
zroot 830M 3.03G 829M /
root@freebsd:~ # zpool list -t snapshot
NAME USED AVAIL REFER MOUNTPOINT
zroot@test-snapshot 496K - 829M -
root@freebsd:~ # zpool create zbackup vtbd1
root@freebsd:~ # zfs create zbackup/backup
root@freebsd:~ # zfs list
NAME USED AVAIL REFER MOUNTPOINT
zbackup 250K 3.84G 19K /zbackup
zbackup/backup 19K 3.84G 19K /zbackup/backup
zroot 830M 3.03G 829M /
root@freebsd:~ # zfs send -R zroot@test-snapshot | zfs receive -Fdu
zbackup/backup
root@freebsd:~ # zfs list
internal error: failed to initialize ZFS library
root@freebsd:~ # mount
zroot on / (zfs, local, nfsv4acls)
devfs on /dev (devfs, local, multilabel)
zbackup on /zbackup (zfs, local, nfsv4acls)
zbackup/backup on / (zfs, local, nfsv4acls)
root@freebsd:~ # mount -t devfs devfs /dev
root@freebsd:~ # zfs list
NAME USED AVAIL REFER MOUNTPOINT
zbackup 829M 3.03G 19K /zbackup
zbackup/backup 829M 3.03G 829M /
zroot 830M 3.03G 829M /
root@freebsd:~ # zfs mount
zroot /
zbackup /zbackup
zbackup/backup /
root@freebsd:~ # zpool export zbackup
cannot unmount '/': Device busy
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"