Hikvision IP Camera recording using NFS

For connecting Hikvision camera to NFS storage

In NFS server:
create a separate Logical Volume

example:
——————————————————————————–
--- Logical volume ---
LV Name /dev/vgcam/lvcam1
VG Name vgcam
LV UUID lxdWGO-UqBv-Da0U-dYGM-hzgJ-Zwjp-bNDLXc
LV Write Access read/write
LV Status available
# open 1
LV Size 200.00 GB
Current LE 51200
Segments 1
Allocation contiguous
Read ahead sectors auto
- currently set to 256
Block device 253:8

— Logical volume —
LV Name /dev/vgcam/lvcam2
VG Name vgcam
LV UUID Dei4BM-ePKK-383k-JO7t-F082-VBBJ-mEZQ3v
LV Write Access read/write
LV Status available
# open 1
LV Size 200.00 GB
Current LE 51200
Segments 1
Allocation contiguous
Read ahead sectors auto
– currently set to 256
Block device 253:9
————————————————————————————————

Now mount these volumes to say /cam1 /cam2

/dev/mapper/vgcam-lvcam1 on /cam1 type xfs (rw,nosuid,nodev,noexec,relatime,attr2,noquota)
/dev/mapper/vgcam-lvcam2 on /cam2 type xfs (rw,nosuid,nodev,noexec,relatime,attr2,noquota)

create a data folder in each of these e.g.
mkdir /cam1/data
mkdir /cam2/data

create and export in nfs as follows where 192.168.123.1 and 192.168.123.2 are the IPs of Cameras

/cam1/data 192.168.123.1(async,insecure,rw,nohide)
/cam2/data 192.168.123.2(async,insecure,rw,nohide)

restart nfs service
service nfs restart

Now at the camera configure screen goto
Storage
Storage Management
NetHDD Tab

Enter serverIPAddress, FilePath, Type, MountingType,Username,Password e.g
192.168.123.250 /cam2/data NAS NFS nousername nopassword
Save it

Next goto HDD Management Tab

HDD Management
It will show the attached drive as follows
HDD No. Capacity Freespace Status Type Property Progress
9 199.90GB 197.50GB Normal NAS R/W

Select this and click on Format

After completion for format command goto
System
Maintenance
Reboot

After rebooting check recording under Playback Option.

Radius via MySQL

RadiusMysql setup checked using Karbonn Mobile and is working fine. Only entries in the following four tables is required.

radcheck
5 bdKarbonn Cleartext-Password := abcd1234

radusergroup
bdKarbonn nmlsqlwifi 1

radgroupcheck
21 nmlsqlwifi Auth-Type := EAP

radgroupreply
32 nmlsqlwifi Service-Type := Framed-User
33 nmlsqlwifi Tunnel-Type := VLAN
34 nmlsqlwifi Tunnel-Medium-Type := IEEE-802
35 nmlsqlwifi Tunnel-Private-Group-ID := 3

————— other relevent ————
modules/cui: database = “mysql”
radiusd.conf: $INCLUDE sql.conf
radiusd.conf: $INCLUDE sql/mysql/counter.conf
sql.conf: database = “mysql”

sql.conf:sql {
sql.conf: database = “mysql”
sql.conf:
sql.conf: driver = “rlm_sql_${database}”
sql.conf:
sql.conf: server = “localhost”
sql.conf: login = “radius”
sql.conf: password = “mysqlsvrpw”
sql.conf:
sql.conf: radius_db = “radius”
sql.conf:
sql.conf: acct_table1 = “radacct”
sql.conf: acct_table2 = “radacct”
sql.conf:
sql.conf: postauth_table = “radpostauth”
sql.conf:
sql.conf: authcheck_table = “radcheck”
sql.conf: authreply_table = “radreply”
sql.conf:
sql.conf: groupcheck_table = “radgroupcheck”
sql.conf: groupreply_table = “radgroupreply”
sql.conf:
sql.conf: usergroup_table = “radusergroup”
sql.conf:
sql.conf:
sql.conf: deletestalesessions = yes
sql.conf:
sql.conf: sqltrace = no
sql.conf: sqltracefile = ${logdir}/sqltrace.sql
sql.conf:
sql.conf: num_sql_socks = 5
sql.conf:
sql.conf: connect_failure_retry_delay = 60
sql.conf:
sql.conf: lifetime = 0
sql.conf:
sql.conf: max_queries = 0
sql.conf:
sql.conf:
sql.conf: nas_table = “nas”
sql.conf:
sql.conf: $INCLUDE sql/${database}/dialup.conf
sql.conf:}