6 ms·
Certain features in FreeBSD are not available in Darwin, such as ZFS and jails. Also, if you’re doing software testing, it’s nice to be able to spin up a VM of
by linguae 4y ago
Certain features in FreeBSD are not available in Darwin, such as ZFS and jails. Also, if you’re doing software testing, it’s nice to be able to spin up a VM of the OS that you’re testing your software on.
- musicale 4y agoI'd really like to see jails/BSD containers on macOS. Running docker containers in a Linux VM works OK, but it makes me sad because I don't actually need or want another kernel beside Xnu. For that matter, I don't even need or want docker itself, just a container feature. Though speaking of Linux, I actually wouldn't mind having BSD's Linux compatibility layer on macOS either.
- nix23 4y ago> I'd really like to see jails/BSD containers on macOS. That's not how jails work.
- simonh 4y agoThey’re just asking for an equivalent feature.
- musicale 4y agoIndeed. Also note post I was responding to. Note that macOS' Xnu kernel supports BSD system calls (e.g. chroot(2)), and macOS includes a BSD userland which I think is largely derived from FreeBSD. In principle it should be possible (though non-trivial) to add support for the relevant BSD system calls such as jail(2) and jail_attach(2), as well as the appropriate sysctls to enable BSD jails to actually run natively on macOS. (For comparison, Linux implements containers primarily via the unshare(2) and setns(2) system calls, as well as /proc and cgroups. It's more of an a la carte approach since there are a number of independent namespaces supported by unshare(2). And bind mounts, overlayfs and the older unionfs, and the venerable chroot(2). Etc.) To me it seems that supporting the BSD system calls and infrastructure would be a reasonable evolution of macOS' BSD subsystem. Moreover, as you note, macOS could add an Apple-specific native container feature or framework. Consider that macOS already has a lower-level Hypervisor framework as well as a higher-level Virtualization framework which provided an easy to use API for creating VMs. They could implement their own Container framework or perhaps adapt or extend the existing Virtualization framework.
- xoa 4y ago>such as ZFS FWIW, ZFS has actually been available on macOS for a long time in various iterations (MacZFS, Z-410/ZEVO, and now OpenZFS [0]). I ran it for around 11 years on a number of systems with almost all of my data on it (home folder, applications, /opt for MacPorts etc) and it was a tank. Fun project and well worth checking out. I'll always regret the various factors that meant Apple didn't adopt it as their native FS. ---- 0: https://openzfsonosx.org/ https://openzfsonosx.org/
- przemub 4y agoI wonder, comparing with APFS do you miss it?
- xoa 4y agoI haven't given it up, I'm stubborn :). What I do now though at the desktop is have my user folder and data that I previously had on an internal or DAS ZFS fs instead live on an APFS formatted iSCSI LUN which in turn is a zvol on a NAS. So it's all still ZFS underneath, I still get all the data protection and ease of backups and so on, the performance is decent [0], but macOS thinks it is running perfectly native, and I don't need to worry at all about upgrades since the ZFS layer underneath is transparent. Well, at least not so long as I can still use iSCSI under macOS of course, right now that is still fine but if Apple kills the ability to run initiators down the road with no replacement option I'll be in trouble once again. I do miss some aspects anyway in terms of the ease of spinning up/cloning independent FS for projects, VMs etc and having them right there instantly, with their own snapshot policies and rollback chains. Obviously can still do that on a NAS and expose it but it's not at all as frictionless a process. I also miss not being able to do restores as easily, but Apple has steadily killed a lot of the convenience Macs had there and really wants you on the rails of their scheme, so it's better to just try to move as much custom stuff as possible outside the root fs entirely then overlay mount or point to different paths instead. I do still use it on my older MBP but I don't know how that'll survive transition to the AS era. Previously you could through some effort boot off it even, but my assumption is that will be utterly dead going forward so at most it'll be partitioning the internal drive. From my admittedly biased perspective APFS kind of sucks, it still sees data corruption, it's much harder to repair than HFS if something breaks since Apple doesn't bother to document or stabilize stuff anymore. I still think moving away from normalization was stupid. Overall though it is what it is, and it's Apple's native choice and it mostly doesn't get in the way. I know there's some clever stuff to do with CoreStorage as well and some people have played with using that along with ZFS but I have not. So yes, guess that turned into a very long way to say that I would indeed miss it if it ever comes to that. ---- 0: No issues saturating a 10G fiber link or 8g FC, and I've seen demoes hitting over 11GB/s (88 Gbps) on a Mac Pro 2019 with a higher end FC that I can't afford.