Hikvision, NAS and Linux Virtual Filesystem

Forced

n3wb
Joined
Mar 2, 2015
Messages
3
Reaction score
0
Hello all, new Hikvision cam owner (DS-2CD2032-I V5.2.5 build 141201) and have experienced the well documented problems with getting the cameras to work with a NAS.

I've tried every NFS and SMB solution I can find and all suffer the same issue - each camera can see all of the disk space on the NAS rather than a quota portion so the cameras eventually consume all the NAS space, never overwriting old files.

I'm not a linux person (I'm trying to learn) - I tried writing a cron script to delete older video files from the NAS but the camera never recognized that space had been freed up.

I have been experimenting with a virtual file system setup in linux which seems like it would allow you to setup a defined space for each camera and allow them to overwrite old files as needed... details about the VFS setup here http://souptonuts.sourceforge.net/quota_tutorial.html or here https://samindaw.wordpress.com/2012/03/21/mounting-a-file-as-a-file-system-in-linux/

I have made some progress, but again I'm a total beginner at Linux and have not been able to get the cameras to see the VFS I created.

Just curious if any Linux and Hikvision gurus have made this work, and if so - how?

Thanks for any info!
 

Forced

n3wb
Joined
Mar 2, 2015
Messages
3
Reaction score
0
Haven't experimented with this at all, but what happens if you create a smaller separate partition for each camera? It sounds like they would still fill up, but it's a start.

Yes, the would fill up, but since each camera would see only it's assigned space, and not the full NAS space, each camera would automatically delete it's oldest videos when it's assigned space fills up.

As it stands, all four cameras see the full disk space of the NAS as free and just for them, so all four think they can fill it - and all four try - lol. Doesn't end pretty.
 

bubba123

Young grasshopper
Joined
Feb 5, 2015
Messages
47
Reaction score
13
Just enable quotas on Linux, then create a user (1 for each camera) and setup a user-based quota (http://www.thegeekstuff.com/2010/07/disk-quota/)

# quota -u cam1fp
Disk quotas for user cam1fp (uid 1005):
Filesystem blocks quota limit grace files quota limit grace
/dev/sdb4 1771360 50000000 52000000 201 0 0

Samba Config:

[cam1fp]
comment = Camera 1 Storage
browsable = no
path = /storage/cameras/cam1fp
group = cam1fp
writeable = yes
force group = cam1fp
force create mode = 664
force directory mode = 0775
 

Forced

n3wb
Joined
Mar 2, 2015
Messages
3
Reaction score
0
Somehow that doesn't work for me - I can create the users, assign the quotas and set a unique folder for each camera, but each camera sees the full NAS disk space and not the quota set for it, when doing the cameras "format" command.

That was using the web interface to configure - I'll try it using command line options to see if I get a different result.
 

bubba123

Young grasshopper
Joined
Feb 5, 2015
Messages
47
Reaction score
13
Quota support needs to be enabled on the disk partition. In my case, I had to add the quota option to stab and reboot. I run a Linux server with disks and not a NAS.
 
Top