What RAID to use for a new NVR/NAS combo?

HaxNobody

n00b
Joined
Nov 20, 2012
Messages
53
I'm building a new NVR that will also do some light NAS duties. Obviously this is a write-intensive application, but I also need decent seek performance for playback. I want to build a 4-bay hotswap setup, and I would like to know what you guys recommend for the RAID type? I've heard of a few different kinds, but I don't know how well each of them is suited for this particular application - for example, RAID 10, ZFS, unraid, etc. Recommendations?
 

iroc409

[H]ard|Gawd
Joined
Jun 17, 2006
Messages
1,373
It might depend on what you want for storage for the NVR versus what you want for storage for the NAS. For me, if it was a PC-based rig I'd probably just toss a single surveillance type hard drive in for the NVR and build a RAID array for data. If you're looking more towards an appliance I'd just run whatever Synology floats your boat and use their RAID system and store it all together.

My personal NAS at home is PC-server-based and runs ZFS mirrors, and I'm planning on a separate NVR rig with just a single drive for video. I'd maybe do a single mirror for it, but I guess it depends a lot on how many cameras and how much storage. I don't see a need for much redundancy in a NVR system for home, and my personal needs for cameras are pretty minimal. For 4 drives your options with ZFS are mirrors or RAIDZ2, and you can probably flip a coin but I'd lean towards RAIDZ2. If you're sticking with 4 drives in a hot swap unit, you could use a single NVR drive and a 3-disk RAIDz1 (I know, the horror!).
 
Last edited:

IdiotInCharge

NVIDIA SHILL
Joined
Jun 13, 2003
Messages
14,679
If it's going to be one volume and you want it to just work, I'd get a Synology as mentioned above with four 7200RPM drives and use a pair of mirrors.

Note that a single hard drive can do 200MB/s read and write, while 1GbE tops out at 110MB/s, so think about networking if you need more speed.
 

HaxNobody

n00b
Joined
Nov 20, 2012
Messages
53
This is going to be for a commercial UniFi Video setup, so I can't run on a pre baked NAS OS. I have used their Atom-based NVR with its 2TB 2.5" drive, and it had lackluster performance when dealing with more than about 15 cameras.
The NAS actually won't need a lot of space, I might allocate 500gb-1tb.
 

iroc409

[H]ard|Gawd
Joined
Jun 17, 2006
Messages
1,373
That sounds like a pretty significant setup. That's way outside my wheelhouse so I'll defer to other experts. I'd probably think about separating the NAS and NVR with 15+ cameras. Aren't you stuck now with UniFi hardware with Video/Protect?

I don't have any idea what UniFi does, but with Blue Iris and the ipcamtalk storage calculator 1TB of storage is only about a day and a half of footage with 20 3MP cameras. Blue Iris is probably a totally different critter too, but that many cameras with decent resolution would require a *lot* more than an atom... probably a Xeon or two from what I've read. You should be able to connect UniFi cams to Blue Iris if you had the desire to use something else. With the number of cameras and resolutions, you should be able to roughly calculate bitrate and what you'd need to write as well to see if you can get by with a single GigE, multiple NIC/10gb, storage array, etc.
 

_Gea

2[H]4U
Joined
Dec 5, 2010
Messages
4,042
You need a solution that is capable for a certain write performance on a load that is not sequential but random. In such a situation a disk with a sequential performance of say 150 MB on average (inner/outer tracks) can go down to 50 MB/s random write performance.

You can increase this random write performance either with raid like raid-10 where every mirror doubles write performance and iops. Your other option is a rambased write cache that collects small random writes to transform them to large and faster sequential writes like ZFS do.

The rest is either math or wanted data security.

If a single cam delivers say 10 MB/s and a disk has 50 MB/s you can use up to 5 cams. If a cache helps to go up to 100 MB/s you can use 10 cams. If you use a raid-10 instead, this double numbers.

The second question after raid-modus is filesystem. Here you find faster ones or those with a better data security. If security is a concern, use ZFS and if performance is relevant, use Raid-10 and enough RAM (ex 32 GB) that you use as read and write cache.

With more than say 10 cams, use link aggregation (2 x 1G) or at best prefer a faster 10G link from storage to the next switch.
 
Last edited:

HaxNobody

n00b
Joined
Nov 20, 2012
Messages
53
Aren't you stuck now with UniFi hardware with Video/Protect?
Protect does lock you into their hardware as far as the NVR goes, but the old Video platform, while not very maintained, is still available for custom server builds.

You need a solution that is capable for a certain write performance on a load that is not sequential but random. In such a situation a disk with a sequential performance of say 150 MB on average (inner/outer tracks) can go down to 50 MB/s random write performance.

You can increase this random write performance either with raid like raid-10 where every mirror doubles write performance and iops. Your other option is a rambased write cache that collects small random writes to transform them to large and faster sequential writes like ZFS do.

The rest is either math or wanted data security.

If a single cam delivers say 10 MB/s and a disk has 50 MB/s you can use up to 5 cams. If a cache helps to go up to 100 MB/s you can use 10 cams. If you use a raid-10 instead, this double numbers.

The second question after raid-modus is filesystem. Here you find faster ones or those with a better data security. If security is a concern, use ZFS and if performance is relevant, use Raid-10 and enough RAM (ex 32 GB) that you use as read and write cache.

With more than say 10 cams, use link aggregation (2 x 1G) or at best prefer a faster 10G link from storage to the next switch.
Thanks for the input, much appreciated. The randomness was what I was concerned about. At this point, I'm thinking RAID 10 for performance, and then I just need to decide on which filesystem and how much caching.

As far as I am aware, these cameras don't exceed 6 Mbps on the highest resolution and bitrate for the 1080p cameras, and I will only have one 4k camera as a test pilot.
 
Top