[SOLVED] Zoneminder Disk space issue

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

Re: Zonminder Disk space issue

Postby barjac » Jun 15th, '12, 12:04

As I feared.
OK I guess it's reinstall zm time, but first let's remove the symlinks.
As root (using su not "su -" )
Code: Select all
rm /home/$USER/zm -rf
rm /var/www/html/zm -rf

Now re-install zoneminder
Code: Select all
urpmi --replacepkgs zoneminder

Now run zmsetup and let it create a new mysql database for zoneminder
Code: Select all
zmsetup

Now test it - if it works then use the symlink procedure ONCE and carefully, exactly as I described.

Good luck ;)
Add this icon to your KDE desktop - save as "About.desktop" http://pastebin.com/raw.php?i=X10X1Ype
User avatar
barjac
 
Posts: 193
Joined: Apr 4th, '11, 10:26
Location: Rossendale UK

Re: Zonminder Disk space issue

Postby freetibet » Jun 15th, '12, 12:14

[root@localhost cctvadmin]# cd
[root@localhost ~]# su
[root@localhost ~]# systemctl stop zoneminder.service
[root@localhost ~]# mv -T /var/www/html/zm zm
[root@localhost ~]# ln -sf /home/$USER/zm /var/www/html/zm
[root@localhost ~]# systemctl start zoneminder.service
Job failed. See system journal and 'systemctl status' for details.
[root@localhost ~]#
freetibet
 
Posts: 154
Joined: Jun 4th, '12, 12:22

Re: Zonminder Disk space issue

Postby freetibet » Jun 15th, '12, 12:16

barjac wrote:As I feared.
OK I guess it's reinstall zm time, but first let's remove the symlinks.
As root (using su not "su -" )
Code: Select all
rm /home/$USER/zm -rf
rm /var/www/html/zm -rf

Now re-install zoneminder
Code: Select all
urpmi --replacepkgs zoneminder

Now run zmsetup and let it create a new mysql database for zoneminder
Code: Select all
zmsetup

Now test it - if it works then use the symlink procedure ONCE and carefully, exactly as I described.

Good luck ;)


followed EXACTLy as you said.
I only did this once as last time and got…

Code: Select all
Access forbidden!

You don't have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster.

Error 403

88.96.6.132
Apache/2.2.22 (Mageia/ITK-12.mga2)


and


Code: Select all
[cctvadmin@localhost ~]$ ls -l /home/$USER/
total 32
drwxr-xr-x 2 cctvadmin cctvadmin 4096 Jun 10 13:55 Desktop/
drwxr-xr-x 2 cctvadmin cctvadmin 4096 Jun 10 13:55 Documents/
drwxr-xr-x 2 cctvadmin cctvadmin 4096 Jun 10 13:55 Downloads/
drwxr-xr-x 2 cctvadmin cctvadmin 4096 Jun 10 13:55 Music/
drwxr-xr-x 2 cctvadmin cctvadmin 4096 Jun 10 13:55 Pictures/
drwxr-xr-x 2 cctvadmin cctvadmin 4096 Jun 10 13:55 Templates/
drwx------ 2 cctvadmin cctvadmin 4096 Jan 11  2011 tmp/
drwxr-xr-x 2 cctvadmin cctvadmin 4096 Jun 10 13:55 Videos/
[cctvadmin@localhost ~]$ ls -l /var/www/html/
total 4
-rw-r--r-- 1 root root 131 May  2 22:31 index.html
lrwxrwxrwx 1 root root  18 Jun 15 11:14 zm -> /home/cctvadmin/zm
[cctvadmin@localhost ~]$
freetibet
 
Posts: 154
Joined: Jun 4th, '12, 12:22

Re: Zonminder Disk space issue

Postby barjac » Jun 15th, '12, 12:20

doktor5000 wrote:Doesn't matter, if you run that command as your user, $USER (an environment variable) automatically expands to your username, kinda like a magic placeholder ;)

Just a note here - it is also OK to use this as 'root' using su.
$USER still holds the regular username. (I think of it as a regular user with root privelage)
If "su -" is used then $USER holds "root", which is why I specified su (not "su -" ) in previous posts.
Add this icon to your KDE desktop - save as "About.desktop" http://pastebin.com/raw.php?i=X10X1Ype
User avatar
barjac
 
Posts: 193
Joined: Apr 4th, '11, 10:26
Location: Rossendale UK

Re: Zonminder Disk space issue

