Mapping additional storage to a local path in Ubuntu

Answered

Comments

11 comments

  • Avatar
    Norman Graafsma

    Hi Pieter,

    In general, local storage is discovered automatically and should be visible in the Server Settings menu, tab Storage Management in the Nx Desktop client. 

    Here you can enable or disable storage, as well as choosing if you want to use the storage for Main storage of Backup storage. 

    0
    Comment actions Permalink
  • Avatar
    Pieter Viljoen

    I assume with "discover" you mean the server will look for physical storage devices?

    Since this is running in a VM, there are no devices to discover.

    I did mount storage to a mountpoint in the VM, and I want to use that mountpoint for additional storage.

    I want to use "/mnt/user/nxwitness" as my storage path, for it points to my storage array.

     

    If I cannot add a "local" path in the server mgmt UI, can I edit a file on the server to add my path?

    0
    Comment actions Permalink
  • Avatar
    Kyle Epperson

    Hello Pieter,

    I took a look at your issue and I have a work around to suggest assuming your setup is how it seems to me. This works in the case that you only want to store information on your external storage location and not also on the VM. I am running Windows with an Ubuntu VM (Virtual Box) but this should work in a similar way in other environments.


    1. Create a folder to store video on the host machine (i.e. your storage array)

    2. Set it as a shared folder in VM, do not choose to auto-mount. You can set it to whatever name suits you (let's say my_permanent_storage).

    3. Inside the VM, mount the default video storage location (/opt/networkoptix/mediaserver/var/data/) to the shared folder. Example for Virtual Box:

    • sudo mount -t vboxsf my_permanent_storage /opt/networkoptix/mediaserver/var/data/

    4. To make the mount permanent on system boot, add this line to /etc/fstab file:

    • my_permanent_storage /opt/networkoptix/mediaserver/var/data vboxsf defaults 0 0

    This way we trick the Nx Server to write to the default location, but that location will be pointing to your host machine.

     

    I hope this helps,

    Kyle

    2
    Comment actions Permalink
  • Avatar
    Nx Support

    Pieter, can you please share what problems did you have with using Docker?

    0
    Comment actions Permalink
  • Avatar
    Pieter Viljoen

    Kyle, ok, I was hoping I could modify the config to add more than one path, vs. overriding the default path.

     

    Support, I used the thehomerepot/nxwitness docker, on boot the output showed lots of errors, and the management client did not see the server.

    I did see you are working on an official docker, that would be great, for surely you would allow me to specify the config and data path to be outside the container, and installing and updating would be far easier compared to deploying from a deb file on ubuntu.

    0
    Comment actions Permalink
  • Avatar
    Nx Support

    Pieter, due to the requirement to work with several hard drives, the server has a complicated logic inside to detect physical storages, so there is no single predefined path for the server to set. 

    Things get even more complicated because a directory shared with the VM is not seen by the guest Ubuntu as a physical drive, so the server cannot detect it automatically.

    That's why mounting default location is the easiest way.

     

    0
    Comment actions Permalink
  • Avatar
    Pieter Viljoen

    You say "That's why mounting default location is the easiest way."

    I say; that's why allowing the administrator to configure all paths is best.

    0
    Comment actions Permalink
  • Avatar
    Nx Support

    Yes, you are right, that would be easier for the administrator. 

    What I meant is the easiest way to solve the problem available today.

    0
    Comment actions Permalink
  • Avatar
    Pieter Viljoen

    I see, agree, good to know there is a workaround for now.

     

    Btw, I don't see a sub-forum for configuration related questions, as I'm evaluating, it looks like motion detection is not working as expected, what sub-forum should I pose my question?

    0
    Comment actions Permalink
  • Avatar
    Norman Graafsma

    Hi Pieter,

    The 'Camera Forum' would be the place where you could place questions about motion detection.

    But for convienance, I will answer it here. What likely happens is that the resolution of the secondary stream is set to high. The secondary resolution should be lower than 1024x768. If the secondary resolution is higher than motion detection won't work and also auto-scaling and other functions related to the secondary stream won't work. 

    0
    Comment actions Permalink
  • Avatar
    Ryan Flagler

    Pieter, I created the docker image you were having issues with. I've been running this without issue and have been prepping it for v4 support. If you'd like to troubleshoot it more, feel free to post issues on my github page for the docker container.

    https://github.com/thehomerepot/nxwitness

    0
    Comment actions Permalink

Please sign in to leave a comment.