Using Webmin to add storage (drive or NAS)

A place for discussion of topics that are not specific to ZoneMinder. This could include Linux, Video4Linux, CCTV cameras or any other topic.
Post Reply
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Using Webmin to add storage (drive or NAS)

Post by bbunge »

I am always looking for "easy" ways to do things. I have been using Webmin as a graphical interface tool for years but have not explored adding drives with it. My testing has been done on Ubuntu and Debian and so far has been successful.

With that said I want to warn you that should the drive fail or not mount correctly on reboot you have a chance to loose your Zoneminder events. Either the events in the database or the event images. I will also let you know that the ZM team is working on a way to mount drives using systemd. Using Webmin I have successfully added a drive and SMB NAS under Ubuntu 14.04, 16.04 and Debian 9 RC2.

First install your flavor of Linux. If you have an operating system with Zoneminder on it, read on...

Next, get and install Webmin: http://www.webmin.com/ It is not hard to do and there are plenty instructions on the web.

Log into Webmin (https://your-ip-address:10000

If you have Zoneminder installed go to System-Bootup and Shutdown scroll down to Zoneminder and stop it

I assume you have added a drive? Go to Hardware-Partitions on Local Disks, find your new drive, add a partition and format it (EXT3 or EXT4). Skip this if the drive was formated with a Linux file system when you added it.

Go to Others-File Manager, click on var then cache. If you have Zoneminder installed, rename zoneminder to zoneminder.sav. If you have not installed Zoneminder, read on.

Now go to System-Disk and Network File Systems where we will add a mount.
For internal drive - In the drop down nest to Add Mount select the file system you formatted your drive with (EXT3 or EXT4). Click Add Mount. In the block next to Mounted As enter: /var/cache/zoneminder Check Disk and choose your added disk which is most likely SATA Device B...... Click Create

Warning! your NAS must understand symbolic links! NFS should be OK but some devices that do Windows shares only do not.
For NAS - If you are going to use a SMB share go to Software Packages and add CIFS-UTILS. n the drop down nest to Add Mount select the network file system of your choice. Click Add Mount. In the block next to Mounted As enter: /var/cache/zoneminder Fill in the information needed to connect to your network share (check the web if you need how to do this) Click Create

Go to Others-File Manager, click on var then cache.
If you have not installed Zoneminder, right click on zoneminder select Properties-Change Ownership and enter www-data (twice) and check Recursive. then Properties-Change Permissions to 0755 All(recursive). At this point you may install Zoneinder
If Zoneminder is installed, copy the /images /events and /temp filders from /var/cache/zoneminder.save and paste them into /var/cache/zoneminder. Right click on zoneminder select Properties-Change Ownership and enter www-data (twice) and check Recursive. then Properties-Change Permissions to 0755 All(recursive). Go to System-Bootup and Shutdown scroll down to Zoneminder and start it.

Reboot your server to make sure the added storage works. Best of luck!!!
Post Reply