Postby freetibet » Jun 15th, '12, 12:26

barjac wrote:
doktor5000 wrote:Doesn't matter, if you run that command as your user, $USER (an environment variable) automatically expands to your username, kinda like a magic placeholder ;)

Just a note here - it is also OK to use this as 'root' using su.
$USER still holds the regular username. (I think of it as a regular user with root privelage)
If "su -" is used then $USER holds "root", which is why I specified su (not "su -" ) in previous posts.


Thanks OK,
I have done all that…
again a couple of times and it now works…
Disk space is still reporting as 31% full though….
freetibet
 
Posts: 154
Joined: Jun 4th, '12, 12:22

Re: Zonminder Disk space issue

Postby barjac » Jun 15th, '12, 12:38

Ah good.
I'm suspecting that ZM is reporting the /var usage, it is probably unaware of the symlink to /home, so just ignore the indicator in ZM.
Sadly this also probably means that the filter will not work either, so you will need to set up some other means of monitoring the disk usage.
This is a temporary measure, and you have a LOT of space now, however you need to keep an eye on it.
I will query this upstream out of curiosity.
Add this icon to your KDE desktop - save as "About.desktop" http://pastebin.com/raw.php?i=X10X1Ype
User avatar
barjac
 
Posts: 193
Joined: Apr 4th, '11, 10:26
Location: Rossendale UK

Re: Zonminder Disk space issue

Postby freetibet » Jun 15th, '12, 12:42

Thanks for all your help.
If there is a file edit I can do to make ZM look at the right partition let me know I'm very familiar with nano etc…
It does say I notice in ZM that if there is lack of space then make a sum link as you have suggested to me so probably the fix is quite simple…
Thanks ever so much…
freetibet
 
Posts: 154
Joined: Jun 4th, '12, 12:22

Re: Zonminder Disk space issue

Postby barjac » Jun 15th, '12, 12:48

I think my assumption was wrong - here it appears to report the usage of /home - what does df say
Code: Select all
df
Add this icon to your KDE desktop - save as "About.desktop" http://pastebin.com/raw.php?i=X10X1Ype
User avatar
barjac
 
Posts: 193
Joined: Apr 4th, '11, 10:26
Location: Rossendale UK

Re: Zonminder Disk space issue

Postby freetibet » Jun 15th, '12, 12:51

barjac wrote:I think my assumption was wrong - here it appears to report the usage of /home - what does df say
Code: Select all
df



Code: Select all
[root@localhost ~]# df
Filesystem      Size  Used Avail Use% Mounted on
rootfs           12G  3.6G  7.9G  31% /
devtmpfs        981M     0  981M   0% /dev
tmpfs           987M  368M  619M  38% /dev/shm
tmpfs           987M  6.4M  980M   1% /run
/dev/sda1        12G  3.6G  7.9G  31% /
tmpfs           987M     0  987M   0% /sys/fs/cgroup
/dev/sda3       915G   14G  901G   2% /home
[root@localhost ~]#
freetibet
 
Posts: 154
Joined: Jun 4th, '12, 12:22

Re: Zonminder Disk space issue

Postby barjac » Jun 15th, '12, 12:55

How odd.
Here zm is reporting 84% and /home is at 84% according to df.
root is currently at 65% so it's not reporting that.
I can't investigate right now, but I will do some digging on this and let you know.
Add this icon to your KDE desktop - save as "About.desktop" http://pastebin.com/raw.php?i=X10X1Ype
User avatar
barjac
 
Posts: 193
Joined: Apr 4th, '11, 10:26
Location: Rossendale UK

Re: Zonminder Disk space issue

Postby freetibet » Jun 15th, '12, 12:58

barjac wrote:How odd.
Here zm is reporting 84% and /home is at 84% according to df.
root is currently at 65% so it's not reporting that.
I can't investigate right now, but I will do some digging on this and let you know.


ZM is now reporting 31 %
so that tallies
freetibet
 
Posts: 154
Joined: Jun 4th, '12, 12:22

Re: Zonminder Disk space issue

Postby barjac » Jun 15th, '12, 13:01

No, if yours was reporting like mine, zm would be reporting 2% ;)
Add this icon to your KDE desktop - save as "About.desktop" http://pastebin.com/raw.php?i=X10X1Ype
User avatar
barjac
 
Posts: 193
Joined: Apr 4th, '11, 10:26
Location: Rossendale UK

Re: Zonminder Disk space issue

