So I have some space on my server rack, but not a lot of money lying around.
What I’m trying to achieve is a nas setup for my security camera system. It has 30 cameras, and 4 drives fill up in 3 months. 3X3TB drives.
Looking on eBay for a second hand rack mounted NaS is pretty expensive. Could I build one? From a jbod or something? I’ve got a nice big space in my rack doing nothing.
(I know I could buy bigger drives, but I kinda like the idea of experimenting with something g different) ✌️💛
Sure you can.
I use Rosewill rackmounted cases because they’re cheap and get the job done. They’re a far cry from any enterprise gear, but that’s not really needed in a homelab. Think of the typical material used on a desktop PC.
This is the case I use, but see if anything else jumps out at you:
Rosewill RSV-R4200U 4U Server Chassis Rackmount Case | 11 3.5" Bays, 3 2.5" Devices| ATX, CEB Compatible | 2 120mm Fan, 2 80mm Fans | USB 3.0, USB 2.0 | Black https://a.co/d/icPXCTH
The official Rosewill rails are pretty crap, so I used these. They work great:
iStar TC-RAIL-20 20-Inch Sliding Rail Kit for Most Rackmount Chassis https://a.co/d/iaJBFNl
Beyond that, where you want to go is sort of up to you. Really any motherboard / CPU / RAM will do if you’re only using it for storage. I used a few different parts I had laying around already, and then got some open box ones off eBay for things I needed to finish out the build.
OS is up to you as well. I like unRAID because it’s the “grow as you go” OS, but I’ve used TrueNAS in the past as well. Both are solid options but have a lot of different pros and cons.
Great tip on the rails!
I second the call out on these Rosewill cases. For the price they’re pretty solid.
Also, you’re right about the Rosewill rails, they’re terrible (source: I bought them and regret it).
+1 on the Rosewill cases. I bought the IstarUSA rails and managed to mangle the bearings on one side. It’s still generally functional though.
Void Linux + mdadm in RAID5 + BTRFS with snapshots enabled. Trust me, you won’t regret it 😉. I have a working storage like this, but with 6 drives (scrap 2TB ones in RAID5) and BTRFS with zstd set at 10. Compression on MPEG2 content is… more than I ever hoped for to be honest, like 30, 40% compression. MPEG4, not as much, but you can shim about 5 to 10%.
Do not do this setup if your data is critical. btrfs raid 5 isn’t stable
MPEG2 is, by today’s standards, horribly inefficient, so that is to be expected. Transcoding, in that case, will gain a lot more. But if your mp4 files still compress significantly with a standard lossless compression algorithm, something is wrong with your encoder settings. Even xz, which, even at the default Level 6 is often better than zstd at 19, will generally do less than 1%, typically 0.2%, even at level 9 (the highest).
To be honest, that percentage was after deduping everything, so it could be due to dups being deduped. The first one (the MPEG2 one) was before deduping, so that should be valid.
zstd can go up to 15 on BTRFS, not higher.
As to filling up the drives so fast, have you considered transcoding it to a smaller format (such as HEVC/H.265) in real time? I know that would require quite some CPU power. Even H.264 is likely to improve on camera native formats, as those often need to encode the videos with embedded/low-power CPUs. Do you need to retain the footage beyond 3 months?
I’ll check it out.
There’s no set period I need to retain. It’s just been handy, got myself out of trouble a few times in compliance complaints. a couple times I have wished I was able to go back further. That’s all.