Page 1 of 1

Dedicated Hard Drive

Posted: Fri Jan 31, 2014 1:18 am
by joebob296
Hello, I was able to set up and configure zoneminder to see both of my IP cameras. Everything was working great until I added a dedicated HDD. I followed this guide http://www.zoneminder.com/wiki/index.ph ... Hard_Drive I edited my /etc/fstab to say the following

/dev/sdb1 /otherdrive ext3 defaults 0 2
/media/Security/zoneminder/images /var/cache/zoneminder/images none defaults,bind 0 2
/media/Security/zoneminder/events /var/cache/zoneminder/events none defaults,bind 0 2

I did not need any of the old files from /usr/share/zoneminder/events and /images so I deleted the directories. I then created a file link from /media/Security/zoneminder/events and /images to reference /var/cache/zoneminder. The disk percentage icon in the top right says 1% which is correct but then I get these errors in the log.

2014-01-30 20:01:32.084711 zma_m2 4390 FAT Can't change directory to 'events': No such file or directory zm_monitor.cpp 546
2014-01-30 20:01:32.076692 zma_m2 4390 ERR Can't make events/2: No such file or directory zm_monitor.cpp 541
2014-01-30 20:01:32.068626 zma_m2 4390 ERR Can't make events: Permission denied zm_monitor.cpp 529

I also changed the owner of /media/Security to www data along with the files inside it. I also gave it all permissions using chmod 777 however this did nothing to solve my dilemma. Any body know what to do from here? I am completely at a loss as to what to do next.

Re: Dedicated Hard Drive

Posted: Sun Feb 02, 2014 2:28 am
by knight-of-ni
The method you referred to is the correct thing to do, but this method is in replace of linking your events folders to another location, not in addition to.

Get rid of the symbolic links, put your events & images folder back to the way it was, and change your fstab to something like this per the example in the link:

Code: Select all

/dev/sdb1 /mnt/sdb1 ext4 defaults 0 2
/mnt/sdb1/zoneminder/images /usr/share/zoneminder/images none defaults,bind  0 2
/mnt/sdb1/zoneminder/events /usr/share/zoneminder/events none defaults,bind 0 2
Dont't forget to:

Code: Select all

mkdir /mnt/sdb1
Before trying to mount sdb1.

Once you mount /dev/sdb1, I think you will have to also create the subfolders manually:

Code: Select all

mkdir /mnt/sdb1/zoneminder/images
mkdir /mnt/sdb1/zoneminder/events
Do not create any symbolic links during this process, otherwise you are defeating the purpose.

Re: Dedicated Hard Drive

Posted: Mon Feb 03, 2014 3:54 am
by pyroman
When I did this, I first mounted the drive without the additional bindings in the fstab (first line only). I created the directories in the mounted drive, then added the extra bindings (lines 2 and 3) and re-mounted the drive.

Worked like a charm.