Cache pools
In Unraid, a cache pool is a collection of one or more drives, typically SSDs or high-speed HDDs. These drives temporarily store data before it's moved to your main array. Using cache pools can significantly enhance write speeds, protect your data, and provide dedicated storage for specific tasks like running Docker containers or virtual machines.
Cache pools offer several advantages, making them a valuable addition to your Unraid setup, such as:
-
Faster write speeds: Cache pools allow you to quickly write data to faster drives before it gets transferred to the main array. This greatly enhances perceived performance when saving files.
-
Data protection for cached files: By using multiple drives in a cache pool (like setting them up in RAID 1), you add redundancy. This means your cached data is protected from drive failure before it even reaches the main array.
-
Optimized storage for applications: Storing applications like Docker containers or virtual machines on a cache pool improves their performance, reduces wear on your main array, and minimizes the time it takes to access frequently-used files.
-
Flexible and dedicated storage: With multiple cache pools, you can assign specific pools for different tasks. For instance, you could have one pool dedicated to downloads and another for virtual machines, reducing competition for resources and boosting efficiency.
- Multiple pools: You can create and name different cache pools, tailoring them to match your specific needs.
- SSD vs. HDD: SSDs are great for speed, while you can use HDDs for large, sequential data workloads. Additionally, HDDs can help prolong the lifespan of your SSDs.
- Redundancy matters: To protect your data, use more than one drive in a cache pool. A single drive pool won't protect you from potential drive failure.
- File system choice: The default file system for cache pools is BTRFS, which supports various RAID options for added redundancy and flexibility. For more details on file system selection, see File systems.
- Mover integration: Data written to a cache pool is automatically transferred to your main array based on a schedule you set. This keeps your user shares organized and easy to manage.
- Application performance: By placing Docker containers, app data, and VM disks on a cache pool, you enhance access speed and minimize strain on your main storage.
Pool modes
Unraid cache pools can operate in two main modes: single device mode and multi-device mode. Knowing the difference between these modes will help you find the right balance between performance, flexibility, and data protection for your needs.
Single device mode
In single device mode, your cache pool consists of only one device. This means:
- No redundancy: If the device fails, any data stored on it that hasn't been transferred to your array will be lost.
- File system options: You can use file systems other than BTRFS, like XFS or ZFS.
If you choose a non-BTRFS or non-ZFS file system in single device mode and later decide to add more devices to the pool, you will need to reformat the device as BTRFS or ZFS first. That's why BTRFS is the default file system for cache pools, even when using just one device. Both BTRFS and ZFS support adding devices later to create mirrored pools. For more information on file system selection and compatibility, see File systems.
Single device mode is straightforward. You can easily add or remove the device, but you won't have options for advanced features like redundancy or expansion.
Multi-device mode
When you set up a cache pool with more than one device, it enters multi-device mode. Here's what you should know:
- Data protection: This mode uses BTRFS or ZFS to mirror data across devices, helping protect your cached data from drive failure. You can lose one device without losing any data.
- Mix and match: You can add or remove devices of different sizes and types, including mixing SSDs and HDDs.
- Capacity management: Use the BTRFS disk usage calculator to estimate how much space you'll have based on the RAID level and sizes of the devices you're using. For ZFS pools, use the ZFS storage guide for configuration details.
Common tasks for the cache pool include:
- Switching between single and multi-device modes
- Adding disks to a pool
- Replacing disks in a pool
- Moving files between the pool and the array (see Moving files between a pool and the array)
Switching to Multi-Device Mode
Cache pools in Unraid can be expanded from a single device to multiple devices, allowing for increased capacity and redundancy. To take advantage of multi-device mode, your pool must be formatted as BTRFS or ZFS.
Converting a pool to BTRFS or ZFS
If your cache pool isn't already formatted as BTRFS or ZFS, you can convert it using the following steps.
To convert a pool to BTRFS or ZFS:
- Back up important content. See Moving files between a pool and the array to move files from your pool to the array.
- Stop the array.
- In the Main tab, click the pool and select BTRFS or ZFS as the file system format.
- Start the array.
- When the pool shows as unmountable, confirm and click Format.
- After formatting, you’ll have a BTRFS or ZFS pool (single device at this stage).
- (Optional) Add additional drives as needed.
- Restore your data by moving files back to the pool.
Adding drives to create a multi-device pool
Once your pool is formatted as BTRFS or ZFS, you can add more drives for redundancy and to expand storage.
To add more drives for redundancy:
- Stop the array.
- In the Main tab, assign one or more new devices to your pool.
- Start the array.
- Unraid automatically incorporates the new devices and starts a balance (BTRFS) or resilver (ZFS).
- In the Main tab, click the first pool device and check Balance Status (BTRFS) or zpool status (ZFS) to follow progress.
- When complete, the pool operates in multi-device mode with enhanced capacity and redundancy.
You can use the BTRFS Disk Usage Calculator to estimate available space and redundancy based on your chosen RAID level and device sizes.
Adding disks to a pool
As your storage needs grow, you may want to expand your cache pool by adding additional disks. This process allows you to increase both capacity and performance while maintaining data protection through RAID configurations.
If you want to add disks to your pool, make sure your pool is already formatted as BTRFS or ZFS. If it's not, you'll need to format it first, as explained in Converting a pool to BTRFS or ZFS.
To add a disk to a pool:
- Stop the array.
- In the Main tab, open the pool.
- In the Pool Devices section, set Slots to the exact number of additional devices.
- Assign the new devices to the available slots.
- Start the array to enable the changes.
Removing disks from a pool
Removing a disk from a BTRFS or ZFS multi-device cache pool can help you reclaim hardware, replace a failing drive, or reconfigure your storage. This process is only possible if your pool is set up for redundancy (like RAID 1 for both data and metadata) and the remaining devices have enough space to hold all of your data.
Using the WebGUI
- You can only remove one drive at a time using the GUI.
- Make sure your pool is using a redundant RAID profile (like RAID 1 for both data and metadata).
- To check your pool's RAID level, navigate to the Main tab and click on the pool. Scroll down to the Balance Status section (for BTRFS) or ZFS pool status (for