Quota for Hikvision camera on NAS

Joined
Feb 2, 2016
Messages
2
Reaction score
0
I have my DS-2CD2032-I configured to send video files (from motion detection) to a folder on my Synology NAS, using NFS. This is working fine and stable, the only issue is that it fills up my 3Tb disk. Can I configure this in such way that the camera can only use let's say 100Gb or store data for only the past 21 days? I was thinking of runnig a script on my NAS to delete files older than 21 days but would this not mess up the current setup?

Thanks
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,963
Reaction score
6,794
Location
Scotland
Can you use an SMB/CIFS share instead of NFS and apply per-user quotas?
Does your NAS have storage pools where you can allocate a specified amount of space for a new storage volume, from which a camera-specific share can be created?
Another method, depending on how much Linux support there is in the Synology NAS, might be to create a large emtpty file (eg use dd from /dev/urandom), format it as a file system, say EXT3 or EXT4, mount it and share it.
And add to fstab or the equivalent to survive a reboot.
 
Joined
Feb 2, 2016
Messages
2
Reaction score
0
Thanks for the given tips, I'll look into those.
To be honest, my preferred solution would be to have files deleted after x days instead of giving the camera a certain volume of mb's. Is this something somebody has implemented?
 

fixingstill

Young grasshopper
Joined
Apr 9, 2016
Messages
34
Reaction score
5
No auto recycling? HikVision cameras can't delete the oldest videos when it sees that storage is full? Who wants to watch the storage and do the manual deletion?
 

Tolting Colt Acres

Pulling my weight
Joined
Jun 7, 2016
Messages
378
Reaction score
153
The Hikvision NetHDD implementation will not overwrite files older than X # of days. The only mechanism to deal with a situation as you describe is to limit the amount of disk storage available to the camera. You can do this with quotas at a user level (one user per camera) applied to a directory mount point (one for each camera), or, by creating separate virtual disks (one for each camera) with a hard limit in terms of their size.

I use the latter approach. that is, I have a PERC H700 RAID controller in my NAS on which I have carved out 1TB file systems, one for each camera. Each VD is formatted as an XFS filesystem, which I then mount into a directory structure. Each camera then mounts its own filesystem using SMB or NFS.
 

fixingstill

Young grasshopper
Joined
Apr 9, 2016
Messages
34
Reaction score
5
What happened when that 1TB is filled up? The camera will fail to save videos and it never informs you and next day you have a burglary and you need to lookup the video and it is not there? Hikvision really need to figure out how to delete old videos to keep the storage usage under control.
What if the local storage SD card (128GB) is used instead? And how many days can 128GB store (ball park, average, typical) for a 2MP, 3MP or 4MP cameras? 1 day? 1 week? 1 month?
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,963
Reaction score
6,794
Location
Scotland
No auto recycling? HikVision cameras can't delete the oldest videos when it sees that storage is full?
When the camera 'formats' the volume to initiallise it, the result is a framework of folders and placeholder files and indexes.
These are simply re-used as needed as opposed to being deleted and new recreated as the history grows.
Hikvision really need to figure out how to delete old videos to keep the storage usage under control.
That's not how it works - it's obvious how the storage is organised if you would actually take a look.
The assigned volume is filled with the placeholder files and folders - it's not empty storage being progressively filled up.
 

Tolting Colt Acres

Pulling my weight
Joined
Jun 7, 2016
Messages
378
Reaction score
153
What happened when that 1TB is filled up? The camera will fail to save videos and it never informs you and next day you have a burglary and you need to lookup the video and it is not there? Hikvision really need to figure out how to delete old videos to keep the storage usage under control.
You can tell the camera to "overwrite" old files, so, in theory, when the 1TB fills up, it should start overwriting the old stuff. Unfortunately, I found my 2042's did not do this, and simply stopped recording, on 5.3.8. I am now running 5.4, and preliminary testing I did on a small 16GB share seemed to indicate the overwrite functionality was working, but, it will take a while now for me to be certain, since I had to reformat my storage with 5.4 to get recording functional again.

What if the local storage SD card (128GB) is used instead? And how many days can 128GB store (ball park, average, typical) for a 2MP, 3MP or 4MP cameras? 1 day? 1 week? 1 month?
Hikvision has a disk storage calculator, I recommend you use that. There are way too many variables here to be able to answer your question. For example, I have 12 4MP cameras set to record on motion only in stalls and turnouts. They will all fill up storage at different rates, depending on how much activity there is.
 

fixingstill

Young grasshopper
Joined
Apr 9, 2016
Messages
34
Reaction score
5
I see - Placeholder files immediately created when camera "formats".
I am having trouble connecting my to my synology. It can't mount the NFS share. Looks like I have to enable Quota for the share as the camera might be having a hard time determining the size of the share...

I see - no way to guarantee a number of days of videos will be recorded even you have enough storage. If a lot of motion (people walking past, windy days, tree shadows), you won't get as many days as calm days would give you. That means a lot of testing to make sure if I go for a vacation and I come back to a burglary, I can catch the action. Too bad local storage (if featured) is up to 128GB.
 
Last edited by a moderator:

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,963
Reaction score
6,794
Location
Scotland
Does your Synology NAS have the 'Logical Volume Manager' facility where you can create flexible volumes of arbitrary size?
If so - that way you can experiment with what volume size the specific firmware on the camera will handle.
The size limit has varied with the firmware implementation - it's not one of Hikvision's best coding examples.
 

fixingstill

Young grasshopper
Joined
Apr 9, 2016
Messages
34
Reaction score
5
Well, at least HikVision has that feature. I have been using eBay Chinese ONVIF cameras and Geovision NVR to detect motion and save and playback them. If I change out all cameras to HikVision and use the local SD card storage or Net HDD, I might end up ditching the NVR (Intel i7 running 24x7) and just run iVMS to playback when I need to.
Side question. Is HikVision the only company that does Net HDD recording motion detected? Can Dahua do that? Who else? HikVision seems to be the choice as but I want to look any 2nd choices first...
 

fixingstill

Young grasshopper
Joined
Apr 9, 2016
Messages
34
Reaction score
5
Time to buy some more HDDs to mess with the storage volume things.
 

Svennos

n3wb
Joined
Jul 3, 2016
Messages
2
Reaction score
0
If you have a Synology, why don't you use Surveillance Station, which is included on a Synology NAS? You can set recycling to for example a nr of days automatically.
 

fixingstill

Young grasshopper
Joined
Apr 9, 2016
Messages
34
Reaction score
5
If you have a Synology, why don't you use Surveillance Station, which is included on a Synology NAS? You can set recycling to for example a nr of days automatically.
$$$. Those licenses are VERY expensive.
 
Top