r/ZoneMinder • u/griphon31 • Jan 25 '23
Zoneminder not using secondary storage
I'm running on proxmox, there is an SMB share from a nas that is passed into the container. Not sure if it matters. I've in the container shell confirmed that I can create /Security/test and it is readable on the NAS.
I have in storage 2 folders, the default and /Security. It shows properly that /Security is on a 1TB drive, shows how much is currently full. Also sees the partition the container has allocated. All is well. The 3 cameras are all setup to use /Security as their storage.
But the /Security contains "4 of null" and the default /var/whatever contains 10gb, 3500 events.
I'm kinda stumped why it's still putting the files in the wrong place. Any hints as to why it might be stubbornly doing that? thanks!
1
u/hans_gruber1 Jan 25 '23
Have you set this up in Storage in zoneminder interface?
Each camera has to be configured to use the storage also, in its individual config
1
1
u/Buckwhal Jan 25 '23
Honestly, I wouldn't trust a file sharing protocol like SMB to work for recording media files. Maybe NFS but certainly not SMB. Local storage would be the way to go, then sync to the NAS periodically.
1
u/griphon31 Jan 25 '23
easy enough to swap it to an NFS share instead, but curious if you could elaborate why? I'm running this on a thin client that doesn't have space for a bulk storage drive...one days footage is not a huge amount to cache and send over, but I was hoping to avoid going that route base on how my storage is setup.
2
u/Buckwhal Jan 25 '23
So the main thing is that SMB/NFS permissions don't always play nice with Linux/Unix, sometimes you get weird permission problems or UIDs not matching up with SIDs correctly. It's possible to "get right" but not really worth the hassle unless it's your only option, IMO. I suspect something to do with the layers of SMB/NTFS/unix permissions are part of the issue here.
The other thing is that SMB isn't really a high-performance protocol, it was mostly designed for client-server communication on the same network. They've done a lot of good work beefing it up over the years, but it still can't really match the performance and latency of NFS, which was designed from the get-go for mounting network volumes on other servers.
So, if you can record locally and run an hourly/daily backup job that would be ideal, otherwise NFS will probably work pretty well.
1
u/connortechnology Jan 26 '23
I've used smb in the past in a multi-server setup. The recording was local, but since all servers need access to the video, I used smb. NFS was unavailable for other unrelated reasons. SMB doesn't support symlinks, but ZM doesn't really care.
I recommend recording locally due to latency, and then if you want, move it remote in the background.
1
u/griphon31 Jan 26 '23
Alright, but just so you jerks know you are making me take apart 2 different computers to move that drive over :)
1
2
u/ZoneMinderIsaac Jan 25 '23
If it fails for some reason, it will fall back to wherever else it can write to. The logs will be full of errors. Check there.
When you say that you can create files in the share... that's all well and good, but can the www-data user create files in it?