Storage Issue with Nx Witness on Ubuntu Server

Answered

Comments

19 comments

  • Avatar
    Wendy Chuang

    Hello Udo,

    Nx supports the Filesystem in ext4 and we are unable to manually assign the storage path now.

    If it is the network shared drive, we support smb (SMB3).

    Please check the filesystem type of your partition first.

    Thanks.

    0
    Comment actions Permalink
  • Avatar
    Andries Faassen

    I also use ZFS and ran into the same problem a while back. My solution is the following and this has worked well for me on several installs, including some up to 24x 8MP IP cameras.

    Instead of running Nx Witness directly on hardware I use Proxmox as a virtualization platform and run Nx Witness inside of a VM. On the host I share a dataset using NFS and I pick it up again in the guest as a permanently mounted volume/mount point(it's in fstab) over NFS.

    That way Nx sees the NFS mount as available network storage and can use it. (see screenshot)

    Maybe you can try a little trick and mount the local volume over NFS to itself? That would provide the translation layer needed for it to work currently I think. Since all traffic stays local inside of the box there shouldn't be too big of a performance penalty.

    Hope that helps!

    1
    Comment actions Permalink
  • Avatar
    Udo Matzinger

    Hi Andries

    thank you very much for your advice. I will try to export and mount one folder via NFS on the same machine.
    I wonder how Nx will pick up that there is 'new' storage available. Another possibility might be to export and mount via samba ...

    It baffles me that Nx on an unix server does not offer any possibility to pick a locally available directory for storage purposes.

    I will report back if the NFS or SMB route is usable as a workaround

    1
    Comment actions Permalink
  • Avatar
    Udo Matzinger

    Hmpf, entering this text for the second time because web forms suck ...

    I tried to export and mount the local volume via nfs but with no success.

    /etc/fstab
    127.0.0.1:/volumes/tank/camera_pool2 /media/camera_pool2 nfs rw 0 0

    $ mount
    127.0.0.1:/volumes/tank/camera_pool2 on /media/camera_pool2 type nfs4 (rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=127.0.0.1,local_lock=none,addr=127.0.0.1

    After a restart of Nx it doesn't pick up the new via nfs mounted /media/camera_pool2:

    Andries Faassen How did you get Nx to accept your path "/nxwitness/"?
    Did you enter it through the "Add External Storage"-Button? In my installation this dialog only accepts SMB-Shares.

    Is there any way to get Nx to re-scan the available storage options? I haven't yet found a comprehensible description of how NX manages storage on a unix server. The manual and other documents show only examples for Windows.

    0
    Comment actions Permalink
  • Avatar
    Udo Matzinger

    I have managed to succeed with sharing the zfs filesystem via samba on the server and then mount it through the use of the above mentioned "Add External storage Button" in the Nx server settings.

    Now on to further configuration and trying to use the in camera analytics for motion detection and recording in Nx.

    1
    Comment actions Permalink
  • Avatar
    Norman Graafsma

    Hi Udo,

    Regarding: 

    "Now on to further configuration and trying to use the in camera analytics for motion detection and recording in Nx"

    We have in-camera analytics for the following brands; Axis, Dahua, Hanwha, and Hikvision. 
    Beside that, there are many brands that support HTTP events that enable you to send an HTTP event from the camera to the Nx Mediaserver. IF any questions arise regarding this topic, feel free to ask them in the integrations community. 

    0
    Comment actions Permalink
  • Avatar
    Andries Faassen

    Interesting Udo Matzinger for me when I make an NFS mount, especially using fstab (and then rebooting) Nx just automatically picks it up as a usable storage location. So I've never had to add it using a button or something like that, just untick the boot partition and tick the new mount as in my screenshot. So I dno't know of a way to ask Nx to scan for available storage either other then restarting it.

    Maybe because it wasn't a root level folder it didn't detect it? I've always used the /nxwitness directory and since that worked, never tried anything different.

    But glad to read you where able to add your storage using the "add external storage" button, that should work just as well in the end I think. :)

    0
    Comment actions Permalink
  • Avatar
    Udo Matzinger

    Yes, I was expecting Nx to pick up the NFS mount. As using the samba share is working, I am currently not exploring any more why the nfs route was not viable. Once again, thank you for your contribution Andries Faassen

    0
    Comment actions Permalink
  • Avatar
    Marc R

    I got the NFS mount working, however, I get this error/issue... should i worry?

     

    0
    Comment actions Permalink
  • Avatar
    Norman Graafsma

    Hi Marc,

    I wouldn't worry, that's bad for your heart, but I would follow the instructions and move the analytics data to the main storage instead of the OS drive. 

    0
    Comment actions Permalink
  • Avatar
    Marc R

    Norman Graafsma what instructions? that's what I can't figure out :(

     

    0
    Comment actions Permalink
  • Avatar
    Marc R

    Norman Graafsma turns out Nx witness doesn't support analytics on a "network" drive (mounted nfs)... it should! as many run inside a VM and thats the best way to get large storage into a VM, or have to pass-through a physical one :(

    I created a second virtual drive and added. it let me "move" the analytics.

    Hopefully nx can update and allow storage of analytics on whatever path a person wants.

    How large will analytics data get per camera so I can budget accordingly?

    0
    Comment actions Permalink
  • Avatar
    Andrey Terentyev

    Hi everybody,

    There is another workaround for file system type limitation. Mount ZFS partition to /mnt/zfs ,for instance, and make a link with ln from the archive default folder /opt/newtorkopix/mediaserver/var/data to /mnt/zfs The Server will write to default location but in fact the data will be saved to /mnt/zfs.

     

    0
    Comment actions Permalink
  • Avatar
    Udo Matzinger

    Hi Andrey, thanks for your suggestion. Will try it.

    0
    Comment actions Permalink
  • Avatar
    Udo Matzinger

    Hi Andrey Terentyev, this is not working for me. The ZFS file system is mounted on /volumes/tank/nx_mediapool and I created a symbolic link form there to /opt/networkoptix/mediaserver/var/data

    lrwxrwxrwx 1 networkoptix networkoptix 26 Jun 2 12:47 /opt/networkoptix/mediaserver/var/data -> /volumes/tank/nx_mediapool/

    In the server settings for storage management the storage location is marked as inaccessible and in the server log I find

    2020-06-02 12:47:54.638 1574 WARNING QnFileStorageResource(0x7fecb0004b20, 0d82bd8d-8211-f9f9-589e-031a1c870663): [initOrUpdate] IsMounted check failed for '/opt/networkoptix/mediaserver/var/data', local path: '/volumes/tank/nx_mediapool'
    2020-06-02 12:47:54.638 1574 WARNING MediaServerProcess(0x5633743ae300): [Storages init] Failed to initialize existing storage '/opt/networkoptix/mediaserver/var/data'
    2020-06-02 12:47:54.698 1574 WARNING QnFileStorageResource(0x7fecb0015180, 93a04153-a31e-a7c2-1555-12d9d9681d50): [initOrUpdate] storage directory '/sys/fs/fuse/connections/HD Witness Media' doesn't exist and mkdir failed
    2020-06-02 12:47:54.699 1574 WARNING MediaServerProcess(0x5633743ae300): Failed to initialize new storage '%1', path

     

    0
    Comment actions Permalink
  • Avatar
    Andrey Terentyev

    Hi Udo,

    I'll recheck it with your data.

    Meanwhile, you could try this solution https://support.networkoptix.com/hc/en-us/community/posts/360044241693/comments/360011590433

    0
    Comment actions Permalink
  • Avatar
    Udo Matzinger

    Hi Andrey,

    thank you for the hint to this other thread. I would love to try, but it seems that the parameter additionalLocalFsTypes is only implemented in VMS 4.1?

    As I am no beta user I don't have access to this version.

    0
    Comment actions Permalink
  • Avatar
    Norman Graafsma

    Hi Udo,

    Any user can be a Beta user. 

    Just navigate to my.networkoptix.com and head to the Download section and go to the Beta tab and you can Download our Beta version for your OS of choice. 

    0
    Comment actions Permalink
  • Avatar
    David McNeill

    Further to this issue, there seems to be a problem with multiple ext4 storage. Having two ext4 storage mounts causes recording to fail with permission issues, unable to create the mkv file.  This wasn't an issue in media server 3.2. It's easily visible when the red dot next to the camera names rolling around blinking off against each camera in succession, and no recordings being made.

    Changing the mount point of your large storage to /opt/networkoptix/mediaserver/var/data works around the issue, rather than just creating a symlink.  Using the nfs workaround introduces more complexity, and smb is only half as fast as nfs.

    0
    Comment actions Permalink

Please sign in to leave a comment.