Can hikivision cams record directly to a NAS drive?

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,929
Reaction score
6,777
Location
Scotland
I've created an iSCSI LUN of 240G (to keep it under 250)
The cameras support either an NFS or SMB/CIFS based network share.
This can be connected and 'formatted' under the camera web GUI Storage | NetHDD menu. The 'format' creates a pre-defined placeholder framework of folders and files, the detail depending on the camera firmware version.

With SMB/CIFS on the QNAP NAS you can use User Quotas to limit the available volume size, to avoid the need to create multiple small volumes under LVM (Logical Volume Management).
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,929
Reaction score
6,777
Location
Scotland
Did you manage to control the available volume size with User Quotas? Save messing with creating custom-sized volumes?
 

twilly65

n3wb
Joined
Jul 4, 2018
Messages
3
Reaction score
1
Location
United States
Yes, at first I created iSCSI volumes, but as you pointed out, it could be done with user quotas instead. I deleted the iSCSI volumes, created a user account for the first camera, imposed quotas (system defaults to "all"), went back and changed others to no limits, and kept camera at 240G. Created another user/camera and it automatically set it to 240G. (Handy)

Formatted the new NetHDD partitions and it started writing. Pretty elegant once I understood what you did. ;-)
 

Jmk

n3wb
Joined
Jul 11, 2018
Messages
3
Reaction score
0
Location
Lagos
Hi, I have the same issue with my Synology NAS. I try to format the assigned quota on the camera and the I get 'device error'. Please who has been able to solve this?
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,929
Reaction score
6,777
Location
Scotland
I try to format the assigned quota on the camera and the I get 'device error'.
What is the size of the shared volume, and the firmware version of the camera?

The older firmware (about 5.3.0 from what I recall) has a volume size limit (not free space) of just over 200GB.
Can you create an SMB/CIFS shared volume and impose a user quota to limit the available size to the camera?
 

Jmk

n3wb
Joined
Jul 11, 2018
Messages
3
Reaction score
0
Location
Lagos
What is the size of the shared volume, and the firmware version of the camera?

The older firmware (about 5.3.0 from what I recall) has a volume size limit (not free space) of just over 200GB.
Can you create an SMB/CIFS shared volume and impose a user quota to limit the available size to the camera?
I am aware of this. I have the smb/cifs folder so I created user per camera and assigned quota of 200GBto each user user. I still get 'device error' when I click 'initialize'.
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,929
Reaction score
6,777
Location
Scotland
I still get 'device error' when I click 'initialize'.
Suggestions:
Check the user access permissions on the shared volume, maybe also the access logs on the NAS for clues.
Also try with an admin userID and see if anything changes.
 

Jmk

n3wb
Joined
Jul 11, 2018
Messages
3
Reaction score
0
Location
Lagos
Suggestions:
Check the user access permissions on the shared volume, maybe also the access logs on the NAS for clues.
Also try with an admin userID and see if anything changes.
Thanks for your suggestions.I tried another camera today with a different firmware and the result was positive. I figure it's a firmware issue.
 

whoslooking

IPCT Contributor
Joined
Oct 3, 2014
Messages
1,524
Reaction score
548
Location
London
Cool ... One last question

Do you know if there space in the turret housing for Ethernet connections and mount the turret directly to the wall or I need to use a junction box for the connections?

Bill
with the new style Turret you don't need the mounting box as there is now enough space for the pigtail with the RJ45 to sit nicely behind the camera.
 

pila

n3wb
Joined
Sep 28, 2015
Messages
25
Reaction score
2
Location
Croatia
Here is a copy/paste of my own current documentation:

Hikvision cameras recording: save to NAS and MicroSD

To save cameras directly to NAS, first the NAS must be configured, then the cameras. To save to MicroSD, only the last 3 steps are needed. One needs only the last 2 steps plus the NAS program configuration.

I have used the same method for saving to QNAP TS-253A and to Asustor NAS. Here is the QNAP described. I have made my cameras save to folders at USB3 disk connected to my router, but that should never be done in normal usage as it is quite likely this data will get lost.

