Setting up Unraid with ZFS on an 24-disk server is a pretty exciting project. Here’s a detailed approach to help you plan this setup:
1. Hardware Considerations
- Server Configuration: Ensure your server hardware (CPU, RAM, and network interfaces) is robust enough to handle the load of managing 84 disks. ZFS can be RAM-intensive, so aim for at least 1GB of RAM per TB of storage.
- JBOD Configuration: Make sure the JBOD enclosure and connections (SAS/SATA) are reliable and support hot-swapping for easier disk management.
2. ZFS Pool Design
- VDEVs and Redundancy: Decide on the type of VDEVs (Virtual Devices) you want to use. Common configurations include:
- RAIDZ1/2/3: Provides single, double, or triple parity, respectively. RAIDZ2 is a good balance for large pools, offering double parity.
- Mirror VDEVs: Provide high performance and redundancy but at the cost of storage efficiency (50% of raw capacity).
- Number of VDEVs: With 24 disks, you can create multiple VDEVs. For example:
- 7 VDEVs of 12 disks each in RAIDZ2 (10 data, 2 parity)
- 8 VDEVs of 10 disks each in RAIDZ2 (8 data, 2 parity)
- 4 VDEVs of 21 disks each in RAIDZ3 (18 data, 3 parity)
3. Pool Configuration
- Main Pool: Create a primary pool for your main storage needs. This pool will consist of your VDEVs. For instance,
zpool create mainpool raidz2 disk1 disk2 ... disk12 raidz2 disk13 disk14 ... disk24
and so on. - Cache Pool: If you have SSDs, use them as a cache pool (L2ARC) to speed up read operations and ZIL (ZFS Intent Log) for write operations. E.g.,
zpool add mainpool cache ssd1 ssd2
.
4. ZFS Features and Tuning
- Compression: Enable compression to save space and improve performance.
zfs set compression=lz4 mainpool
. - Deduplication: Only if you have enough RAM and your workload benefits from it. Deduplication is RAM-intensive.
- Snapshots: Regular snapshots for data protection.
zfs snapshot mainpool@snap1
. - SLOG Device: Use a fast SSD/NVMe for ZFS Intent Log to improve write performance.
5. Unraid Integration
- Unraid Configuration: Install Unraid on your server and set up the array with your ZFS pool.
- ZFS Plugin: Use the ZFS plugin for Unraid to manage your ZFS pools and datasets directly from the Unraid interface.
- Docker and VMs: Configure Docker containers and VMs to utilize your ZFS pool for storage.
6. Backup and Maintenance
- Regular Backups: Implement a backup strategy for critical data. Use tools like
zfs send
andzfs receive
for efficient ZFS backups. - Monitoring: Set up monitoring for disk health and performance. Use SMART tools and Unraid’s built-in monitoring features.
Example ZFS Commands:
- Creating the Pool:
zpool create -f mainpool raidz2 disk1 disk2 ... disk12 raidz2 disk13 disk14 ... disk24
- Adding Cache and Log Devices:
zpool add mainpool cache ssd1 ssd2 zpool add mainpool log ssd3
- Enabling Compression:
zfs set compression=lz4 mainpool
Conclusion
Setting up an Unraid server with 24 disks using ZFS is a powerful and flexible solution. By carefully planning your VDEV layout, pool configuration, and ZFS features, you can create a robust and efficient storage system. Make sure to monitor and maintain your setup regularly to ensure optimal performance and data integrity.