Solving some NFS issues on Hikvision cameras

venturis

Getting the hang of it
Joined
Aug 8, 2016
Messages
157
Reaction score
98
Location
Australia
Hi

Here is a SMB/CIFS solution it works for me on my PC win10.
Can you please tell me what camera model and firmware version you are using?

I've tried getting SMB share working on Windows10 without any success with a 2CD2385 and 2CD2335 both on firmware 5.5.51 and 5.5.0 respectively.

I had them both working with Windows 7 Pro but needed to upgraded to Windows 10 for another reason.

Since going to Windows 10 I can't get NetHDD working from the camera interface. I have turned off the firewall, allowed public sharing and disabled password access all just to try and make it work again. But nothing.

When I try to "Test" the settings I always get the following error "Mounting to NAS server failed. Invalid directory or incorrect user name/password" which pretty much means it could be anything!

I know all the parameters are correct therefore I can only imagine there is something in Windows 10 that stops the shares being seen by the cameras.
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,930
Reaction score
6,778
Location
Scotland
Since going to Windows 10 I can't get NetHDD working from the camera interface. I have turned off the firewall, allowed public sharing and disabled password access all just to try and make it work again. But nothing.
From what I recall, Win10 by default doesn't support the older version of SMB (Server Message Block) that's required.
I suspect you can re-enable support - but I don't know how - I have never used Win10 - but Google will know for sure.
 

venturis

Getting the hang of it
Joined
Aug 8, 2016
Messages
157
Reaction score
98
Location
Australia
From what I recall, Win10 by default doesn't support the older version of SMB (Server Message Block) that's required.
I suspect you can re-enable support - but I don't know how - I have never used Win10 - but Google will know for sure.
You are an absolute genius!... About 30 seconds of Google searching and the answer was there...you were right...I needed to enable SMB v1 on my Windows 10 box by adding addtional features to Windows10 in the "Add Programs and Features Menu"

That done and now the share can be seen from the Windows 10 PC.

I wish I'd asked this question earlier and saved myself several days of pulling out my hair.

Thanks again.
 

cyayon

n3wb
Joined
May 22, 2019
Messages
5
Reaction score
0
Location
france
Hi everyone,

Something is really strange with my DS-2CD2185FWD-IS.

I am using 199Go CIFS shares with samba (on linux server) with params :
[cam-side]
comment = cam-side
path=/mnt/patrol/cam-side
valid users = @patrol,@nbuxadmins
wide links = no
create mask = 0660
force create mode = 0660
force directory mode = 0770
writable = yes
browsable = yes

The disk partition (virtual loopback partition) is formated in ext4.

The camera is configured to always record continuously, but i only get last 48h on net hdd.
There are about 70% of free space which are never used by the camera recording.

I don't have any errors or something else, only a silent rotation of recording for about 2 days.

I checked in CIFS share directories datadir0 datadir1 and datadir2 exists, but only mp4 in datadir0 are writed. No datadir1 and datadir2 mp4 files are used. strange...

Do you know why and is there a solution ?

Thanks.
 
Last edited:

jimbo123

Young grasshopper
Joined
Mar 15, 2019
Messages
65
Reaction score
11
Location
Australia
Wasn't there a 200GB'ish limit or something with the size of the NAS target share that the Hik stuff would behave with ?
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,930
Reaction score
6,778
Location
Scotland
With a CIFS share, the volume size available to the camera can be limited by the application of a user quota.
Is a default user quota in use on the account?
 

cyayon

n3wb
Joined
May 22, 2019
Messages
5
Reaction score
0
Location
france
Hi, no there are no user quota, the filesystem is not mounted with quota option or anything else.
The firmware is the last version 5.6.0 and the problem occurs with the previous firmware too (5.5.83).

The usage seems to be limited to about 57Go (vs 200Go) and only datadir0 is used.

I have 5 cameras and 5 shares but a single user (patrol).
Do i need a specific user for each camera or could i use a single user (but multiple shares) for multiple cameras ?

thanks.
 
Last edited:

oldman1