Postby freetibet » Jun 15th, '12, 13:05

barjac wrote:No, if yours was reporting like mine, zm would be reporting 2% ;)


odd i see
freetibet
 
Posts: 154
Joined: Jun 4th, '12, 12:22

Re: Zonminder Disk space issue

Postby barjac » Jun 15th, '12, 13:30

I smell a rat - just to be sure please post the output of these again.
Code: Select all
ls -l /home/cctvadmin/
ls -l /var/www/html/
Add this icon to your KDE desktop - save as "About.desktop" http://pastebin.com/raw.php?i=X10X1Ype
User avatar
barjac
 
Posts: 193
Joined: Apr 4th, '11, 10:26
Location: Rossendale UK

Re: Zonminder Disk space issue

Postby freetibet » Jun 15th, '12, 13:39

barjac wrote:I smell a rat - just to be sure please post the output of these again.
Code: Select all
ls -l /home/cctvadmin/
ls -l /var/www/html/


Code: Select all
[root@localhost ~]# ls -l /home/cctvadmin/
total 32
drwxr-xr-x 2 cctvadmin cctvadmin 4096 Jun 10 13:55 Desktop/
drwxr-xr-x 2 cctvadmin cctvadmin 4096 Jun 10 13:55 Documents/
drwxr-xr-x 2 cctvadmin cctvadmin 4096 Jun 10 13:55 Downloads/
drwxr-xr-x 2 cctvadmin cctvadmin 4096 Jun 10 13:55 Music/
drwxr-xr-x 2 cctvadmin cctvadmin 4096 Jun 10 13:55 Pictures/
drwxr-xr-x 2 cctvadmin cctvadmin 4096 Jun 10 13:55 Templates/
drwx------ 2 cctvadmin cctvadmin 4096 Jan 11  2011 tmp/
drwxr-xr-x 2 cctvadmin cctvadmin 4096 Jun 10 13:55 Videos/
[root@localhost ~]# ls -l /var/www/html/
total 8
-rw-r--r--  1 root   root    131 May  2 22:31 index.html
drwxr-xr-x 15 apache apache 4096 Jun 15 11:24 zm/
[root@localhost ~]#
freetibet
 
Posts: 154
Joined: Jun 4th, '12, 12:22

Re: Zonminder Disk space issue

Postby barjac » Jun 15th, '12, 13:57

Rat found.
That is the normal set-up without symlink.
So let's do this carefully - one step at a time.
We will keep a backup of zm in the / for now, so do this.
Code: Select all
su
cp -R /var/www/html/zm /home/cctvadmin/
mv /var/www/html/zm /var/www/html/zm_orig
ln -sf /home/cctvadmin/zm /var/www/html/zm


OK stop there and give me the output again of
Code: Select all
ls -l /home/cctvadmin/
ls -l /var/www/html/
Add this icon to your KDE desktop - save as "About.desktop" http://pastebin.com/raw.php?i=X10X1Ype
User avatar
barjac
 
Posts: 193
Joined: Apr 4th, '11, 10:26
Location: Rossendale UK

Re: Zonminder Disk space issue

Postby freetibet » Jun 15th, '12, 14:21

barjac wrote:Rat found.
That is the normal set-up without symlink.
So let's do this carefully - one step at a time.
We will keep a backup of zm in the / for now, so do this.
Code: Select all
su
cp -R /var/www/html/zm /home/cctvadmin/
mv /var/www/html/zm /var/www/html/zm_orig
ln -sf /home/cctvadmin/zm /var/www/html/zm


OK stop there and give me the output again of
Code: Select all
ls -l /home/cctvadmin/
ls -l /var/www/html/



Code: Select all
[root@localhost cctvadmin]# ls -l /home/cctvadmin/
total 36
drwxr-xr-x  2 cctvadmin cctvadmin 4096 Jun 10 13:55 Desktop/
drwxr-xr-x  2 cctvadmin cctvadmin 4096 Jun 10 13:55 Documents/
drwxr-xr-x  2 cctvadmin cctvadmin 4096 Jun 10 13:55 Downloads/
drwxr-xr-x  2 cctvadmin cctvadmin 4096 Jun 10 13:55 Music/
drwxr-xr-x  2 cctvadmin cctvadmin 4096 Jun 10 13:55 Pictures/
drwxr-xr-x  2 cctvadmin cctvadmin 4096 Jun 10 13:55 Templates/
drwx------  2 cctvadmin cctvadmin 4096 Jan 11  2011 tmp/
drwxr-xr-x  2 cctvadmin cctvadmin 4096 Jun 10 13:55 Videos/
drwxr-xr-x 15 root      root      4096 Jun 15 13:20 zm/
[root@localhost cctvadmin]# ls -l /var/www/html/
total 8
-rw-r--r--  1 root   root    131 May  2 22:31 index.html
lrwxrwxrwx  1 root   root     18 Jun 15 13:20 zm -> /home/cctvadmin/zm/
drwxr-xr-x 15 apache apache 4096 Jun 15 11:24 zm_orig/
[root@localhost cctvadmin]#
freetibet
 
