Adding a Storage Drive to Gigastrand NVR


Using a secondary storage drive was not originally in the design for the Gigastrand NVR software however, it is a critical feature for many users to be able to separate out the video storage from their main system drive. It also solves a host of other issues with storage and even allows for an external device or a RAID to be used for storage.

At some point we will release a script file to do this automatically. For now, this is how you can do it manually. NOTE: This could result in data loss if not done properly. If you are not comfortable doing this on your own, Gigastrand can help you remotely.

  1. Format and setup the drive (using Parted or Gparted)
    1. NOTE: If you format the drive EXT3, the rest of the instructions will work fine. Otherwise, in step 4, change ext3 to the file system that you set the drive up with.
  2. Mount secondary drive (ex. sdb1, sda2) in /etc/kmotion/images_dbase
    sudo mount sdb1 /etc/kmotion/images_dbase

    1. NOTE: Rename the folder (ex. images_dbase2) before mounting if you want to copy information over later.
  3. edit fstab (/etc/fstab) as root (right-click on the file>Root Actions>Open As Text)
  4. Add the line:

    /dev/sdb1 /etc/kmotion/images_dbase ext3 relatime,errors=remount-ro 0 2

  5. Save the file
  6. Open the drive
  7. Change ownership to active user (right-click>Root Actions>Ownership to Active User)
  8. Edit /etc/apache2/envvars as root
  9. add the following 2 lines
    export APACHE_RUN_USER=user
    export APACHE_RUN_GROUP=user
  10. restart Apache

    sudo service apache2 restart

It wouldn’t hurt to restart the computer to make sure all the settings took hold but that is optional. Be sure to stop the NVR before you start and start the NVR (icons on the desktop) once complete.

 

Leave a comment

Your email address will not be published. Required fields are marked *