As for the NAS It is possible to a) make cameras record directly to the NAS folders or b) use QNAP Surveillance Station to both record and review recording. The same applies to any NAS.

Method b) is both better and simpler. One can watch camera recordings on a TVs connected to the QNAP or any computer using any Web browser and also one can watch all the recordings directly on a TV using RPi and Kodi.

Method a) should be used only for cameras over the QNAP 4 free licence limit. HikVision (quite limited) program must be used to watch recordings on a computer.

How to (for both NAS and MicroSD cards)

1. Basically for any NAS or network (remote) disk: Create folders for each camera using the NAS software. Create new users for each of the cameras and assign disk Quota to them. Any NAS must be able to assign User Quota or else it is a gorified external hard drive. This is part of Unix for probably last 50 years. Procedure will differ. but terms will be more or less the same. Since the procedure forces creation of a root folder, to minimise the mess, I use the last segment of the network address in front of the camera name as that User Home folder.

1.1. on QNAP, one must first activate Quotas: Users -> Privilege settings -> Quota -> Enable Quota for all users 100 GB (you can adjust the default quota fore each user independnetly later).

1.2. Add Users: create the user 21Vrata with e.g. 100 or 30 gb quota. I assign 30 GB for cameras with small traffic or smaller fps, and 100 GB for larger needs for 2+ week recordings. Adjust Shared Folder Permission and/or Quota if needed. I do not allow this user access to any other folder than its own.

1.2.1. That should create a home folder 21Vrata if you have default Users -> Home Folder -> Enable turned on. It will likely be in /home or /homes and you may have to adjust a bit some of next steps.

1.2.2. When Home folder automatic creation is turned off: Users -> Privilege settings -> Shared Folders and Create a folder name /21Vrata and edit its Configure access privileges for users to give the user 21Vrata RW rights to this folder and click Create.

Then we switch to the camera Remote conifguraiton (I use iVMS Lite).

2.1. Storage -> NAS: Server address: 192.168.2.5 (adjust as needed), File path: \21Vrata (take care: enter / and not \). Mounting -> SMB/CIFS, enter username (21Vrata from my example) and password you gave to this user. Button Test shows if all is good. If not, Fix it before continuing. If good, click Save.

Note: the camera is called 21Vrata, its User and the root folder, too. This way things are simpler. I have the same password for all cameras. Cameras should be secured with a restrictive firewall on the router (both incoming and outgoing!), so you should not fear their firmware.

2.2. Storage -> General -> Update - click it (several times if needed). When it shows the assigned user quota under Capacity, it will work perfectly. If it shows entire (NAS) hard drive capacity (2713 GB for my system), it will not work (unless the entire disk is used only for this camera). Fix it before continuing!

Note: to save recordings to MicroSD, only the following steps are needed.

2.3. Select (the square in front of) your disk, adjust Quota ratio for Recording and Pictures (I set 100% and 0% respectively; change it for at least 1%!). If using MivcroSD, do the same for MicroSD cards. Then click Format. In few minutes, done. Click Save. If Quota ratio for Recording and Pictures reverted to 75:25 - it will not work. If status is Unformatted, it will not work. Fix it before continuing!

3. On camera, activate alarming. Event -> Motion Detection -> Enable Motion Detection and Enable Dynamic Analysis for Motion and set Sensitivity (trial and error method). There is more precise way for Motion detection if Configuration is changed to Expert. Notify Surveillance Center and Trigger Channel are both of use here but with different functions, click them both. Or set Other Alarm: PIR if you have it..

4. Activate Recording. If using Web interface, it is below Motion settings. In iVMS: Event -> Schedule. Activate it (click Local Recordings on iVMS), and make sure it is set to Alarm Template (not blue All Day Template). Under Advanced Settings, adjust pre and post recording as needed. Lots of differences visually between Web GUI and iVMS. Check Local Recording to save to MicroSD. Click Save.

Note: on my cameras, I was not able to save anything other than the Motion Detected and PIR alarm. Other modes can only send e-mails with pictures. Web interface -> configuration: where a file will be saved when copied from the camera
 
Top