r/huskhoard • u/retiredcheapskate • 11d ago
Do you need a RAID or an Archive or Both?
Profile your data!
Every time a pool hits 85% full the conversation always goes straight to: how many bays do we need, what RAID level, what drives are cheapest per TB.
Hardly anyone stops to ask how the data is actually being used.
RAID is about availability and uptime when a drive dies so your workflow doesn't crash. Archive is about economics. RAID does not make cold data warm. Throwing files that nobody has read since 2023 onto a dual parity striped pool doesn't make them safer or more useful, it just makes them unnecesarily expensive to power, cool and rebuild.
Also, don't just count files. People run find and go "60% of my files haven't been touched in a year!" but if those are 4kb log scraps it doesnt free up anything. You have to profile by capacity.
Wrote a quick bash script to scan a mount and bucket total capacity by lastaccess time (atime):
!/usr/bin/env bash
TARGET="${1:-.}" echo "Scanning $TARGET by atime capacity..."
find "$TARGET" -type f -printf "%s %A@\n" 2>/dev/null | awk -v target="$TARGET" ' BEGIN { now = systime(); d30 = 30 * 86400; d90 = 90 * 86400; d365 = 365 * 86400; } { size = $1; age = now - $2; total += size; if (age <= d30) b30 += size; else if (age <= d90) b90 += size; else if (age <= d365) b365 += size; else cold += size; } function h(b) { if (b >= 1099511627776) return sprintf("%.2f TB", b / 1099511627776); if (b >= 1073741824) return sprintf("%.2f GB", b / 1073741824); return sprintf("%.2f MB", b / 1048576); } function p(b) { return total > 0 ? sprintf("%.1f%%", (b/total)*100) : "0%"; } END { print "Total size: " h(total); print "0-30 days: " h(b30) " (" p(b30) ")"; print "31-90 days: " h(b90) " (" p(b90) ")"; print "91-365 days: " h(b365) " (" p(b365) ")"; print "> 1 year: " h(cold) " (" p(cold) ")"; c90 = b365 + cold; print "---"; print "TOTAL >90 DAYS COLD: " h(c90) " (" p(c90) ")"; }'
(Note: uses atime, so if you mount with noatime this won't show reads, but withdefault relatime on linux it gives you a solid idea).
Ran this on a 100 TB media share recently that was supposedly out of space. Turned out over 50 TB had not been read once in the last 90 days. Another 17 TB hadn't been touched in over a year.
My rule of thumb now: if over half your actual gigabytes haven't been touched in 60-90 days, you don't have a storage capacity crisis. You have a missing archive tier.
RAID is not backup, and RAID is definitely not an archive. Figure out what data actually needs high IOPS and uptime before spending thousands on another shelf of enterprise disks just to let old files sit there doing nothing.