Posts: 154
Joined: Jun 4th, '12, 12:22

Re: Zoneminder Disk space issue

Postby barjac » Jun 15th, '12, 15:08

OK nearly there :)
Now
Code: Select all
su
chown -R apache:apache /home/cctvadmin/zm
zmrestart

See how that goes.
Add this icon to your KDE desktop - save as "About.desktop" http://pastebin.com/raw.php?i=X10X1Ype
User avatar
barjac
 
Posts: 193
Joined: Apr 4th, '11, 10:26
Location: Rossendale UK

Re: Zoneminder Disk space issue

Postby freetibet » Jun 15th, '12, 15:26

barjac wrote:OK nearly there :)
Now
Code: Select all
su
chown -R apache:apache /home/cctvadmin/zm
zmrestart

See how that goes.


You are a total hero !

Thanks,

Disk space now reading as 2%….

Horray !!!
freetibet
 
Posts: 154
Joined: Jun 4th, '12, 12:22

Re: [SOLVED] Zoneminder Disk space issue

Postby barjac » Jun 15th, '12, 15:41

Excellent - glad I could help. :D

One point worth mentioning - avoid using the web interface for starting and stopping ZM - there is a minor bug that I am trying to resolve. Always ssh in and use
Code: Select all
systemctl start zoneminder.service
systemctl stop zoneminder.service
systemctl restart zoneminder.service
as appropriate, as root.
zmrestart is a little script that is handy to do a full server restart - it stops zm, mysql and httpd and then restarts them again in order.

Have fun.

EDIT you can now delete /var/www/html/zm_orig ;)
Last edited by barjac on Jun 15th, '12, 15:47, edited 1 time in total.
Add this icon to your KDE desktop - save as "About.desktop" http://pastebin.com/raw.php?i=X10X1Ype
User avatar
barjac
 
Posts: 193
Joined: Apr 4th, '11, 10:26
Location: Rossendale UK

Re: [SOLVED] Zoneminder Disk space issue

Postby freetibet » Jun 15th, '12, 15:45

Thanks.
I will avoid that…
one problem…
maybe two…
Event viewer .. streaming is fine in eyezm (iPhone app.)... is broken and separately I can't set any interleaving apart from "0"
Don't know if these are related issues...
freetibet
 
Posts: 154
Joined: Jun 4th, '12, 12:22

Re: [SOLVED] Zoneminder Disk space issue

Postby barjac » Jun 15th, '12, 16:40

I have never used eye-zm, but as for the event viewer I have no problems with it using the same symlinked system for testing. My test system is Cauldron - my real server runs mga2.
Did it work before?
I don't recognize the 'interleaving' option that you refer to. What's it for? I never used it.
I would recommend the #zoneminder IRC channel on freenode (or the forum, but IRC is faster) for help with specific problems related to the use of zoneminder.
Add this icon to your KDE desktop - save as "About.desktop" http://pastebin.com/raw.php?i=X10X1Ype
User avatar
barjac
 
Posts: 193
Joined: Apr 4th, '11, 10:26
Location: Rossendale UK

Re: Zonminder Disk space issue

Postby freetibet » Jun 24th, '12, 23:07

How do I do this if I am installing a brand new system ?

OK Think I have it now
freetibet
 
Posts: 154
Joined: Jun 4th, '12, 12:22

Re: Zonminder Disk space issue

Postby doktor5000 » Jun 25th, '12, 20:23

freetibet wrote:How do I do this if I am installing a brand new system ?

OK Think I have it now


Can you please be more specific? And if you answer your own question in the same post you asked it in, please:

1. put an EDIT: or something like that in front, so this is obvious for others to see that you made a relevant change in your post
2. if you find a solution to a problem, please give some feedback here, so others can also benefit from that solution.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18016
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Previous

Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest