Date: Fri, 5 Jun 2009 15:09:21 +0200 From: Thomas Backman <serenity@exscape.org> To: FreeBSD Current <freebsd-current@freebsd.org> Subject: ZFS send/recv and overwriting of existing mounts Message-ID: <1F0CF2D2-D53D-4C3D-9936-8F429525D89F@exscape.org>
next in thread | raw e-mail | index | archive | help
Hey all, I was wondering if there could (should?) be some kind of protection of over-mounting/shadowing (whatever the term is; overriding an existing mount) in ZFS. Take this as an example (from my memory, as the shell history is gone due to the forceful shutdown): zfs create tank/test zfs snapshot tank/root@now zfs send -R tank/root@now | zfs recv -vf tank/test ... bam, you now have two filesystems mounted on /, an empty /dev directory unless you double-mount devfs as well, etc. Reboot, and the same thing happens - it mounts root from /boot/ loader.conf, then rc.conf executes and mounts the tank/test root copy over /, again hiding /dev and making your system non-bootable. The only solution I've found so far is to reboot to livefs and destroy the copy... Ugh. I was just gonna test to see if send -R worked on vanilla sources now (I've had to use a patch previously), which it did, but I didn't expect it to override my root! (Single-user might have worked, now that I think about it; still, that too requires downtime to fix something that shouldn't really happen.) I guess you COULD file this under the "feature, not a bug" section, but in cases like this, I'd say "bug". Regards, Thomas
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1F0CF2D2-D53D-4C3D-9936-8F429525D89F>