How to do data hoarding.
My personal server setup is:
- 5x USB hard drives.
- LUKS full-disk encryption with EXT4 on each drive.
- SnapRAID with 4 data drives and 2 parities.
- Mergerfs on the data drives with default values (mfs).
- SFTP to mount or transfer files.
- In general, get WD easystore disks from Best Buy when they're on sale.
- $15 per TB is great pricing for 8TB+ drives. When on sale, 12TB runs $180 and 14TB runs $200. You can also find $250 14TB bare drives on eBay.
- WD owns Hitachi Global Storage Technologies (HGST). All new HGST drives are WD drives.
- Avoid SMR drives which have worse performance and reliability. Specifically, their write performance is incredibly bad so you'll end up taking multiple days to rebuild parity drives in raid arrays.
- Avoid lower-end Seagate drives (e.g. rosewood).
Usually people like to shuck these and put them in a PC or multi-bay HDD enclosure.
You can also use them as-is but there are a few caveats:
- The included USB enclosures are typically fanless. This is okay if you let them spin down all the time. If you want to keep them spining all the time, you can
lsthem every few minutes. However, you should add a fan if you let them spin all the time.
- SMART data may or may not be available. You can try using
-d satwith smartctl.
If you decide to shuck the drive and you're using an older power supply, you may need to apply tape. See instructables.
Do not use molex to sata adapters. There is a saying among the Slickdeals community: molex to sata, lose all your data.
I recommend using a Linux distro such as Ubuntu or Debian. This allows you to use your NAS for other purposes without virtualizing a linux kernel. The main reason to consider is NAS-focused distro is to get a nice GUI for management.
TrueNAS Core (formerly FreeNAS) is a very popular FreeBSD based OS. Many people use it because it comes with a web interface for managing ZFS arrays. However these days, you can also use ZFS on linux.
If not using ZFS, make sure you format all drives using EXT4, XFS, or BTRFS.
Using NTFS will lead to performance issues (fragmentation) and permissions issues.
Below are some NAS-focused operating systems. I haven't tried any of them personally.
- TrueNAS Core (Formerly, FreeNAS)
- Unraid - A paid NAS OS based on Linux. This is popular among the virtualization community since it supports PCIE passthrough.
- Openmediavault - A debian fork with a GUI for managing your data.
You should test all hard drives, both new and old, before adding them to your array.
I just use LUKS for full disk encryption of every individual disk.
You can also use LUKS with ZFS.
- Archwiki: dm-crypt/Encrypting a non-root file system for full-disk or partition encryption. Most robust but only on Linux.
- See also LUKS.
- This is slightly more technical to setup due to not having a GUI.
- VeraCrypt for full-disk, partition, or container based encryption. Works across operating systems and has a nice GUI.
- Rclone for file-based encryption. No GUI but has a nice clean CLI interface.
- Cryptomator is also another good choice for local file-based encryption.
See https://www.privacytools.io/software/encryption-tools/ for more options.
It is inevitable that one of your drives will eventually fail.
In general, I strongly recommend against hardware Raid and intel RST Raid, despite them being the most popular.
When raid cards or motherboards fail, your data becomes difficult to recover.
I personally only use SnapRAID.
- Archwiki: ZFS is a good choice if you're building a server from scratch with uniform disk sizes
- SnapRaid allows you to create parity files out of existing disks.
- You can mix and match disks but the parity drives must be at least as large as the largest drive.
- You can have up to 6 parity drives for each SnapRaid configuration.
- See selfhostedhome.com: Combining Different Sized Drives with mergerfs and SnapRAID
- See also linuxserver.io The Perfect Media Server 2019
- Archwiki: mdadm is the default software raid which comes with most linux distros.
- Due to SnapRAID not being real-time, you should exclude applications such as MariaDB or GitLab. You can snapshot them separately to a folder with parity.
- rsync for local or ssh backups
- See Archwiki:rsync for more sophisticated incremental backups
- rclone for cloud backups
Union File Systems
- Nextcloud allows you to add an SFTP link as an external storage.
- Alternatively, you can also move the nextcloud directory to your array but then it'll be slightly more difficult to access using other methods.
Closed-source Windows Apps
Would not recommend creating a Windows NAS. If you want to though, most of the above also runs on Windows. Note: I have not tried the applications below.
Here is a list of popular closed-source apps:
- Storage Spaces comes with Windows.
- Stablebit DrivePool is like mergerfs but costs $30. They also have an rclone-esque software which costs $40.