zoneminder new hdd for data

Forum for questions and support relating to the 1.25.x releases only.
Locked
krig
Posts: 2
Joined: Thu Jan 16, 2014 8:12 am

zoneminder new hdd for data

Post by krig »

I have Ubuntu server 12.04.3 and zoneminder 1.25.00 on 32Gb ssd drive. All works well till I need to add new hdd for data because of space. After I install 1,5Tb hdd (in fstab last line "/dev/sdb /data ext3 defaults 0 0"). I can add and rm files on /data, hdd works good.
Firstly I did like in this site "http://www.zoneminder.com/wiki/index.ph ... Hard_Drive" - it does not work.
I can see cameras but can not record. I try to change "options/path" on web interface of zoneminder and add following pathes /data/events /data/images /data/sounds.
Does not work. Why? Any suggestions...
futureechos
Posts: 10
Joined: Tue Mar 01, 2005 3:52 pm

Re: zoneminder new hdd for data

Post by futureechos »

Simplest way: once you have your new HD partitioned, formatted and mounted is to link to it.

For example:

Current HD, has path /var/cache/zoneminder/events as the path.
New HD is mounted as /zoneminder (chown www-data:www-data /zoneminder so apache can write to it)

shutdown zoneminder

cd /var/cache/zoneminder/
cp -pr events /zoneminder

you now have a copy of the events in /zoneminder/events

cd /var/cache/zoneminder
mv events events.old
ln -s /zoneminder/events .

when you now cd into /var/cache/zoneminder/events you are now on the new drives events dir.

Start zoneminder and test.

if all is OK (carefully):
cd /var/cache/zoneminder
rm -rf ./events.old (clears old space).

If this does not work - apache may need permissions to write to /zoneminder/events as it may not be set to followsymlinks.


Alt method - you copy the contents from /var/cache/zoneminder to the new drive; then remount the new drive as /var/cache/zoneminder (set this in fstab). This will overlap ontop the old folder structure so you will need to unmount after testing and clear it down, then remount new drive.

In unix you can mount drives to any path/folder that is local (or NFS'd) to it. if you choose. :-)
Locked