Need help with Camera(s) "formatting" NFS mount

hikcamuser

n3wb
Joined
May 1, 2015
Messages
15
Reaction score
0
Hi,

I have a DS-2CD2132F-IS and a DS-2CD2032-i camera. Both came with the 5.2.5 firmware pre-installed. I bought these from separate vendors on Amazon.

Both cameras seem to be working fine, in terms of live video but I am unable to get either of them to record to NFS mounts. The NFS mounts (I use separate ones for each camera) are off a FEDORA 21 linux server.

When I create the NFS mount on the camera via the web interface (configuration->adv.config->storage) , the "test" button says that the "Testing succeeded", so I click "Save". Then I go to the "Storage management" tab, and I see the NFS mount listed there. I select the NFS mount, and I click on the "Format" button. This causes the camera to erase every file that existed on the NFS mount (I had some dummy files on there, but have tried it with an empty one too), the "Progress" quickly flashes "Complete", but the "Status" of the NFS mount in the "Storage Management" tab remains "Uninitialized", and the "Free space" says "0.00GB".

I have also logged in to the camera via ssh and I can see the NFS being mounted on /mnt/nfs00 with read/write permissions. In fact, via the ssh shell, I am able to go to the NFS mount directory and I am able to write a file and I can see the file and its contents show up on the actual NFS drive.

I have the same exact problem with both cameras, so I am thinking it is either a v5.2.5 firmware problem, an NFS mount user/group config parameter or it is something else that I am doing wrong.

I'd appreciate some help in resolving this.

Thanks!!!

Camera Info
-------------------
Model: DS-2CD2032-I
Serial No.: DS-2CD2032-I20150124CCCH50xxxxxxx
Firmware Version: V5.2.5 build 141201
Encoding Version: V5.0 build 140714


Model: DS-2CD2132F-IS
Serial No.: DS-2CD2132F-IS20150331CCCH50xxxxxxx
Firmware Version: V5.2.5 build 141201
Encoding Version: V5.0 build 140714


Output of mount (both cameras)
-----------------------------------------------
10.10.10.10:/mnt/camtest1 on /mnt/nfs00 type nfs (rw,sync,relatime,vers=3,rsize=4096,wsize=4096,namlen=255,acregmin=0,acregmax=0,acdirmin=0,acdirmax=0,soft,noac,nolock,proto=tcp,port=65535,timeo=70,retrans=3,sec=sys,local_lock=all,addr=10.10.10.10)
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,964
Reaction score
6,794
Location
Scotland
On the 5.2.0 firmware - and I'm not sure on the 5.2.5 firmware as I haven't used it (yet), there is a volume size (not free space) limit on the share - both NFS and CIFS/SMB - of a bit over 200GB.
The usual symptoms of connecting to the oversized volume and 'formatting' it are that it returns to 'uninitialised'.
If your server can create a user quota that will work. Or if you can create volumes of specified size that will also work.
There are quite a few threads here on this strange restriction.
 

T-Dawg

n3wb
Joined
Apr 3, 2015
Messages
16
Reaction score
0
On the 5.2.0 firmware - and I'm not sure on the 5.2.5 firmware as I haven't used it (yet), there is a volume size (not free space) limit on the share - both NFS and CIFS/SMB - of a bit over 200GB.
The usual symptoms of connecting to the oversized volume and 'formatting' it are that it returns to 'uninitialised'.
If your server can create a user quota that will work. Or if you can create volumes of specified size that will also work.
There are quite a few threads here on this strange restriction.
Can confirm this is the case with 5.2.5 as well, had the same issue yesterday on a new 2632 with 5.2.5 with a 2TB NFS-mounted drive. Kept reporting 0 free space

Eventually went for the easy option and threw a spare 250GB drive I had lying around, in the NAS - and it formatted this and recognised all the free space no problem at all. Obviously not a particularly great fix though

I need to look into quotas or virtual volumes for NFS for a more "proper" fix but I was under the impression quotas wouldn't change the size of the presented volume over NFS

Very strange bug though!
 

hikcamuser

n3wb
Joined
May 1, 2015
Messages
15
Reaction score
0
Hi, are you saying that volumes over 200GB won't work? or that volumes under 200GB won't work? Sorry, if I am being thick here.

Here is the output of "df" on the camera:

# df -kh
Filesystem Size Used Available Use% Mounted on
rootfs 7.9M 6.5M 1.4M 83% /
/dev/root 7.9M 6.5M 1.4M 83% /
udev 46.6M 80.0K 46.5M 0% /dev
/dev/ubi1_0 19.8M 10.2M 8.6M 54% /dav
/dev/ubi3_0 1.3M 108.0K 1.1M 9% /davinci
/dev/ubi4_0 1.3M 76.0K 1.1M 6% /config
10.10.10.10:/mnt/camtest1 2.9G 260.3M 2.7G 9% /mnt/nfs00​

So, as you can see, the camera reports the NFS volume as being 2.9GB in size (that's correct) and then it claims that 9% of it is in use.

Searching the forum now for the "volume size restriction" threads...
 

hikcamuser

n3wb
Joined
May 1, 2015
Messages
15
Reaction score
0
Ok, I found a few threads and the sticky thread on the NFS/NAS subject... I think the gist of it is that no one knows how small the filesystem can be nor how much free space is needed in it. Also, people tend to think that 250GB is the upper limit.

With that information, I moved to using a larger NFS mount, one with 192GB total capacity, but only 90GB free... Now there's some progress! The camera begins to create a set a of files on the NFS mount, most of them are ZERO bytes. It gets up to 56% progress within 30 seconds, and then it hangs at that percentage for a while. Eventually, it starts moving again and it reaches 100%, and it says "Completed". Yay! Now the status says "Normal". However, if I go to another page within the web interface, and later return to the "Store Management" page, now the drive status shows "Uninitialized" again... argghhhh....

BTW, I also tried setting quotas & setting up specific uid/gid for each camera but I did that with 40GB limit for each and that failed during the initialization.

I will try more mount sizes and see if I can get one to work with the camera. If anyone has any other ideas, please by all means...
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,964
Reaction score
6,794
Location
Scotland
A while back I experimented with what volume size would format successfully and stay that way after the camera has created the skeleton directory and placeholder files.
200GB was OK, 250GB was not, so I stuck with 200GB NFS.
This example is currently unformatted as I'm using it as a transfer folder whilst experimenting with the firmware. The mount point can be very conveniently be created in the camera web GUI in the storage menu.
login as: root
root@192.168.254.13's password:


BusyBox v1.19.3 (2014-07-11 11:25:54 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

# df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 8084 6689 1395 83% /
/dev/root 8084 6689 1395 83% /
udev 47716 80 47636 0% /dev
/dev/ubi1_0 20264 13064 6148 68% /dav
/dev/ubi3_0 1300 104 1092 9% /davinci
/dev/ubi4_0 1300 84 1116 7% /config
192.168.1.201:/cctv1 208751288 1251232 207500056 1% /mnt/nfs00
# mount
rootfs on / type rootfs (rw)
/dev/root on / type ext2 (rw,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
ramfs on /home type ramfs (rw,relatime)
udev on /dev type tmpfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
/dev/ubi1_0 on /dav type ubifs (rw,relatime)
/dev/ubi3_0 on /davinci type ubifs (rw,relatime)
/dev/ubi4_0 on /config type ubifs (rw,relatime)
192.168.1.201:/cctv1 on /mnt/nfs00 type nfs (rw,sync,relatime,vers=3,rsize=4096,wsize=4096,namlen=255,acregmin=0,acregmax=0,acdirmin=0,acdirmax=0,soft,noac,nolock,proto=tcp,port=65535,timeo=70,retrans=3,sec=sys,local_lock=all,addr=192.168.1.201)
#
 

T-Dawg

n3wb
Joined
Apr 3, 2015
Messages
16
Reaction score
0
Yeah it's worth pointing out that although I'm using a 250GB drive... it's of course quite a bit under 250 actual GB thanks to HDD manufacturers and their hilarious marketing. But about 230GB is working peachy for me...

I have:
# df -k /mnt/nfs00
Filesystem 1K-blocks Used Available Use% Mounted on
192.168.0.111:/export/CameraV
240232224 100157932 140057908 42% /mnt/nfs00

# df -h /mnt/nfs00
Filesystem Size Used Available Use% Mounted on
192.168.0.111:/export/CameraV
229.1G 95.5G 133.6G 42% /mnt/nfs00

# mount
192.168.0.111:/export/CameraV on /mnt/nfs00 type nfs (rw,sync,relatime,vers=3,rsize=4096,wsize=4096,namlen=255,acregmin=0,acregmax=0,acdirmin=0,acdirmax=0,soft,noac,nolock,proto=tcp,port=65535,timeo=70,retrans=3,sec=sys,local_lock=all,addr=192.168.0.111)
 

hikcamuser

n3wb
Joined
May 1, 2015
Messages
15
Reaction score
0
Thanks folks.

I got the NFS working. I found an empty 250GB drive and I am using that for the NFS mount. I created two separate NFS mounts on that same drive, one per camera. Both "formatted" correctly and seem to be recording just fine. We'll see which camera fills up the disk first! lol

Also, word of caution for others who may land on this thread in the future: you have to make sure that whatever files/directories may exist on the directory that you are mounting via NFS can be erased by the camera, else the "Format" step will fail. Or you can just simply make sure the directory you are mounting is empty. :)
 
Last edited by a moderator:
Top