External Drive for storage
I'm considering the purchase of the new M1 Mini as my solution for my new home security camera system. I want to get an external drive to store the video. Does anyone have any recommendations for this? Is a USB3 drive sufficient, or should I get a USB-C/Thunderbolt drive?
Comments
Thunderbolt drives/enclosures are more expensive than USB enclosures, and there's no point in the extra speed (40 times faster than a fast SSD, and hundreds of times faster than the fastest HDD).
The other choice is whether to go for the SSD (fast but expensive and reliable) or HDD (slower but cheap). If you're mainly doing motion detection, rather than recording continuously at high frame rates, then a standard HDD drive would do the job. In this case, I would recommend a 3.5" drive over a 2.5" drive, as these tend to be faster, higher capacity, and more reliable in the long run.
Note that the terminology is confusing, and drives can be mislabelled. USB 3.0, USB 3.1 and Thunderbolt are all protocols, whereas USB-A, USB-B, USB-C are physical port specifications. USB 3.0 tends to use USB-A ports, whereas USB 3.1 and Thunderbolt tend to use USB-C ports. Sometimes, USB 3.1 drives that use USB-C are mislabelled as Thunderbolt.
I bought this on Amazon for around $90. It seems to work fine.
Also: before usage with SecuritySpy, I would recommend using Disk Utility to format the external drive with "Mac OS Extended (Journaled)" format.
The USB terminology is a bit confusing. I could imagine a four bay RAID 5 array, perhaps based on 7200 RPM "surveillance grade" hard drives. SSD drives, not just prohibitively expensive, might not be desirable in a continuous read-write setting, not sure.
Any recommendations for very large capacity direct attached storage for Mac Mini M1 for 24/7 recording? In this case is USB 3.1 recommended?
Given a properly structured gigabit network, would a NAS (=network attached storage) perform SecuritySpy interaction services just as well?
Thanks all for any feedback you may provide.
PS: On edit, I wanted to add my own experience based on older hardware, and I guess I'm wondering what may have changed. In my installation I have twenty cameras, 1080p and 4K and a (now very old) Promise Pegasus R6 (RAID5 10TB usable) connected by Thunderbolt 2 to a 2015 iMac. SecuritySpy files had been recorded flawlessly to this direct attached storage for years. More recently I've chosen to run SecuritySpy on a different iMac and so SS files are being recorded to the RAID by file sharing over the network, and I've noticed no change in performance.
You might want RAID for redundancy, to minimise the risk of data loss in the case of a drive failure. RAID 5 would work, but this requires a minimum of 3 drives, and write speeds aren't great. For the system you are describing, RAID 1 (mirroring) with two drives is probably best - fast write speeds and 1-drive redundancy.
Customers do use NAS devices, and they can work well, but I wouldn't recommend them if there are reasonable options for direct (USB, Thunderbolt) attachment. The network connection is inherently less reliable than a direct bus.
Thanks and I have a lot of reading up on this to do, thank you for providing this discussion forum to learn from.
1. Add a large external (USB 3.0 or 3.1) drive, and set SecuritySpy to capture directly to this drive for all cameras. This can be set under Preferences > Storage. This could be a single large HDD or a RAID setup (RAID offers potentially a lot more storage space, as well as fault tolerance). You can use our calculator to determine a good size for this drive.
2. SecuritySpy records to the internal drive and it uploads files automatically to an FTP or Amazon S3 server. This is a good way to provide a backup of recordings with a long history in case something happens to the recording machine. The FTP server could be a NAS on your local network, or an Internet server (though for so many cameras, an internet connection with a very fast upload speed would be required for this). Note that SecuritySpy can't manage the storage of files on FTP servers (i.e. can't auto-delete old files) so this would have to be done by some other means.
3. SecuritySpy records to the internal drive, and you implement some kind of archiving method, with some script/software that automatically removes old files from the Mac's internal drive to some archival drive. This could work well, though SecuritySpy wouldn't be able to access files on this archival drive; the files would just be there for manual access just in case you need them. So SecuritySpy would essentially see a history up to the 2 TB size of the internal drive (which should be a reasonably long history if you are using Motion Capture and not Continuous Capture).
I would say that option 1 is usually the best: you get a large amount of storage, which SecuritySpy can manage, and which SecuritySpy has complete access to. And you don't need to use any add-on scripts or apps to manage/archive files.
I think I would be able to get higher FPS recording with better performance if I'm saving to the internal drive it is EXTREMELY fast, I just feel like I'm putting a lot of un-needed strain on hard drives with constant writes. I also have 2 2TB EVOs I can put into a JBOD external usb-c enclosure and run some tests with that. Sorry for the wordbarf. Happy new years!
I have an idea what I'm going to wind up doing, but I'm taking some notes and I'll let you know what I wind up with successfully.
Your external drive is very fast - I would recommend using it directly as SecuritySpy's capture destination. It has plenty of speed even for continuous recording of many high-resolution cameras. Capturing directly to the drive puts no more strain on it than would capturing to the internal SSD and then copying all those files to the external drive using some other means.
Unfortunately/fortunately the guys are asking me to add another 40 Cams but I don't forsee this to be a problem in terms of IOPS, but may bring me back down from the 15fps I was looking to get, but we will see. I just wanted to confirm that symlinks do work. There is a slight additional latency (<10ms) added when viewing files from external hdd array, but the whole backup process occurs while your program is running, and rsync fails beautifully when a file is still being accessed, and with the following commands, only the files that are copied seem to be replaced by their symlink equivalents. Your program doesn't seem to be affected in the slightest to the human eye (obviously a non-zero measurable amount, but I haven't gotten there yet)
Where /Volumes/ExternalArchive/ is the mounted 28TB
This command backs up all Video File Data to External Drive via a copy command using rsync, ignoring already created symlinks
rsync -aP --no-links ~/SecuritySpy/Captured\ Files /Volumes/ExternalArchive/Archives/Automatic
This command then creates/replaces originals with symlinks and backs up copies
master_delivery -v -d ~/SecuritySpy/Captured\ Files -m /Volumes/ExternalArchive/Archives/Automatic/Captured\ Files -t symbolic_link
There are backups of the video files created (effectively duplicates, i think manually creating this process would ignore that step, but I'll probably throw 2x4TB SSDs in a JBOD and incorporate that somehow into the backup where it makes sense (maybe have it operate as a cache since nvme->jbod ssd will perform faster, then jbod ssd->raid0 hdd will transfer without performance impact to nvme. Having a lot of fun with this, gonna buy a license soon I think my 30 days is almost up.
I plan to do daily rsyncs and then weekly symlink replacements, and next thing to figure out is how to increase retention to the most ridiculous amount possible.
*** This is something I was looking to accomplish on Unifi-Video's NVR solution, and I believe this technique would be very effective on their systems as well. Hope you don't mind that mention. I don't ever read rules, I just blindly agree to stuff but I mean well