Changing Paths (Stuck)

Support and queries relating to all previous versions of ZoneMinder
Locked
TrOjAn
Posts: 74
Joined: Thu Sep 11, 2008 5:03 pm

Changing Paths (Stuck)

Post by TrOjAn »

Hopefully a simple issue to you Linux gurus but one that has me beat, my / partition is only 10 gig but my /home is 50gig....

I changed the paths in ZM Config to:

ZM_DIR_EVENTS /home/trojan/Documents/events
ZM_DIR_IMAGES /home/trojan/Documents/images
ZM_DIR_SOUNDS /home/trojan/Documents/sounds

As you may well imagine it broke it ;)

The help states I need to "create a link from that area to the path you give here".

As total n00b on Linux I am lost, can someone help me out here please, I am old ya know an Linux is a new beast to me.

Thanks, TrOjAn
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Set the paths as they were before.
This settings are from your web root, not your system root.

Go into your web folder ( maybe /var/www/html/zm ) and move the events folder to your /home/trojan/Documents/events if you have not already done so.
Then you need to create a symbolic link for events in place of the folder you moved.
Thats all that you have to do.
TrOjAn
Posts: 74
Joined: Thu Sep 11, 2008 5:03 pm

Post by TrOjAn »

thanks for that, so just to clarify before I kill it all again ( just tried upgrading and lost it all).

ln -s /home/trojan/documents/events ./events

Would that be correct? then do the same for images and sounds?

Once thats done do I need to add the links to a file so they are there each bootup?

Thanks, TrOjAn
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Yeah that is correct. I wouldn't worry about the other folders as they don't really store much. The sounds directory is to place wav files for the alarm sound if you enable it in options so it's static, the images directory is just where snapshots are stored for the zones interface and a couple other pages and those get over written each time the zones or other page is opened.
TrOjAn
Posts: 74
Joined: Thu Sep 11, 2008 5:03 pm

Post by TrOjAn »

cordel,

THANKS for all the help... I have done that now so hopefully it will all start to go to the bigger partition.

My next thing is to link it to the x10 automation pc, I am very impressed with this and next pay day Ill defo send a donation, what a great program and people.

TrOjAn
TrOjAn
Posts: 74
Joined: Thu Sep 11, 2008 5:03 pm

Post by TrOjAn »

Bad news, that didnt work... if I trigger a force alarm and the pictures are supposed to be grabbed theres nothing.. it goes through the motions but nothing is saved.

The symbolic link is there and I have verified it.... any other ideas?

Is it possible to uninstall ZM and reinstall to a different partition?

TrOjAn

I have just found some log files with errors.. posted below

09/12/08 21:30:44.005845 zmfix[8841].ERR-zmfix.cpp/75 [Can't chmod /dev/video0 to 20666: Operation not permitted]

and

09/12/08 21:31:21.413385 zma_m2[8876].INF-zm_monitor.cpp/1165 [Camera_2: 101 - Gone into alarm state]
09/12/08 21:31:21.414110 zma_m2[8876].ERR-zm_event.cpp/131 [Can't mkdir ./events/2/16: No such file or directory]
09/12/08 21:31:21.414238 zma_m2[8876].FAT-zm_event.cpp/140 [Can't fopen ./events/2/16/.16: No such file or directory]
09/12/08 21:31:21.414468 zma_m2[8876].ERR-zm_signal.cpp/77 [Got signal (Aborted), crashing]
User avatar
Normando
Posts: 219
Joined: Sun Aug 17, 2008 5:34 am
Location: Rosario - Argentina

Post by Normando »

Code: Select all

ln -s /home/trojan/documents/events ./events 
should be

Code: Select all

ln -s /home/trojan/documents/events events 
TrOjAn
Posts: 74
Joined: Thu Sep 11, 2008 5:03 pm

Post by TrOjAn »

Normando,

Yes I did realise that after I posted, I did in fact use :

ln -s /home/trojan/documents/events events
ln -s /home/trojan/documents/images images
ln -s /home/trojan/documents/sounds sounds

However, it still does not work, I have just done a capture and the image files end up in TWO places,

/usr/share/zoneminder/events/Camera_2 AND /var/cache/zoneminder/events/2/2

SO there are 2 copies of the grabs...

TrOjAn
User avatar
Normando
Posts: 219
Joined: Sun Aug 17, 2008 5:34 am
Location: Rosario - Argentina

Post by Normando »

That is correct

ZM create a symlink from camera name to camera ID folder

Camera_2 -> /2

Your system work perfect
TrOjAn
Posts: 74
Joined: Thu Sep 11, 2008 5:03 pm

Post by TrOjAn »

OK so thats ok but I still need to get these pictures and videos OFF the /root and into my HOME folder with 50 gb space.. else its going to fill up really fast.

TrOjAn
TrOjAn
Posts: 74
Joined: Thu Sep 11, 2008 5:03 pm

Post by TrOjAn »

[SOLVED]

All fixed now, by draging the link files from /home/trojan to the Zoneminder folder its working..

Thanks again, TrOjAn
agavus
Posts: 3
Joined: Mon Feb 16, 2009 6:04 pm

moving events dir

Post by agavus »

Hi,

I could use some help on this subject. I am new to linux but managed to install Ubuntu and ZM (with use of the Synaptic PM). At this moment I have a system with two pico2000 capture cards and 8 wired cams. Everything is working fine but I still need change the path for the events to /home to make full use of the diskspace.

I understand all the info given above, but I think I am missing some basic knowledge about file permissions. I am not able to copy/move/delete the events folder or even place a shortcut in the zoneminder folder because the owner of the file is www-data and therefore I don't have any right to do anything.

Help is much appreciated.

Thanks

Agavus
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

You need Super User permissions, so either as root you need to perform these commands or use sudo.
agavus
Posts: 3
Joined: Mon Feb 16, 2009 6:04 pm

Post by agavus »

Thanks. It worked. I am still a little confused about that sudo stuff in a terminal, so I logged in as root in the GUI and that worked fine.

Last thing to do is secure the HTTP directory.

Cheers.
Locked