And that's certainly correct.I think it basically means your old directories have been over mounted by the ZFS bits. So UFS /bin is overlaid with ZFS /bin. I don't think it would be a "union" mount, but a complete overlay.
zpool export
first. If you're unlucky and it doesn't work (because something already locked some files on the ZFS pool, whatever?), I guess my next action would be a forced poweroff, IOW, pull the plug. ZFS shouldn't have issues with that, UFS neither, at least if SU+J is active. But it's still a bit "gambling".Thanks for confirming. I'm long past my experimenting days where I would actually try something like this. I just want my systems to keep on working with minimum downtime (try to keep it to reboot after security updates) so don't have extra systems around anymore to try "weird stuff".And that's certainly correct.
zfs export
in a more controlled environment so I can have a method for dealing with this without a shutdownI'm also quite a ZFS fan. Not having to worry about switching around sata ports and having the boot come to a halt is a plus.But this is an example of why I like ZFS and boot environments. "bectl mount" lets one temp mount a BE to muck around. I "grew up" on FreeBSD with UFS and love the longevity of it (the handling of the move to 64bit inodes was very impressive) but I'm very much a ZFS convert.
I would strongly recommend not to do any further testing here. Mounting some different system over your running live system is just something you should never do. Maybe with less fatal consequences than e.g. overwriting your currently used system disk withI'll test outzfs export
in a more controlled environment so I can have a method for dealing with this without a shutdown
dd
(and you certainly don't want to test that?), but still on a similar level – just avoid it.I'm referring to, like a virtual machine.I would strongly recommend not to do any further testing here. Mounting some different system over your running live system is just something you should never do. Maybe with less fatal consequences than e.g. overwriting your currently used system disk withdd
(and you certainly don't want to test that?), but still on a similar level – just avoid it.
Were you logged in/sudo/su when you did this? Well that is your answer.Why did the system allow me to do this anyway? I can understand FreeBSD can be a bit unforgiving in what you ask it to do. But seems strange it can just mount across a live system like that.
Sure. What I mean is. When I ask the system for a file, who is it asking to provide me with a file? Presumably a filesystem driver. Wouldn't the system notice that you have two mount points at the same location and throw a permission denied or something?Were you logged in/sudo/su when you did this? Well that is your answer.
You can do the same thing even with UFS filesystems, so it's not a ZFS vs UFS thing. It's just a "you are root, you can do whatever you want, so be careful with your powers".
Yep unless you explicitly "union mount" the second one. Then you get the union of both; I think the first mount takes precedence. As in both filesystems have "/bin/blah", and ls /bin/blah gets you /bin/blah from the first mount.I'm assuming the filesystem structure is monolithic and for this case you can just overlay it with another one and whichever is the most recent "overlay" will take priority.
Good question, but I think that may be a different discussion. I've always known/understood that as root I can do "rm -rf /", so maybe my tolerance for "what should/should not happen" is different. I'm not saying you are wrong, more "it's a different discussion, worth having, but the expectations clearly need to be defined".Wouldn't the system notice that you have two mount points at the same location and throw a permission denied or something?