5 ms·
I'm not familiar with NAS file systems. Is it fairly straight forward to use hard drives with SSDs as transparent cache, and make it look like a single file sha
by sorenjan 4y ago
I'm not familiar with NAS file systems. Is it fairly straight forward to use hard drives with SSDs as transparent cache, and make it look like a single file share?
- js2 4y agoI had written a long comment about ZFS caching and still didn't do a good job, so let me link you to this instead: https://www.truenas.com/docs/references/slog/ https://www.truenas.com/docs/references/slog/ The short version is: - ZFS caches reads into RAM. Gobs of RAM helps. You can also add a secondary read cache device (L2ARC). - ZFS can caches synchronous writes to an SLOG device, but if you've disabled synchronous writes it won't make a difference. An SLOG device makes no difference for asynchronous writes. I use ZFS for my Time Machine backups (among other things) and have synchronous writes disabled for the Time Machine datasets. Before we had ZFS, the traditional way to speed up NAS was a raid controller with a battery-backed RAM cache.
- pdimitar 4y agoHow do you use your ZFS NAS for Time Machine backups? Very curious, I'd like to do the same.
- js2 4y agoI'm using TrueNAS which makes it pretty easy. I'm doing it via SMB (Samba). Previously I was doing it via AFP (Netatalk). This looks more or less correct: https://www.reddit.com/r/MacOS/comments/lh0yjc/configure_a_truenas_core_share_as_a_time_machine/ https://www.reddit.com/r/MacOS/comments/lh0yjc/configure_a_t... Basically it creates a dataset and a Samba share, and the configures Samba with a couple plugins so that: 1) a dataset is created for each user that connects to the share, so there's per-user datasets; 2) a ZFS snapshot is created automatically whenever Time Machine disconnects from the share. (2) is so that you can roll back if need be. In the past, I've had Time Machine decide that the sparse image it uses for a backup is corrupt and it wants to zero it out and start over. The ZFS snapshots lets you recover from that, though I haven't had it occur under macOS Monterey and/or since I switched to SMB from AFP. On the parent dataset I disabled sync. If you google for "TrueNAS Time Machine" you'll find some discussions of all this in the TrueNAS forums.
- sgarland 4y agoThat sounds great, but my biggest complaint with Free/TrueNAS is its insistence on the GUI. I expose a ZFS pool running in Debian to my network. All configuration for it an any other VM is handled in Ansible, and the OS images themselves are built with Packer + Ansible. I suspect the "Purpose: Multi-user Time Machine" selection is doing a lot of heavy lifting, but it's hidden away under a shiny frontend.
- js2 4y agoI totally understand if TrueNAS isn't for you. I use a mix of configuring it via the GUI and via the terminal. FWIW, it stores its entire config (everything but ssh keys) in an sqlite DB which you can export/import so despite the GUI, if you really wanted, you could configure it using Ansible or whatever with a bit of hackery. The "Multi-user Time Machine" is doing a bit of heavy-lifting yes. If you're really interested I can pull-out the details of the Samba config and how the ZFS dataset is configured. I do think it's using some TrueNAS specific Samba plugins, but I guess in theory those are open-source and could be compiled for Debian.
- sgarland 4y agoIt's a very nice product, and I've installed it before and imported my pool just to try it out. But since I already have monitoring, and my day job is automating all the things, it wasn't a good fit. For people who want an eminently reliable datastore with decent observability, it is perfect. > If you're really interested I can pull-out the details of the Samba config and how the ZFS dataset is configured. I would be thrilled to try implementing that, yes!
- js2 4y ago> my day job is automating all the things So is mine. but good golly, who the heck wants to keep doing their day job at home? For my home gear, I try to keep the IT stuff to a minimum. I've been using FreeNAS/TrueNAS for maybe a decade now and it just chugs along, no muss, no fuss. Migration and upgrades have been trivial. But anyway... Here's my samba config: https://gist.github.com/jaysoffian/43636b535ec37fdd31f0514bc51cdc87 https://gist.github.com/jaysoffian/43636b535ec37fdd31f0514bc... The "ixnas:" options require the Samba ixnas VFS. It's here, but I actually don't see these options in it: https://github.com/truenas/samba/blob/release/22.02.3/source3/modules/vfs_ixnas.c https://github.com/truenas/samba/blob/release/22.02.3/source... Here's a discussion of what they do though it's pretty obvious from their names: https://www.truenas.com/community/threads/configuration-options-for-ixnas.75835/ https://www.truenas.com/community/threads/configuration-opti... The fruit VFS is part of the normal Samba distribution. Here's the dataset properties: https://gist.github.com/jaysoffian/2d2ac21d60bc40194e01f362cc75bcbe https://gist.github.com/jaysoffian/2d2ac21d60bc40194e01f362c... Good luck.
- liuliu 4y agoBefore ZFS, you can layering bcache on top of your file system. But otherwise, ZFS L2ARC I believe nowadays also does persistence L2ARC.
- sorenjan 4y agoThank you for your answer. I take it that's a no to the "fairly straight forward" part of the question, but I'll look into TrueNAS if I'll decide to build a NAS.