Page 1 of 1
Adding secondary hard drive
Posted: Thu Nov 02, 2006 9:57 pm
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!
Posted: Thu Nov 02, 2006 10:07 pm
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
Posted: Sat Nov 04, 2006 7:31 am
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?
Posted: Sat Nov 04, 2006 7:41 am
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
Posted: Sat Nov 04, 2006 7:44 am
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 :-/
Posted: Sat Nov 04, 2006 7:45 am
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
Posted: Sat Nov 04, 2006 7:46 am
by blaxer
That is exactly what I have and my new drive is mounted as /data with /data/zm/events directories on it...
Posted: Sat Nov 04, 2006 8:09 am
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
so it's a bit more involved. I might add it to the rpm later down the road.
Sorry,
Corey
[edit]
Fix above paths
Posted: Sat Nov 04, 2006 8:12 am
by blaxer
No problem that seems to work now, however getting a permissions denied when browsing to /events. How do I fix that?
Posted: Sat Nov 04, 2006 8:14 am
by cordel
chown -R apache:apache /data/zm
Assuming that apache is your user and group.
Corey
Posted: Sat Nov 04, 2006 8:20 am
by cordel
You might have to do the same for the link
chown apache:apache /var/www/html/zm/events
Posted: Mon Nov 06, 2006 7:01 am
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!!