Cannot Save Images New Installation Woes

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
retirementhome
Posts: 4
Joined: Wed Aug 26, 2020 6:34 pm

Cannot Save Images New Installation Woes

Post by retirementhome » Wed Aug 26, 2020 9:05 pm

I have a new install, and am perfectly okay starting all over if need be. Here is what I have:

I installed via the ZoneMinder Wiki for Buster.

Processor(s)

Code: Select all

:/$ more /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 62
model name      : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping        : 4
microcode       : 0x415
cpu MHz         : 2594.018
cache size      : 20480 KB
physical id     : 0
siblings        : 16
core id         : 0
cpu cores       : 8
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_p
erfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_dea
dline_timer aes xsave avx f16c rdrand lahf_lm cpuid_fault epb pti intel_ppin tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
bogomips        : 5187.51
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:
Memory

Code: Select all

:/$ cat /proc/meminfo
MemTotal:       396227284 kB
MemFree:        390231076 kB
MemAvailable:   391546776 kB
Buffers:           91780 kB
Cached:          4203864 kB
SwapCached:            0 kB
Active:          1143976 kB
Inactive:        3993676 kB
Active(anon):     846808 kB
Inactive(anon):   924892 kB
Active(file):     297168 kB
Inactive(file):  3068784 kB
Unevictable:          96 kB
Mlocked:              96 kB
SwapTotal:      402616316 kB
SwapFree:       402616316 kB
Dirty:                68 kB
Writeback:             0 kB
AnonPages:        841216 kB
Mapped:           993828 kB
Shmem:            929684 kB
Slab:             374616 kB
SReclaimable:     192056 kB
SUnreclaim:       182560 kB
KernelStack:        7152 kB
PageTables:        10116 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    600729956 kB
Committed_AS:    2845788 kB
VmallocTotal:   34359738367 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
Percpu:            22272 kB
HardwareCorrupted:     0 kB
AnonHugePages:    686080 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:               0 kB
DirectMap4k:      196268 kB
DirectMap2M:     7108608 kB
DirectMap1G:    395313152 kB
Storage

Code: Select all

:/$ df -h
Filesystem                     Size  Used Avail Use% Mounted on
udev                           189G     0  189G   0% /dev
tmpfs                           38G   34M   38G   1% /run
/dev/mapper/corundum--vg-root   23G  1.5G   21G   7% /
tmpfs                          189G  871M  189G   1% /dev/shm
tmpfs                          5.0M     0  5.0M   0% /run/lock
tmpfs                          189G     0  189G   0% /sys/fs/cgroup
/dev/mapper/corundum--vg-var   9.2G  7.8G  880M  91% /var
/dev/mapper/corundum--vg-tmp   1.8G  5.7M  1.7G   1% /tmp
/dev/mapper/corundum--vg-home  504G   73M  479G   1% /home
tmpfs                           38G     0   38G   0% /run/user/1000
/dev/sdb1                      3.3T   89M  3.1T   1% /mnt/storage

Code: Select all

:/mnt$ ls -al
total 12
drwxr-xr-x  3 root     root     4096 Aug  7 14:34 .
drwxr-xr-x 18 root     root     4096 Aug 12 09:29 ..
drwxr-xr-x  7 www-data www-data 4096 Aug 26 13:49 storage
My Intention:
  • I want ZM to store all video in /mnt/storage/
  • I want to ZM to automatically overwrite the oldest files when /mnt/storage/ is full.
  • I want ZM to record only on motion detect at as high quality as my cameras can output, with audio, and with for 1 minute before the motion detect and 1 minute after motion detect.
Situation

Currently, I get all kinds of errors at various times related to write failures. I believe ZM does not know how to handle itself. I say this because if ZM asks me for a storage location in Options :: Storage, then once I create an entry, for me "/mnt/storage/", then ZM should be intelligent enough to handle the rest of the process, to include establishing and maintaining symbolic links for new monitors, et cetera.

Here are some errors taken from ZM's logs:

Can't open /mnt/storage/4/20/08/26/13/17/04/00011-capture.jpg for writing: No such file or directory

Failed to write frame image

Can't open /mnt/storage/3/20/08/26/13/41/38/00231-capture.jpg for writing: No such file or directory

DiskSpace: Event does not exist at /mnt/storage/3/20/08/26/13/41/38:ZoneMinder::Event: AlarmFrames => 66 AvgScore => 6 Cause => Motion EndTime => 2020-08-26 13:41:47 Frames => 261 Height => 1080 Id => 810 Length => 9.41 MaxScore => 13 MonitorId => 3 Name => Event- 810 Notes => Motion: All Orientation => ROTATE_0 SaveJPEGs => 3 Scheme => Deep StartTime => 2020-08-26 13:41:38 StateId => 1 StorageId => 2 TotScore => 443 Width => 1920

Socket /var/run/zm/zms-439280s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/lat ... window-etc for more information.


ANY assistance to reach my Intentions would be appreciated!

bbunge
Posts: 2704
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Cannot Save Images New Installation Woes

Post by bbunge » Fri Aug 28, 2020 2:43 pm

Looks like you have a PC with two hard drives. Not a problem!
While I usually do Ubuntu a Debian Buster should be pretty much the same.
You can change your existing to do the same as the below...
When you set up the OS, with both drives in the PC, Format SDA for the OS and mount as "/" Format SDB and mount as "/zmstore" Doing this at install will make things easier for you down the road.
Install Zoneminder per the WIKI.
Create a directory in zmstore: mkdir /zmstore/events
Change ownership chown www-data /zmstore/events
Change permissions chmod 755 /zmstore/events
(think I have the above correct as I usually do this via Webmin)
Back to the Zoneminder Console
Options - Storage - Add New Storage
Name zmstore
Path /zmstore/events
Next you will need a filter to delete events
Filters
Create another PurgeWhenFull filter
Archive Status equal to unarchived only
and Disk Percent equal to or greater than 95
and Storage Area equal to zmstore
Delete all matches

That should work.

When you set up a camera make sure you choose zmstore as the Storage Area and I recommend using the video writer and disabling the JPEG

retirementhome
Posts: 4
Joined: Wed Aug 26, 2020 6:34 pm

Re: Cannot Save Images New Installation Woes

Post by retirementhome » Wed Sep 02, 2020 4:30 pm

Thank you for the response!

I did not get to this as fast as I wanted, but I was able to follow your instructions today. So far, it seems to be working very well! I have only added two or three cameras as tests, and they have only been live for a few minutes, but I will check on them throughout the night. I am hopeful all will be well.

Again, thank you very much for your timely and insightful response!

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests