Hi everyone
I’m here to ask for help.
I state that I am not very familiar with ubuntu but I am learning.
Hardware :
-Pentium G5400
-Asus PRIME H310M-C/CSM
-8Gb RAM
-SSD for boot and program
-HDD 2TB for data
-Intel EXPI9301CT for extra ethernet
-4x IPCAM020B from comelit
Software :
-Ubuntu 19.04
-Gnome 3.32.1
-Zoneminder 1.32.3
5 years ago i bought a NVR system with 4 cameras, recently the NVR recorder stop working. Because i have a pc that i don’t use, i add few part to it and i decide to use that like NVR.
I install Ubuntu, after that i install Zoneminder using the official guide following step by step the instruction.
In a day i figured out how to properly connect and view camera on Zoneminder and now it works fine; the program show correctly all four camera and the motions detect works great.
Now the next step is to save the data on the 2tb hdd, with have 2 partition one of 15 gb for the motion detect, and the remaining space for continuous record.
The 15 gb partition in sync with google drive to store on cloud the data, so if someone get in my house and steal the pc the events from motion detect are also on the cloud so I can get them from there.
/dev/sdb1 /media/nvr/DATA 2TB-15gb for continuous records
/dev/sdb2 /media/nvr/Cloud 15gb for motion detects events
All partition are ext4.
I try to follow the instruction of the official guide to set the new storage but it doesn’t work.
I follow the guide for both partition
sudo chown -R ww-data:ww-data /dev/sdb1
same for the second partition
and i add a file .conf in etc/zm/conf.d call myconf.conf which contain
ZM_DIR_EVENTS = /media/nvr/DATA
ZM_DIR_EVENTS = /media/nvr/Cloud
In Option -> Storage I set :
Name : Cloud
Path : /media/nvr/Cloud
Url :
Server : Remote/no specific server
Type : Local
Scheme : midium
StorageDoDelete : Yes
and the same for the other partition (with different path and name but with the same scheme)
In Option -> Storage diskspace say 0B of 0B so i think there is something wrong…
also in the Log there are 2 warning and 1 error for each partition :
ERR :
web_php
Path media/nvr/DATA does not exist
/user/share/zoneminder/www/index.php
WAR :
web_php
Cannot write to content dire (‘media/nvr/DATA; media/nvr/DATA’). check that these exist and are owned by the way account user
/user/share/zoneminder/www/index.php
WAR :
web_php
Storage::disk_usage_percent: path ‘media/nvr/DATA does not exist.
/user/share/zoneminder/www/index.php
The only think i sure is the existence of the path because if i put the path on the terminal it work.
I think the problem is the second part of “check that these exist and are owned by the way account user”.
But i don know i to figured out.
Someone have same ideas ?
Thanks
Problem adding storage
UPDATE
i change the storage settings
In Option -> Storage I set :
Name : Cloud
Path : /media/nvr
Url :
Server : Remote/no specific server
Type : Local
Scheme : midium
StorageDoDelete : Yes
and now show the disk space, but is wrong for both partition show 218gb of space and 10% usage...
In Option -> Storage I set :
Name : Cloud
Path : /media/nvr
Url :
Server : Remote/no specific server
Type : Local
Scheme : midium
StorageDoDelete : Yes
and now show the disk space, but is wrong for both partition show 218gb of space and 10% usage...
Re: Problem adding storage
Sounds a bit like this is an Ubuntu problem, not a ZM issue. If I remember correctly 2tb drives come out to be about 1.81tb usable. So with one 15gb partition (events) you should have roughly 1,795gb left (free).
The very first thing I'd suggest is that you run a LTS version of Ubuntu. Disco is not a LTS release and has an EOL date of January 2020 (in four months). Running Bionic will get you out to April 2023 and EOL of April 2028. It'll be much more stable and supported. In production environments most people I know won't upgrade to the current LTS until at least .1 or usually .2. That means they released 18.04 LTS then 18.04.1, then 18.04.2 and currently on 18.04.3. Most people stayed on Xenial (16LTS) until Bionic .1 or .2 release just to make sure all the bugs were worked out and usually by then there's plenty of community/forum support for the OS.
How did you install ZM? This is what I did: https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way It was extremely easy and straightforward. I typically don't like to access web pages from the machine hosting them but that's totally up to you.
Sounds like you maybe didn't mount the devices? Or maybe they are mounted but as root so now you don't have permissions to access them?
What do you see when you type
Also, to get into a terminal you can use the Ctrl+Alt+T shortcut. Just hit the control key, alt key and the letter T and terminal window will pop up.
Here's a good link to explain it:
https://askubuntu.com/questions/986079/ ... ount-point
Basically your /dev/sda and dev/sdb are hard drives then the sdb1 and sdb2 are partitions on the dev/sdb hard drive (device). Even though you have created the partitions (sdb1 & sdb2) now you need to associate a folder or directory structure to it. (read that link, I'm terrible at explaining). Basically you are going to need to create the folders:
After you create the folders within /media/nvr then mount them:
Then if you type you should see something like /dev/sdb1 >>>> size >>> used >>> avail >>> percent >>> mount points. The "-h" part is to make it human readable. It puts M for megabytes and G & T vs. listing the number of blocks. If the partitions are mounted you'll see them clearly (and their sizes) using df -h.
The thing that shows 218gb space and 10% use... Did you use a 256gb SSD for your /dev/sda? (did you install ubuntu and ZM onto a 256gb ssd?) It's probably showing the percent used/free on your SSD. I'd guess because you haven't properly mounted your sdb1 & 2 properly.
Also, Ubuntu is specific with character capitalization. It's fine to name a storage location within ZM differently than the actual folder's name. Just remember if you make the /media/nvr/DATA all caps for DATA, all lowercase for "nvr" and then "Cloud" for cloud folder, you can't mess that up or it won't work. When you add storage within ZM web GUI you can call "Cloud" "car" or "truck" and ZM isn't going to care --it's just a dropdown storage location name for the admins to keep track. But within Ubuntu when you are doing your mount points and within ZM pointing to folder/directory paths, you are going to need to make sure all upper/lower case letters match exactly.
I don't know how many cameras you have or how often you'll be recording... I came here to search around for settings and tweaks because my ZM is recording almost constantly and I'm filling up discs like crazy. Orders of magnitude, I have two cameras and I'm recording a couple hundred gigs a day. I need to tweak something to make that a little more manageable. (or start buying hard drives by the case from the manufacturer) If you are using 15gb folders/partitions you may fill them up quickly.
Hope that helps.
The very first thing I'd suggest is that you run a LTS version of Ubuntu. Disco is not a LTS release and has an EOL date of January 2020 (in four months). Running Bionic will get you out to April 2023 and EOL of April 2028. It'll be much more stable and supported. In production environments most people I know won't upgrade to the current LTS until at least .1 or usually .2. That means they released 18.04 LTS then 18.04.1, then 18.04.2 and currently on 18.04.3. Most people stayed on Xenial (16LTS) until Bionic .1 or .2 release just to make sure all the bugs were worked out and usually by then there's plenty of community/forum support for the OS.
How did you install ZM? This is what I did: https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way It was extremely easy and straightforward. I typically don't like to access web pages from the machine hosting them but that's totally up to you.
Sounds like you maybe didn't mount the devices? Or maybe they are mounted but as root so now you don't have permissions to access them?
What do you see when you type
Code: Select all
df -h
Here's a good link to explain it:
https://askubuntu.com/questions/986079/ ... ount-point
Basically your /dev/sda and dev/sdb are hard drives then the sdb1 and sdb2 are partitions on the dev/sdb hard drive (device). Even though you have created the partitions (sdb1 & sdb2) now you need to associate a folder or directory structure to it. (read that link, I'm terrible at explaining). Basically you are going to need to create the folders:
Code: Select all
sudo mkdir /media/nvr
sudo mkdir /media/nvr/DATA
sudo mkdir /media/nvr/Cloud
Code: Select all
sudo mount /dev/sdb1 /media/nvr/DATA
sudo mount /dev/sdb2 /media/nvr/Cloud
Then if you type
Code: Select all
df -h
The thing that shows 218gb space and 10% use... Did you use a 256gb SSD for your /dev/sda? (did you install ubuntu and ZM onto a 256gb ssd?) It's probably showing the percent used/free on your SSD. I'd guess because you haven't properly mounted your sdb1 & 2 properly.
Also, Ubuntu is specific with character capitalization. It's fine to name a storage location within ZM differently than the actual folder's name. Just remember if you make the /media/nvr/DATA all caps for DATA, all lowercase for "nvr" and then "Cloud" for cloud folder, you can't mess that up or it won't work. When you add storage within ZM web GUI you can call "Cloud" "car" or "truck" and ZM isn't going to care --it's just a dropdown storage location name for the admins to keep track. But within Ubuntu when you are doing your mount points and within ZM pointing to folder/directory paths, you are going to need to make sure all upper/lower case letters match exactly.
I don't know how many cameras you have or how often you'll be recording... I came here to search around for settings and tweaks because my ZM is recording almost constantly and I'm filling up discs like crazy. Orders of magnitude, I have two cameras and I'm recording a couple hundred gigs a day. I need to tweak something to make that a little more manageable. (or start buying hard drives by the case from the manufacturer) If you are using 15gb folders/partitions you may fill them up quickly.
Hope that helps.
Re: Problem adding storage
Hijacking this thread, but the solution to this problem is H264 encoding and H264 Passthrough.winstontj wrote: ↑Mon Sep 09, 2019 3:56 pm I don't know how many cameras you have or how often you'll be recording... I came here to search around for settings and tweaks because my ZM is recording almost constantly and I'm filling up discs like crazy. Orders of magnitude, I have two cameras and I'm recording a couple hundred gigs a day. I need to tweak something to make that a little more manageable. (or start buying hard drives by the case from the manufacturer) If you are using 15gb folders/partitions you may fill them up quickly.
Re: Problem adding storage
Thank you so much for both of you, now i try and post what you suggest me to do.
by the way i have 4 cameras each recording at 1080p but the 15gb space is only for motion detect events, so i hope the space is enough for store some day (4-5 day) i don't need more because if i need e motion detect events i take it from the cloud immediately
thank you again, and sorry if i reply with some day of delay, today i try what you say
by the way i have 4 cameras each recording at 1080p but the 15gb space is only for motion detect events, so i hope the space is enough for store some day (4-5 day) i don't need more because if i need e motion detect events i take it from the cloud immediately
thank you again, and sorry if i reply with some day of delay, today i try what you say