boomtheroom
n3wb
- Joined
- Oct 22, 2015
- Messages
- 1
- Reaction score
- 0
If it works, please post the solution for others with similar issue. Thanks.
any luck?
If it works, please post the solution for others with similar issue. Thanks.
[EMAIL="alastair@Mint64"]alastair@Mint64[/EMAIL] ~ $ dd if=/dev/urandom of=testfile bs=512 count=500k
512000+0 records in
512000+0 records out
262144000 bytes (262 MB) copied, 30.0246 s, 8.7 MB/s
[EMAIL="alastair@Mint64"]alastair@Mint64[/EMAIL] ~ $ ll testfile
-rw-rw-r-- 1 alastair alastair 262144000 Dec 13 12:48 testfile
[EMAIL="alastair@Mint64"]alastair@Mint64[/EMAIL] ~ $ mkfs -t ext2 testfile
mke2fs 1.42.9 (4-Feb-2014)
testfile is not a block special device.
Proceed anyway? (y,n) y
Discarding device blocks: done
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
Stride=0 blocks, Stripe width=0 blocks
64000 inodes, 256000 blocks
12800 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67371008
32 block groups
8192 blocks per group, 8192 fragments per group
2000 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185
Allocating group tables: done
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
[EMAIL="alastair@Mint64"]alastair@Mint64[/EMAIL] ~ $ file testfile
testfile: Linux rev 1.0 ext2 filesystem data, UUID=d8cdd56e-c16a-4355-b56b-474ad2bc6805
[EMAIL="alastair@Mint64"]alastair@Mint64[/EMAIL] ~ $ mkdir testpoint
[EMAIL="alastair@Mint64"]alastair@Mint64[/EMAIL] ~ $ sudo mount -t ext2 testfile testpoint
[EMAIL="alastair@Mint64"]alastair@Mint64[/EMAIL] ~ $ mount
[snip]
nfsd on /proc/fs/nfsd type nfsd (rw)
/home/alastair/testfile on /home/alastair/testpoint type ext2 (rw)
[EMAIL="alastair@Mint64"]alastair@Mint64[/EMAIL] ~ $
[EMAIL="alastair@Mint64"]alastair@Mint64[/EMAIL] ~ $ cat /etc/exports
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
#
/home/alastair/testpoint 192.168.1.0/24(rw,sync,no_root_squash,no_subtree_check)
[EMAIL="alastair@Mint64"]alastair@Mint64[/EMAIL] ~ $
[EMAIL="alastair@Mint64"]alastair@Mint64[/EMAIL] ~ $ sudo exportfs -v -a
exporting 192.168.1.0/24:/home/alastair/testpoint
I'm running V5.2.5 build 141201 on a DS-2CD2232-I5.Hi, everyone.
Here is the patch for 5.2.5.
DCC09DE54900001A0B005CE14700001A - original
DCC09DE5000000000B005CE100000000 - patched
Pay attention on packing davinci back to davinci.tar.gz. This is not a gzip! This is LZMA! You can check it in /dav/initrun.sh. There is an instruction tar -axf, where -a key means lzma.
So, the right way to pack davinci.tar.gz is:
UPD: By default shedule has type other on each day and hour. Set this into "Continious" and it'll be allright.Code:[COLOR=#000000][FONT=Tahoma]# tar -cf davinci.tar davinci[/FONT][/COLOR] [COLOR=#000000][FONT=Tahoma]# lzma davinci.tar[/FONT][/COLOR] [COLOR=#000000][FONT=Tahoma]# mv davinci.tar.lzma davinci.tar.gz[/FONT][/COLOR]
Here is the link for 5.2.5 patched davinci.tar.gz with NFS patch.
If you can read russian, more info you can find here.
Can you possibly provide a screen shot of how the configuration on the IP cam looks like?Here is a skeleton of a method that was first suggested by another member (sorry but I forget who, so I can't attribute) and will only be useful to those who are Linux or NAS savvy. Which may be quite a lot.
And it will only work on a NAS that has reasonably good embedded Linux, not on those low-end models with very a very limited implementation.
It's not a recipe to follow by rote - it's an indication of a method, to be understood and adapted for potentially many different environments.
But maybe others will chip in with some ideas or results or other experience.
Summary:
Create a large file, sized for the volume size limitation of the specific camera firmware. 200GB should work for most.
Format the file as a file system, say ext2
Mount the file at a suitable mount point, add an entry to fstab for permanence.
Share the mount point using the NFS protocol.
A worked example is as follows, with some extraneous stuff removed:
Create the file.
Format as a file system:Code:alastair@Mint64 ~ $ dd if=/dev/urandom of=testfile bs=512 count=500k 512000+0 records in 512000+0 records out 262144000 bytes (262 MB) copied, 30.0246 s, 8.7 MB/s alastair@Mint64 ~ $ ll testfile -rw-rw-r-- 1 alastair alastair 262144000 Dec 13 12:48 testfile
Create the mount point and mount the file:Code:alastair@Mint64 ~ $ mkfs -t ext2 testfile mke2fs 1.42.9 (4-Feb-2014) testfile is not a block special device. Proceed anyway? (y,n) y Discarding device blocks: done Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) Stride=0 blocks, Stripe width=0 blocks 64000 inodes, 256000 blocks 12800 blocks (5.00%) reserved for the super user First data block=1 Maximum filesystem blocks=67371008 32 block groups 8192 blocks per group, 8192 fragments per group 2000 inodes per group Superblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729, 204801, 221185 Allocating group tables: done Writing inode tables: done Writing superblocks and filesystem accounting information: done alastair@Mint64 ~ $ file testfile testfile: Linux rev 1.0 ext2 filesystem data, UUID=d8cdd56e-c16a-4355-b56b-474ad2bc6805
The mount point needs to be added to the NFS /etc/exports list, using your favourite text editor, and exported.Code:alastair@Mint64 ~ $ mkdir testpoint alastair@Mint64 ~ $ sudo mount -t ext2 testfile testpoint alastair@Mint64 ~ $ mount [snip] nfsd on /proc/fs/nfsd type nfsd (rw) /home/alastair/testfile on /home/alastair/testpoint type ext2 (rw) alastair@Mint64 ~ $
At this point - the share should be available to a camera or NVR via NFS.Code:alastair@Mint64 ~ $ cat /etc/exports # /etc/exports: the access control list for filesystems which may be exported # to NFS clients. See exports(5). # # Example for NFSv2 and NFSv3: # /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check) # # Example for NFSv4: # /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check) # /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check) # /home/alastair/testpoint 192.168.1.0/24(rw,sync,no_root_squash,no_subtree_check) alastair@Mint64 ~ $ alastair@Mint64 ~ $ sudo exportfs -v -a exporting 192.168.1.0/24:/home/alastair/testpoint
To make the mount permanent, to survive a reboot, the mount will need to be added to /etc/fstab
Check out the system logs of your NAS/Linux box for any clues as to why the mount attempt failed.but I can't seen to get the mounting to work properly still.
login as: root
[EMAIL="root@192.168.254.11's"]root@192.168.254.11's[/EMAIL] 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.
# 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)
192.168.1.96:/home/alastair/testpoint on /mnt/nfs01 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.96)
# ls -alR /mnt/nfs01
/mnt/nfs01:
drwxrwxrwx 3 65534 nogroup 4096 Feb 26 15:20 .
drwxrwxrwx 13 root root 1024 Feb 26 15:18 ..
drwxr-xr-x 2 root root 4096 Feb 26 15:19 datadir0
-rwxr-xr-x 1 root root 68 Feb 26 15:20 info.bin
/mnt/nfs01/datadir0:
drwxr-xr-x 2 root root 4096 Feb 26 15:19 .
drwxrwxrwx 3 65534 nogroup 4096 Feb 26 15:20 ..
-rw-r--r-- 1 root root 512 Feb 26 15:20 HIKWS
-rw-r--r-- 1 root root 1120 Feb 26 15:19 backupinfo00.bin
-rw-r--r-- 1 root root 1120 Feb 26 15:19 backupinfo01.bin
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00000.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00000.pic
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00001.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00002.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00003.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00004.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00005.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00006.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00007.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00008.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00009.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00010.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00011.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00012.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00013.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00014.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00015.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00016.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00017.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00018.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00019.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00020.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00021.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00022.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00023.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00024.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00025.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00026.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00027.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00028.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00029.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00030.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00031.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00032.mp4
-rw-r--r-- 1 root root 0 Feb 26 15:19 hiv00033.mp4
-rw-r--r-- 1 root root 698688 Feb 26 15:19 index00.bin
-rw-r--r-- 1 root root 328992 Feb 26 15:19 index00p.bin
-rw-r--r-- 1 root root 698688 Feb 26 15:19 index01.bin
-rw-r--r-- 1 root root 328992 Feb 26 15:19 index01p.bin
-rw-r--r-- 1 root root 16002048 Feb 26 15:22 logCurFile.bin
-rw-r--r-- 1 root root 32004192 Feb 26 15:20 logMainFile.bin
#
[EMAIL="alastair@Mint64"]alastair@Mint64[/EMAIL] ~ $ sudo exportfs -v
/home/alastair/testpoint
<world>(rw,wdelay,no_root_squash,no_subtree_check,sec=sys,rw,no_root_squash,no_all_squash)
[EMAIL="alastair@Mint64"]alastair@Mint64[/EMAIL] ~ $
I got my NFS issue worked out related to rpcbind not starting. So now I get a "testing succeeded"Hmmm... indeed.
What does the 'Test' button show?
The action is to write a file and delete it, to confirm availability and access control.
Here is what finally solved it on the exportfs configurationWell, that's at least a step along the way.
"Device Error" certainly doesn't help.
I'm not sure what to suggest, sorry.
So you've gone for anonymous access - any particular reason? Was it one of the changes needed to make it work?all_squash
We all can agree that the NetHDD implementation is less than ideal. NFS V2, V3 doesn't support authenticated access. For now, I will continue to use NFS until I can get SMB to work properly. I will have to go back to packet capture analysis for SMB when I have time.Excellent! Full marks for problem solving, and kudos for sharing to help others.
I wonder if Hikvision will be changing how the devices store to a 'NetHDD'? It's not one of the better designed parts of the firmware.
So you've gone for anonymous access - any particular reason? Was it one of the changes needed to make it work?
/dev/mapper/alph--lvm-home /storage ext4 defaults[COLOR=#ff0000],usrquota,grpquota[/COLOR] 1 2
quotacheck -cug /storage
quotacheck -avug
edquota camera1
python -c "print [COLOR=#ff0000]XXX[/COLOR]*1024**"2"
quota camera1
service smb restart
systemctl enable smb
systemctl start smb
service smb status