TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

ZFSBootMenu – A boot loader to manage ZFS boot environments for Linux

158 点作者 nixcraft超过 2 年前

8 条评论

ninefathom超过 2 年前
I&#x27;m glad to see interest in this functionality taking off in Linux-land. I think there are one or two other projects with similar goals (i.e. implementing BE selection on Linux) and it might be time for me to do a side-by-side.<p>This capability was something of which the lack on Linux has long puzzled me. Solaris actually implemented a very early incarnation of this ability (called &quot;live upgrades&quot; at the time from its original use case) back in the early &#x27;00s- in Solaris 8, and on top of UFS no less, if I recall correctly. It evolved over the next decade first adding ZFS into the mix, then finally morphing from the early &quot;live upgrade&quot; stuff into the full &quot;boot environment&quot; concept around 2010 with Solaris 11. FreeBSD implemented it around 2012, in the early days of their ZFS work. More than a decade ago. That puts Linux at least ten years behind the curve here, and arguably closer to twenty.<p>I&#x27;m a fan of using the right tool for the right job, and jumping freely between Solaris (or OpenIndiana nowadays), Linux, and FreeBSD for any given deployment is par for the course. Until now, all other things being equal, FreeBSD or Solaris would often win out if minimizing downtime* was a much higher priority than ease of replacing admins. Assuming that BE support in Linux matures quickly, that calculus has now swung strongly in Linux&#x27;s favor.<p>*Re: minimizing downtime, if somebody is puzzled as to what I mean, think of the last time that you had a Linux installation fail to come back up to full operation after a borked round of package upgrades. It&#x27;s not often, but it does happen occasionally. Now imagine that the time you spent getting back up and working, whatever it might have been, was reliably less than sixty seconds. Now imagine it&#x27;s 2am, you&#x27;re not even fully awake following a panicked phone call from the operations night shift, and your job hangs in the balance. Makes quite a difference.
评论 #33574482 未加载
评论 #33575244 未加载
评论 #33579609 未加载
seized超过 2 年前
Boot environments are one of those magic features that when you&#x27;ve used it, it&#x27;s hard to give up.<p>My NAS has long been on OpenIndiana. Boot environments mean zero risk OS upgrades. At one point I could have gone back to a 4 year old OS version and booted it with no data loss.<p>You can create one at any time, so it brings an even better take on VM snapshots to the physical machine world. Hacking on something and want a fallback? &quot;Beadm create beforehacking&quot; and you&#x27;re safe.
评论 #33574221 未加载
评论 #33575200 未加载
esjeon超过 2 年前
I tried this alongside Void Linux, but I found I don&#x27;t really need it.<p>TBH, this is really cool. I liked that I&#x27;m able to choose snapshots for booting - a very good recovery option. The interface is well polished, and comes with fzf for quick searching. It&#x27;s a true dream for distro hoppers, since ZFS works like thin-provisioned partitions (though distro options are limited due to ZFS). Pretty cool in and out.<p>But it turned out to be a super-overkill for me. Firstly, I stopped dual-booting like a decade ago. I run everything else in VMs. Secondly, the host system these days hardly breaks. Lots of things work out-of-box unlike old days, and service settings can be isolated in containers. Thirdly, my host environment can be recreated within an hour including the download time and few trims, as long as `&#x2F;home` is backed up. So I don&#x27;t worry much about the root partition.<p>I wonder how this is working for others.
评论 #33575119 未加载
评论 #33578138 未加载
vermaden超过 2 年前
I still wait for ANY Linux distro that would have installer that would allow you to install Linux with Root on ZFS and with ZFSBootMenu (or any other ZFS Boot Environments tool) ...
评论 #33576232 未加载
评论 #33576112 未加载
Teknoman117超过 2 年前
I&#x27;ve been kinda doing a similar thing with my Gentoo installation on btrfs.<p>The btrfs subvolumes are structured like this:<p>&lt;root subvolume&gt;&#x2F;$(hostname)&#x2F;${environment}&#x2F;@volume (e.g. @root, @home)<p>snapshots look like this:<p>&lt;root subvolume&gt;&#x2F;$(hostname)&#x2F;${environment}&#x2F;volume_$(date -u +%Y-%m-%d_%H-%M-00)<p>I have a few scripts &quot;make-snapshots&quot;, &quot;backup-snapshots&quot;, &quot;update-shell&quot;, and &quot;update-commit&quot;. make-snapshots creates readonly snapshots of my system, backup-snapshots does incremental backups of those to my NAS, update-shell creates a writable snapshot of @root as @root-update and drops you into a chroot environment. You can then run all the portage commands you want without fear of borking your current environment. Upon exit it checks whatever the &#x2F;usr&#x2F;src&#x2F;linux symlink points to, copies the associated vmlinuz and initramfs images to the EFI partition, and creates&#x2F;updates a boot entry in rEFInd. You can then boot either into your previous version or the update version. Once you&#x27;re satisfied that your new environment works, you run &quot;update-commit&quot; which deletes the @root subvolume and replaces it with your current @root-update subvolume.<p>A change I&#x27;ve been considering is to drop the concept of having a @root subvolume at all. Current implementation requires two reboots: one to get from @root to @root-update, where (if it&#x27;s good) you delete @root and make a writable snapshot of @root-update as @root. The second reboot is to get onto (the new) @root. An alternative might be to include the date&#x2F;version in the name of the writable snapshots as well. &quot;committing&quot; the update would just mean setting the current booted subvolume as the &quot;head&quot;. Future snapshots&#x2F;updates will be made from that subvolume. No need for a reboot because you&#x27;re currently on it with everything mounted correctly. Any writable subvolumes older than &quot;head&quot; would be cleaned up upon booting &quot;head&quot;.<p>Could even go a step further and add something to my initramfs where if you try to boot a version where the writable subvolume has been deleted, it would make a temporary writable subvolume for it from the snapshot.
dazzawazza超过 2 年前
Always good to see Linux being inspired by FreeBSD.
评论 #33578095 未加载
nailer超过 2 年前
I mean you can’t maintain ZFS normally, and people have been trying to make zfs happen for what… two decades now?
评论 #33572418 未加载
评论 #33574409 未加载
评论 #33573132 未加载
评论 #33573681 未加载
评论 #33573410 未加载
kkfx超过 2 年前
So... After a decade GNU&#x2F;Linux have something similar to BEAdm integrated with the boot process...<p>When we talk about sorry state of REAL tech evolution this and many others features should be counted...