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.
- Format and setup the drive (using Parted or Gparted)
- 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.
- Mount secondary drive (ex. sdb1, sda2) in /etc/kmotion/images_dbase
sudo mount sdb1 /etc/kmotion/images_dbase
- NOTE: Rename the folder (ex. images_dbase2) before mounting if you want to copy information over later.
- edit fstab (/etc/fstab) as root (right-click on the file>Root Actions>Open As Text)
- Add the line:
/dev/sdb1 /etc/kmotion/images_dbase ext3 relatime,errors=remount-ro 0 2
- Save the file
- Open the drive
- Change ownership to active user (right-click>Root Actions>Ownership to Active User)
- Edit /etc/apache2/envvars as root
- add the following 2 lines
- 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.