Jump to content
gonzogg

Hikvision IP cam and Freenas

Recommended Posts

Have anybody been successful with a hikvision IP cam and Freenas?

 

I can see the NAS on the cam storage page and the status is normal, but it does nor record. I am sure I have issues setting Freenas since I do not have much experience with it.

Share this post


Link to post
Share on other sites

NAS4FREE, external 2TB HDD, and an old laptop. I have had some bugs, but I think I finally got it figured out. I am running two cameras to the single NAS. When it works it is working fine. I think my issue was the way I had the drive partitioned. I have since changed it and so far so good. I think it was also that the laptop was shutting down. The batter is shot so IDK if that has anything to do with it.

 

Where are you in the process, maybe I can help.......

Share this post


Link to post
Share on other sites

I finally got 2 cameras working with FreeNAS.

 

I created:

1 ZFS volume (video)

2 Dataset (cam1, cam2)

2 NFS Sharing

 

This may not be the best way, but is working so far. Of course I have many questions about FreeNAS since I do not have experience with any NAS system, like:

 

I don't know what happens when the hard drive gets full, it will stop recording or it will overwrite the data?

Share this post


Link to post
Share on other sites

One of the issues I see with this setup is, If I reboot the camera, the status under storage management on the camera change to uninitialized, having to click on format again and loosing the recorded videos.

Share this post


Link to post
Share on other sites
One of the issues I see with this setup is, If I reboot the camera, the status under storage management on the camera change to uninitialized, having to click on format again and loosing the recorded videos.

 

 

How do you have the drive space partitioned?

 

I had the same issue. I think I figured it out. Under Dataset I had the Reservation set to .90TB. I figured I would use half the drive for one camera and half for the other.

 

Every time the NAS would reboot or some other kind of network hiccup it would do just what you said.

 

I changed the Reservation to blank and set the .90TB in the Quota.

 

So far so good. 4 days and still up. I was barely getting 12-16 hrs before.

Share this post


Link to post
Share on other sites
One of the issues I see with this setup is, If I reboot the camera, the status under storage management on the camera change to uninitialized, having to click on format again and loosing the recorded videos.

 

 

How do you have the drive space partitioned?

 

I had the same issue. I think I figured it out. Under Dataset I had the Reservation set to .90TB. I figured I would use half the drive for one camera and half for the other.

 

Every time the NAS would reboot or some other kind of network hiccup it would do just what you said.

 

I changed the Reservation to blank and set the .90TB in the Quota.

 

So far so good. 4 days and still up. I was barely getting 12-16 hrs before.

 

I did not set any reservation or quota. I think this way all cameras share all available disk space, but what do I know. A added a CIFS share and now I can access all recording from my Windows computer, I will test later what happen if I reboot one of the cameras

Share this post


Link to post
Share on other sites
One of the issues I see with this setup is, If I reboot the camera, the status under storage management on the camera change to uninitialized, having to click on format again and loosing the recorded videos.

 

 

How do you have the drive space partitioned?

 

I had the same issue. I think I figured it out. Under Dataset I had the Reservation set to .90TB. I figured I would use half the drive for one camera and half for the other.

 

Every time the NAS would reboot or some other kind of network hiccup it would do just what you said.

 

I changed the Reservation to blank and set the .90TB in the Quota.

 

So far so good. 4 days and still up. I was barely getting 12-16 hrs before.

 

I did not set any reservation or quota. I think this way all cameras share all available disk space, but what do I know. A added a CIFS share and now I can access all recording from my Windows computer, I will test later what happen if I reboot one of the cameras

 

 

I just rebooted one of the cameras on purpose and yes when you click on format storage it delete all the videos previously storage on it NAS database

Share this post


Link to post
Share on other sites

 

I just rebooted one of the cameras on purpose and yes when you click on format storage it delete all the videos previously storage on it NAS database

 

 

Yea. That will happen.

 

It seems the cameras get confused easy. I had issues with the NAS rebooting and the camera not finding the share again. Even though clearly the shares will still there and the drive was still "formatted". Since you have to reformat anyway, why don't you give the quota thing a shot. I have no reasoning behind it, but thats how I have mine setup and it seems to be stable.

 

BTW I am running NAS4FREE not FREENAS. I had issues getting the FREENAS to load and boot properly. (probably user error)

Share this post


Link to post
Share on other sites

I will be looking to use a similar solution for the time being. I ordered a DS-2CD2032 bullet to toy with but haven't decided on a NVR setup yet. I will be using the built in NVR capabilities of the Hik and hopefully setup an older Core 2 Duo box with Ubuntu and something like NAS4FREE. Any thoughts come to mind that would prevent this from working?

 

Do you think using the Hik's built-in NVR would decrease performance or lifespan of the camera itself? I don't know how much of a workload that will place on the camera.

Share this post


