Page 1 of 1

Moving 'events' and 'images' to another drive breaks ZM

Posted: Tue Sep 11, 2012 11:54 pm
by themagicm
I have a 250GB drive mounted on /media/storage. I have this running on CentOS 6.3.

Created the following dirs:

/media/storage/zm/events
/media/storage/zm/images

in /var/www/html/zm I did:

ln -s /media/storage/zm/events events
ln -s /media/storage/zm/images images

Its looks like this:
0 lrwxrwxrwx 1 root root 24 Sep 11 18:49 events -> /media/storage/zm/events
0 lrwxrwxrwx 1 root root 24 Sep 11 18:49 images -> /media/storage/zm/images


Also, disk space is -1% when I log into ZM. I have 218GB free actually.

I've went to ZM and set paths to absoloute and also as just "images" and "events", neither work. ZM constantly "records" events, they are always blank.

Any fixes to this annoying problem that quite a few people have ?

Re: Moving 'events' and 'images' to another drive breaks ZM

Posted: Wed Sep 12, 2012 8:32 am
by PacoLM
Try chmod to www-data both folders.

Re: Moving 'events' and 'images' to another drive breaks ZM

Posted: Wed Sep 12, 2012 12:04 pm
by themagicm
you mean chown.

No, I dont have that www-data user for one, second, its 777 which means anyone can rwx.

Re: Moving 'events' and 'images' to another drive breaks ZM

Posted: Wed Sep 12, 2012 1:11 pm
by themagicm
Had I spent more time with the SEARCH feature, I would have found my answer. LOL.


You have to bind-mount it..

http://www.zoneminder.com/wiki/index.ph ... Hard_Drive

my original setup in fstab with cruft removed:

/dev/sdb2 /media/storage ext4 defaults

I added:
/media/storage/zm/events /var/www/html/zm/events none defaults,bind 0 2
/media/storage/zm/images /var/www/html/zm/images none defaults,bind 0 2


The "/var/www/...." that is where my current images/events resides. Once you mount the last two lines, it automagically works with ZM and disk space is reported correctly.

Problem solved.