Dedicated Hard Drive

Forum for questions and support relating to the 1.26.x releases only.
Locked
joebob296
Posts: 1
Joined: Fri Jan 31, 2014 1:05 am

Dedicated Hard Drive

Post 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.
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Dedicated Hard Drive

Post 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.
Last edited by knight-of-ni on Mon Feb 03, 2014 12:51 pm, edited 1 time in total.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
pyroman
Posts: 25
Joined: Fri Jan 03, 2014 6:40 pm

Re: Dedicated Hard Drive

Post 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.
Locked