Link to post
Share on other sites
I will be looking to use a similar solution for the time being. I ordered a DS-2CD2032 bullet to toy with but haven't decided on a NVR setup yet. I will be using the built in NVR capabilities of the Hik and hopefully setup an older Core 2 Duo box with Ubuntu and something like NAS4FREE. Any thoughts come to mind that would prevent this from working?

 

 

The C2D box should be fine. I'm running NAS4FREE off an old Celeron laptop. 2tb external HDD. Eventually I'll build a small box to stuff drives in to take advantage of speed. Currently the drive is a USB 3.0 but the port is only 2.0.

Share this post


Link to post
Share on other sites

OK just wanted to double check, seems like a good solution to use in the mean time while trying to sort out the final NVR PC.

 

To clarify, have you gotten it to work where you can reboot the cam/nas and it will resume using the old shares where video was stored prior to reboot? It looks like you said by removing the quota value you have been able to get around that issue?

 

Also, are there other pieces of software that could be used just for playback of the video recorded to the nas?

Share this post


Link to post
Share on other sites

FreeNAS may be slightly different than NAS4free, I do not see any quota setting under database. One work around that can think of is, if one of the cameras lost association, create a new data set and point your share to the new data set before formatting it, that way old recorded files won't get lose and you can still access them from another pc.

Share this post


Link to post
Share on other sites

 

To clarify, have you gotten it to work where you can reboot the cam/nas and it will resume using the old shares where video was stored prior to reboot? It looks like you said by removing the quota value you have been able to get around that issue?

 

Also, are there other pieces of software that could be used just for playback of the video recorded to the nas?

 

I just rebooted one of my cameras and yes it pointed right back to the share.

 

VLC is free and will play the .mp4 files created by the cameras.

Share this post


Link to post
Share on other sites
FreeNAS may be slightly different than NAS4free, I do not see any quota setting under database. One work around that can think of is, if one of the cameras lost association, create a new data set and point your share to the new data set before formatting it, that way old recorded files won't get lose and you can still access them from another pc.

 

 

 

I bring up Disks>ZFS>Datasets>Dataset

Then either create one or edit

 

 

 

Originally I had the Reservation set to .90TB I showed the disk was almost full even right after formatting. I kept getting emails that there was a HDD failure and figured it was maybe because I ran out of disk space.

 

So I changed the .90 to Quota.

 

Seems to be working.

select.thumb.png.e7e35528fe0d3b4e5f74c9afcd078dd5.png

quota.png.c00bee26d47c0ea1c1204ad4405f7511.png

Share this post


Link to post
Share on other sites

That make sense. Reserve means you are reserving disk space, quota means you can only use up to that disk space, but it may be reserved or not. I am thinking on a 1 TB disk we can set the quota to 1TB on each camera, meaning the cameras will share the whole disk space. Does that make sense?

 

BTW, I found the quota settings on FreeNAS and now I can reboot the cameras and the server without loosing the association. Thank you for your help. Now I have to experiment with compression and other settings.

Share this post


Link to post
Share on other sites

Glad I could help. My head was hurting trying to figure it out so hopefully I saved you some headaches. NAS4FREE is the first time I got away from the Mac or Windows interface.

Share this post


Link to post
Share on other sites

Could you use an alternate linux distro and create some NFS shares and use those as the destination of the Hik recording?

 

Thanks for the info about VLC and all of this other information, exciting to start playing with this

Share this post


Link to post
Share on other sites

Alternate Linux distro?

 

You mean like a Linux box or something?

 

I'm sure you can

 

I think most guys here that are running some form of NAS is because of the overhead that PC software based DVR uses. Plus the fact that the camera has decent NVR capabilities as it is. Problem is that the camera needs an NFS share to write to and if I'm not mistaken not a lot of standalone NAS boxes support NFS. So hence the need for a Linux setup, or Windows Server or something like that.

Share this post


Link to post
Share on other sites

I did a test setting the quota for 10Gb for one of the cameras and when it got full, the storage status on the camera changed to uninitialized and stop recording, did not started to overwrite.

Share this post


Link to post
Share on other sites

This was posted as a comment on my review of the camera and may help here. I reported this to Hikvision to see if it's a fix they can include in a future firmware release.

 

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.

 

Share this post


Link to post
Share on other sites

It's funny because when I did the article on setting this up to write to NAS, people said it didn't work for them and tried various tricks to make it work. I had the Hikvision dome on loan from Hikvision for the article and I plugged it in last week because I wanted to reset it to factory defaults before returning it and I checked and even though it was not plugged in for at least a month, it started recording to my NAS NFS mount and that was with version 5.0 of the firmware and since I believe they came out with 5.0.2 and 5.0.5 but have not loaded the newer firmware.

 

Rumors here say that in firmware version 5.1 they will have broader/better NAS support. I suggested CIFS (Windows mount used by most inexpensive NAS devices) support to their product manager as a more viable solution than NFS so I look forward to seeing what they will do in 5.1.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×