brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: format a single cache drive as btrfs or ZFS if a second drive might ever join it

Cache
~/tips/tip-unraid-single-cache-btrfs-or-zfs

Main > click the pool > File system type: btrfs or zfs

Choose a cache file system that lets you add a mirror drive later without reformatting.

One NVMe drive as cache is how a lot of Unraid servers start. XFS looks like the obvious pick for a single drive, since the array uses it too. The problem shows up the day you buy a second SSD to mirror the first.

The cache pools docs say it plainly: if you choose a file system other than btrfs or ZFS in single device mode and later want to add devices, you have to reformat the device as btrfs or ZFS first. Multi-device pools only support those two. That is exactly why btrfs is the default for cache pools even with one device. The file systems page adds that there’s no global default for pools, so a pool left on auto always becomes btrfs.

You set it per pool, with the array stopped:

Main > click the pool > File system type: btrfs or zfs
Start the array > Format (only if the pool is new or empty)

With btrfs or ZFS on the single drive, adding a second later is a matter of stopping the array, assigning the device and starting again. Unraid then runs a balance (btrfs) or resilver (ZFS) and you end up with a mirror without moving your appdata anywhere.

Should you already be on XFS, the way out is the long one from the docs: disable Docker and VM services, set each share with files on the cache to cache then array with Mover action cache to array, click Move Now, reformat, and move everything back with the direction reversed.

The caveat is that a single drive is still a single drive, whatever the file system. The docs warn that a one-device pool has no redundancy, so anything on it that hasn’t reached the array is lost if it dies. Keep a backup of appdata somewhere else.

Further reading: Unraid docs: Cache pools, Unraid docs: File systems

Going deeper: Guide: your Unraid cache is full and Docker stopped, how to find out why and fix it

More Cache tips fincore /var/lib/example/data.db npm cache verify fc-cache -f -v ~/.local/share/fonts proxy_cache app; Cache-Control: no-cache All Cache tips (24) All topics

Link