Adding external hard drive

Forum for questions and support relating to the 1.26.x releases only.
Locked
peteer
Posts: 3
Joined: Sun Feb 09, 2014 4:05 pm

Adding external hard drive

Post by peteer »

I've been trying to figure out how I can make zoneminder upload all events to my external hard drive (NAS server configured with samba).

I followed this guide but I have no idea what I have to add to the fstab file...

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

My disk is recognized as /dev/sda1 and the nas is mounted to /media/hdd, I'd like to upload all events to /media/hdd/events.

So what do I change the settings below too to make them upload events to the external hard drive?

Code: Select all

/dev/sdX1 /otherdrive ext3 defaults 0 2
/otherdrive/zoneminder/images /var/cache/zoneminder/images none defaults,bind  0 2
/otherdrive/zoneminder/events /var/cache/zoneminder/events none defaults,bind 0 2
(I'm a complete noob at linux, I tried to figure out my own but it just won't work.. :( )
mikb
Posts: 661
Joined: Mon Mar 25, 2013 12:34 pm

Re: Adding external hard drive

Post by mikb »

Take a look here first ...

http://www.zoneminder.com/forums/viewto ... 30&t=21899

and I wonder if whoever wrote that guide you followed has no idea how crappy some of these NAS boxes are, maybe understandably, when trying to Unixy things on a FAT filesystem "inside the box".
helpme1986
Posts: 8
Joined: Sat Feb 08, 2014 10:47 am

Re: Adding external hard drive

Post by helpme1986 »

Here is what I did to make it work,

On my NAS make a new NFS share which had read/write permissions for all users (I have a zyxel nas, all of them are different so cant explain this bit sorry)

mkdir /mnt/cctv
apt-get install nfs-common
nano /etc/fstab

Added this to the bottom:

Note, my NAS IP is 192.168.1.3, my NFS share was /i-data/fbaf09a8/nfs/cctv

Code: Select all

192.168.1.3:/i-data/fbaf09a8/nfs/cctv /mnt/cctv nfs
/mnt/cctv/zoneminder/images /var/cache/zoneminder/images none defaults,bind 0 2
/mnt/cctv/zoneminder/events /var/cache/zoneminder/events none defaults,bind 0 2
/mnt/cctv/zoneminder/images /usr/share/zoneminder/images none defaults,bind 0 2
/mnt/cctv/zoneminder/events /usr/share/zoneminder/events none defaults,bind 0 2
*Dont forget to create the zoneminder/images and zoneminder/events on the NFS first as they wont link
rebooted and it worked
peteer
Posts: 3
Joined: Sun Feb 09, 2014 4:05 pm

Re: Adding external hard drive

Post by peteer »

Alright, I guess it's working now, since the disk shows -1% usage, did you have that problem aswell? :? (now it is linked, but doesn't record anymore)
helpme1986
Posts: 8
Joined: Sat Feb 08, 2014 10:47 am

Re: Adding external hard drive

Post by helpme1986 »

have you rebooted? mine showed -1% until i rebooted, if it still shows -1% then the mounting and binding hasnt worked properly

maybe copy n paste your fstab here so we can see (im a noob as well so dont know if ill be able to help much!)
peteer
Posts: 3
Joined: Sun Feb 09, 2014 4:05 pm

Re: Adding external hard drive

Post by peteer »

Still showing -1 :|

But I'm wondering, the nas is mounted to /media/hdd, so do I put /media/hdd/cctv or /hdd/cctv :o

Code: Select all

192.168.0.125:/media/hdd/cctv /mnt/cctv nfs
/mnt/cctv/zoneminder/images /var/cache/zoneminder/images none defaults,bind 0 2
/mnt/cctv/zoneminder/events /var/cache/zoneminder/events none defaults,bind 0 2
/mnt/cctv/zoneminder/images /usr/share/zoneminder/images none defaults,bind 0 2
/mnt/cctv/zoneminder/events /usr/share/zoneminder/events none defaults,bind 0 2
I just copied yours, but changed my IP and the location of NAS. I guess that's where it goes wrong but I'll try some settings out tonight.
Locked