n3wb
Joined
Feb 20, 2015
Messages
1
Reaction score
1
Reviving an old thread in case anyone is looking to record Hikvision cams to Openmediavault. I have two Hikvision DS-2CD2032-I IP Cameras (V5.4.5 build 170123) recording to Openmediavault 4 (and now 5) on one 500GB HD partitioned in two. SMB/CIFS required adding ntlm auth = yes to Extra Options in order to successfully connect. No issues for over a year.
 

pgdh

n3wb
Joined
Aug 25, 2020
Messages
2
Reaction score
1
Location
York
I had the same issue with a DS-2CD2346G2-IU running V5.5.134 build 200430 (the latest release for that camera ... no V5.6.x available yet) with my NAS server (an HPE ProLiant Microserver running SmartOS from Joyent) serving a ZFS filesystem via NFSv3

My NFS "Net HDD" was showing "Normal" after "Format" under "HDD Management", but returned to "Uninitialized" with 0.00GB "Free space" once the first file (datadir0/hiv00000.mp4) had been written.

I suspected that the issue is that since ZFS allows multiple datasets (filesystems and volumes) to be allocated from a single pool, the sum of "Used" and "Available" will not be constant for any filesystem.

Applying a little lateral thinking, I set the ZFS filesystem's "quota" property to a fixed size (in my case "zfs set quota=500G pool/camera") and reinitialised the "HDD".

And now it works, including switching to datadir1/hiv00000.mp4 once datadir0/hiv00212.mp4 has been written.

Of course, this will only work as long as there actually is enough free space available to fill the quota, but it's a handy workaround.
 
Joined
Feb 12, 2021
Messages
1
Reaction score
0
Location
Venezuela
I got this off comments people posted on my blog at NetworkCameraCritic.com, so hope it helps a wider audience. Thanks to s400py and peter. This is not for the novice, but hopefully after a few people do it they can comment on their experience.

OK, here’s the bug:
When you “format” the hard drive, a file “info.bin” is generated in the root of the directory. It contains the number of “datadirs” at the very end, i.e. available space in the network share divided by maximum size of a single datadir.
When the firmware tries to reconnect to the NFS share, it assumes that the full drive capacity (not the free space) reported by the NFS server can be fully utilized. The file “info.bin” only contains the number associated with the free available space (<= HDD capacity) so it fails. I've patched out that check in /dav/davinci so everything's working now.

5.0.2 Version
telnet into the device, copy /dav/davinci to your network share (‘mount’ tells you the directory). open the file with a hex editor, search this hexadecimal string:
5001D4C09DE52C00001A07005CE12A00001A
replace with:
5001D4C09DE50000000007005CE100000000
save. copy the file from the network share back to /dav, reboot the device.

5.1 Version

search for the following hex string:
5001DCC09DE54900001A0B005CE14700001A
and change it to
5001DCC09DE5000000000B005CE100000000
Hi,

I own a DS-2CD7153-E. I've apply the patch V5.2.0 build 140721, and I couldn't find above HEX in the file davinci file after extracting the TGZ file.

I downgraded to version 5.1.0 and I still can't find the HEX (5001DCC09DE54900001A0B005CE14700001A).

I have the same problem, I manage to connect to the NAS, I do the format, it appears as normal and a few minutes later, it appears as uninitialized

Could you help me, to know what is the HEX that I should modify for this camera, or some other solution.
Since in one way or another what I need is for the camera to record.
Thanks
Carlos
 

morph

n3wb
Joined
Nov 25, 2014
Messages
1
Reaction score
0
I had no luck using NFS. Switched to CIFS (SMB shares on WIndows or a NAS that offers SMB sharing) and it works fine. If you read through this loooong thread there are answers to do this. On W7 (as a recording destination) it should work fine. On any NAS supporting SMBv1 (QNAP, Synology etc) it should also work. If you are using W10, as per the above, you'll need to enable SMBv1 for it to work.
 

tech_junkie

Getting comfortable
Joined
Sep 2, 2022
Messages
412
Reaction score
417
Location
South Dakota
why ?
status HDD "size mismatch" ? NVR Hikvision DS-9664ni-i8
View attachment 94387
can only map 8TB. So you need to split your storage into three 6.4 TB NFS mounts at least. But I would split into four 4.53 TB folders and assign a group of 16 cameras per folder.
The ones I set up of this model, I load eight 8TB hard drives that the four camera groups of 16 cams are recorded equally across them. (2 drives per camera group)
 
Top