TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

NixOS on Btrfs+tmpfs

81 pointsby shiryelabout 3 years ago

7 comments

viraptorabout 3 years ago
&gt; Most subvolumes can be mounted with noatime, except for &#x2F;home where I frequently need to sort files by modification time.<p>That doesn&#x27;t sound right. Noatime turns off recording of the last access time, not modification.
评论 #31293051 未加载
评论 #31292771 未加载
cesarbabout 3 years ago
&gt; After freeing the new SATA SSD, I also filled it with butter. Yes, all the way, no GPT, no MBR, just Btrfs, whose subvolumes were used in place of partitions<p>I would not recommend doing that. It might work for now, but there&#x27;s a high risk of the disk being seen as &quot;empty&quot; (since it has no partition table) by some tool (or even parts of the motherboard firmware), which could lead to data loss. Having an MBR, either the traditional MBR or the &quot;protective MBR&quot; used by GPT, prevents that, since tools which do not understand that particular partition scheme or filesystem would then treat the disk as containing data of an unknown type, instead of being completely empty; and the cost is just a couple of megabytes of wasted disk space, which is a trivial amount at current disk sizes (and btrfs itself probably &quot;wastes&quot; more than that in space reserved for its data structures). Nowadays, I always use GPT, both because of its extra resilience (GPT has a backup copy at the end of the disk) and the MBR limits (both on partition size and the number of possible partition types).
评论 #31297275 未加载
genghizkhanabout 3 years ago
I would prefer to do this on zfs, for which there is a lovely installation guide on the openzfs docs site.<p><a href="https:&#x2F;&#x2F;openzfs.github.io&#x2F;openzfs-docs&#x2F;Getting%20Started&#x2F;NixOS&#x2F;Root%20on%20ZFS.html" rel="nofollow">https:&#x2F;&#x2F;openzfs.github.io&#x2F;openzfs-docs&#x2F;Getting%20Started&#x2F;Nix...</a>
评论 #31292568 未加载
yjftsjthsd-habout 3 years ago
Neat:) I would never use btrfs myself[0], but very happy to see people exploring all variations of these ideas. The one thing that&#x27;s starting to bug me though, as I read blog posts about installing nixos: why is the install process so imperative&#x2F;non-declarative? Once the system is up, the whole thing fits in configuration.nix, but to get there we still have to use masses of shell commands. Is anyone working on bridging that last gap and supporting partitions, filesystems, and mounts (I think that&#x27;s all that&#x27;s left?) from nix itself?<p>[0] I lost 2 root filesystems to btrfs, probably because it couldn&#x27;t handle space exhaustion. I&#x27;m paranoid now.
评论 #31292449 未加载
评论 #31292775 未加载
yakubinabout 3 years ago
It would probably make sense to display <i>&lt;subdomain&gt;.srht.site</i> for submissions which match this domain pattern, similar to <i>github.io</i> sites.
评论 #31293601 未加载
anotherhueabout 3 years ago
Perhaps we can call this a &quot;Considered State&quot; system. No more haphazardly rearranging bytes on your drive. Managed OS objects, linked at boot and your home dir &#x2F; config dirs under VCS.<p>I use nixos with zfs on &#x2F;home, &#x2F;nix and &#x2F;persist. Everything else is tmpfs, including &#x2F;etc. Mostly you can configure applications to read config from &#x2F;persist, but when not, a bind mount from &#x2F;etc&#x2F;whatever to &#x2F;persist&#x2F;whatever works pretty well.<p>I will never use a computer any other way again.
kilburnabout 3 years ago
&gt; To make use of snapshots, the backup drive gotta be Btrfs as well. The compression level was turned up to 14 this time (default was 3):<p>Isn&#x27;t this useless? My understanding is that compression is only done at file write time. When you &quot;btrfs send&quot; a snapshot, the data is streamed over without recompression, so there&#x27;s no point in setting up a higher compression level in the backup disk.