Are these the needed changes to set up a new drive for ZM?

Support and queries relating to all previous versions of ZoneMinder
Locked
pre-newbie
Posts: 23
Joined: Sun Apr 09, 2006 5:14 pm
Location: Chile

Are these the needed changes to set up a new drive for ZM?

Post by pre-newbie »

Hi!
As the events can need huge storage sizes, to modify the ZM setting to use a dedicated and bigger drive. I looked in the forum for a howto on the needed changes but I did not find it. So here is my partially successfull experience. It may be useful for other newbies like me.

I use ZM over Suse10.0 installed following the howto posted in the forum.
And I have installed a serial hard drive, mounted and poing to a folder. In my case to /SATA1

1) Setting the folders:
I copied all the folder /srv to the new drive under /SATA1, and renamed it as ZM_data.

2) Updating the permissions:
I modified all the folders, subfolders and files permissions following those from the original /srv folder. Most of them as user 'wwwrun' and group 'www'.

3) Updating the web and cgi path, using the linux console:
su -
edit /usr/local/etc/zm.conf
# pressing <insert> you will be able to edit the file
# changed the web and cgi path to:
ZM_PATH_WEB:/SATA1/ZM_data/www/htdocs/
ZM_PATH_WEB:/SATA1/ZM_data/www/cgi-bin/
# press <ESC> then enter the code
:wq

4) Updating the event/images/sounds parth:
in the zoneminder console, selecting 'options', then 'path', I modified the values for ZM_DIR_EVENTS, ZM_DIR_IMAGES, ZM_DIR_SOUNDS to:
/SATA1/ZM_data/www/htdocs/events
/SATA1/ZM_data/www/htdocs/images
/SATA1/ZM_data/www/htdocs/sounds

RESULTS: After saving the changes and restarting zoneminder, the monitors are fine (I can see the caneras's images), the disk % in the zm console is describing correctly the used space of the new drive, motion events are recorded on the new drive perfectly. The information in th database is the same one of the folders in the new drive, where I can open manually the stored jpeg files. But....

PROBLEMS to FIX:
- zones do not show the image, but a blank frame.
- the replay or play does not work. There is a blank frame instead.
It seems like there is another path to be changed to allow the browser to present the streaming but if I change the value for ZM_PATH_ZMS in the options of the ZM console, by /SATA1/ZM_data/www/cgi-bin/ I loose the monitors and there is no more recorded events....

Please, what else I should change to make ZM to store the files in the new drive but without loosing the services?

Maybe I did not used the best way to get this done. Finally I am just a pre-newbie. Is there a better way?
Many thanks for any help on this...
pre-newbie
Posts: 23
Joined: Sun Apr 09, 2006 5:14 pm
Location: Chile

No Replay if Events are in a dedicated drive.

Post by pre-newbie »

I have done more attempts.
Point 4) with path as events, sounds and images instead of their full path. The result is the same. Recorded events but no replay...

Same problem described in:
http://www.zoneminder.com/forum/viewtopic.php?t=4393

But some of the mentioned files and folders do not exist in the newer versions.

I modified DocumentRoot, cgi-bin and their directories in: etc/apache2/default-server.conf to set the new web root dir.
Regardless of the ZM_DIR_EVENTS value, the result is that there is no monitors, nor replay, nor zones. Events are recorded in the new drive anyway.

What is needed to be modified to get the urls pointing to the right place?
It seems like it is a very silly problem, but I do not know where else to look for or to modify...
Please, any help is very very appreciated. :cry:
pre-newbie
Posts: 23
Joined: Sun Apr 09, 2006 5:14 pm
Location: Chile

fixed?

Post by pre-newbie »

I reverted all the changes regarding CGI on:
/etc/apache2/default-server.conf and
/usr/local/etc/zm.conf

the result is that now I recovered the monitors, zones, replay and events are being recorded in the new dedicated drive.

So, it seems like to get events being recorded in a dedicated drive, the changes that have to be done are on ZM path (console) but without using the full path, and the full path on zm.conf and default-server.conf WITHOUT modifying the cgi-bin path, but updating the path to the folder that contains the event's folder. In my case htdocs.

I have to test this, but it seem to be working ok.
I hope this helps other newbies (like me) that we do not have experience with zm, php, nor apache.
regards,
pre-newbie :D
MILxDOT
Posts: 64
Joined: Wed Mar 29, 2006 5:12 am

Post by MILxDOT »

I normally prefer to leave zoneminder paths "AS IS" for standardization. What I would do is if you add a drive...just mount it as /var/www/html/events for a standard build on redhat-ish standards. This will give you the entire drive for event image storage. In my CentOS 4.3 x86_64 HOWTO I used one 250GB Hard drive with a 10GB OS partition mounted as / a swap partition, and then a 238GB partition mounted as /var/www/html/events. If you do this...you will need to change the permissions on that directory ie chown apache:apache /var/www/html/events

This keeps all your zoneminder settings as close to stock as possible and uses linux system administration to manage the partitions, etc.
Locked