Adding secondary hard drive

Support and queries relating to all previous versions of ZoneMinder
Locked
blaxer
Posts: 26
Joined: Mon Jun 27, 2005 4:49 pm

Adding secondary hard drive

Post by blaxer »

I would like to add a secondary drive to my zoneminder machine. Althought I'm a bit of a linux novice I'm sure I will have no problem seeing the drive in FC 4, however, I am bit lost as to what to do after that. What FS will I need on it, partitions etc... I want to have ZM store all of it's images and recordings on the new larger drive, the mysql DB can stay on the original system drive. Is this even possible??

TIA!
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Yeah it's easy.
As far as FS for the new HD it's your choice. I use RieserFS my self.
You can partition it how ever you want, if yo want to use the whole drive then just one.
After you add it to fstab create a directory structure where you want the events stored.
for example I named my partition /data and put the zm events in /data/zm/events/
Then see this post http://www.zoneminder.com/forums/viewtopic.php?t=7108

Regards,
Corey
blaxer
Posts: 26
Joined: Mon Jun 27, 2005 4:49 pm

Post by blaxer »

Hmm, I must be missing something silly easy. I installed the drive, partitioned, formated, mounts just fine. Created directories and followed the instructions in that post to add the conf file for apache, rebooted and nothing is being saved to the new drive. Any ideas?
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Have you checked the error logs?
Check and make sure your web user and group have permissions.
Make sure you didn't change the path in zm path settings (It should be just events) as it wants a path relative to the web root and not the drive path. the conf file you created makes the directory relative to web root.

Regards,
Corey
blaxer
Posts: 26
Joined: Mon Jun 27, 2005 4:49 pm

Post by blaxer »

Nothing I am seeing in the logs, if I browse to "zoneminder"/events I see the old events folder on the original drive. As for permissions I'm a bit lost there :-/
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Just in case here is my zm-http.conf:

Code: Select all

Alias /zm/events "/data/zm/events/"
<Directory "/data/zm/events">
    Options MultiViews FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>
Corey
blaxer
Posts: 26
Joined: Mon Jun 27, 2005 4:49 pm

Post by blaxer »

That is exactly what I have and my new drive is mounted as /data with /data/zm/events directories on it... :-(
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

My Bad,
You can't do that with the events directory.
you'll have to move the files to the new directory then link to it.

mv /var/www/html/zm/events /data/zm/events
ln -s /var/www/html/zm/events /data/zm/events

I forgot that I had added a mod in mine so that I could put the events path separate :roll:
so it's a bit more involved. I might add it to the rpm later down the road.

Sorry,
Corey

[edit]
Fix above paths :roll:
Last edited by cordel on Sat Nov 04, 2006 8:21 am, edited 1 time in total.
blaxer
Posts: 26
Joined: Mon Jun 27, 2005 4:49 pm

Post by blaxer »

No problem that seems to work now, however getting a permissions denied when browsing to /events. How do I fix that?
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

chown -R apache:apache /data/zm

Assuming that apache is your user and group.

Corey
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

You might have to do the same for the link

chown apache:apache /var/www/html/zm/events
blaxer
Posts: 26
Joined: Mon Jun 27, 2005 4:49 pm

Post by blaxer »

Got it! Have to add Indexes to the Options, like so:

Options MultiViews FollowSymLinks Indexes

Hope that helps someone...

Cordel, thank you so much for the assitance, it's greatly appreciated!!
Locked