Disk Space Usage Higher Than Reported in ZoneMinder
Disk Space Usage Higher Than Reported in ZoneMinder
Hello,
I’m encountering an issue with my ZoneMinder setup where the disk usage for events appears to be higher than what’s reported in the web interface. The events are stored on a separate disk, but ZoneMinder shows less space usage compared to the actual usage on the disk (which is 10TB in total).
Here’s the situation:
I’ve noticed that the disk usage shown in ZoneMinder’s web interface is lower than what the disk is actually using.
I’m concerned that deleted images, events, or other files might still be taking up space, or that there’s an issue with how ZoneMinder handles disk space.
I’d appreciate any insights on how to better manage disk space and troubleshoot this issue.
Thanks in advance for your help!
I’m encountering an issue with my ZoneMinder setup where the disk usage for events appears to be higher than what’s reported in the web interface. The events are stored on a separate disk, but ZoneMinder shows less space usage compared to the actual usage on the disk (which is 10TB in total).
Here’s the situation:
I’ve noticed that the disk usage shown in ZoneMinder’s web interface is lower than what the disk is actually using.
I’m concerned that deleted images, events, or other files might still be taking up space, or that there’s an issue with how ZoneMinder handles disk space.
I’d appreciate any insights on how to better manage disk space and troubleshoot this issue.
Thanks in advance for your help!
-
- Posts: 1370
- Joined: Sat Aug 31, 2019 7:35 am
- Location: San Diego
Re: Disk Space Usage Higher Than Reported in ZoneMinder
Probably system-reserved space. Default is 5%.
See tune2fs command.
See tune2fs command.
Re: Disk Space Usage Higher Than Reported in ZoneMinder
Currently, the total size of all events displayed in the ZoneMinder web interface is 5.05TB (even less than what I originally shared in my screenshot). However, the disk I allocated for ZoneMinder is 10TB in total.dougmccrary wrote: ↑Sat Feb 22, 2025 9:13 pm Probably system-reserved space. Default is 5%.
See tune2fs command.
Even if the system reserves 5% of the space, that would account for around 512GB, but my disk usage is currently showing 8.9TB full. This still doesn’t explain the large discrepancy between the reported event size and the actual disk usage.
Zoneminder web gui says something else

-
- Posts: 1370
- Joined: Sat Aug 31, 2019 7:35 am
- Location: San Diego
Re: Disk Space Usage Higher Than Reported in ZoneMinder
What do your filters look like?Currently, the total size of all events displayed in the ZoneMinder web interface is 5.05TB (even less than what I originally shared in my screenshot). However, the disk I allocated for ZoneMinder is 10TB in total.
According to what?but my disk usage is currently showing 8.9TB full.
There's a bit of overhead in the filesystem directories - how much depends on how you formatted and what storage scheme you're on.
Re: Disk Space Usage Higher Than Reported in ZoneMinder
I'm not exactly sure where or how I should be looking, as I am not an expert in system administration.
The only data I have is as follows:
There are no other files in the /storage directory except for ZoneMinder camera recordings.
The total size of the /storage directory is 8.9TB.
However, when I check ZoneMinder's web interface, the total size of all camera footage I can see is 5TB.
Recordings older than 3 months are deleted, and normally, I would keep recordings for up to 6 months.
Additionally, I had manually deleted footage from a few cameras via the web interface earlier. It was around 3-4TB in size. I’m wondering if it might not have been fully deleted from the disk. However, when I checked the size of the directories for the cameras whose footage I deleted in the /storage directory, they show as 4.0K, meaning there’s no footage left.
The only data I have is as follows:
There are no other files in the /storage directory except for ZoneMinder camera recordings.
The total size of the /storage directory is 8.9TB.
However, when I check ZoneMinder's web interface, the total size of all camera footage I can see is 5TB.
Recordings older than 3 months are deleted, and normally, I would keep recordings for up to 6 months.
Additionally, I had manually deleted footage from a few cameras via the web interface earlier. It was around 3-4TB in size. I’m wondering if it might not have been fully deleted from the disk. However, when I checked the size of the directories for the cameras whose footage I deleted in the /storage directory, they show as 4.0K, meaning there’s no footage left.
Re: Disk Space Usage Higher Than Reported in ZoneMinder
To me it sounds like you have orphaned files somewhere. Scan the drive for files older than 3 months (the point you state video is being deleted) and see what shows up.
The other possibility, though unlikely, is you are using a very large block size and the missing space is slack in the blocks.
The other possibility, though unlikely, is you are using a very large block size and the missing space is slack in the blocks.
Andy
o||||o
Ubuntu 22.04
ZM 1.36.33
E5-1650-v4 Xeon
16 GB RAM
6 cameras -> 54 FPS modect
o||||o
Ubuntu 22.04
ZM 1.36.33
E5-1650-v4 Xeon
16 GB RAM
6 cameras -> 54 FPS modect
Re: Disk Space Usage Higher Than Reported in ZoneMinder
I found it!
I listed the files inside my /storage directory and noticed an ID that does not match any of my existing cameras. When I checked its size specifically, I found that it was taking up 4TB of space. After downloading and inspecting the contents (JPEG files), I realized that the camera footage belonged to a test camera, which I believe one of my colleagues set up but forgot to remove.
However, I cannot see this camera in the ZoneMinder web interface, and there is only one user account. How can I delete this camera and its recordings? Should I remove it from the database directly?
I listed the files inside my /storage directory and noticed an ID that does not match any of my existing cameras. When I checked its size specifically, I found that it was taking up 4TB of space. After downloading and inspecting the contents (JPEG files), I realized that the camera footage belonged to a test camera, which I believe one of my colleagues set up but forgot to remove.
However, I cannot see this camera in the ZoneMinder web interface, and there is only one user account. How can I delete this camera and its recordings? Should I remove it from the database directly?
- Attachments
-
- test-camera.png (45.03 KiB) Viewed 7813 times
Re: Disk Space Usage Higher Than Reported in ZoneMinder
Issue Report: Orphaned Camera in ZoneMinder
Description: I encountered an issue where ZoneMinder was still recording video from a camera that wasn't listed in the web interface or database. Despite the camera not being visible in ZoneMinder, I found its files in the /storage/65 directory, which were consuming about 3.8TB of disk space.
Investigation:
I checked the ZoneMinder database and found no record of the camera with ID 65 (SELECT * FROM Monitors WHERE Id=65; returned an empty set).
I found the camera's recording process still running using the command: ps aux | grep 'zmc -m 65', which indicated that it was actively recording.
After identifying the process, I stopped it to prevent further recording.
Conclusion: The camera was orphaned, meaning it existed as a recording source but had no corresponding entry in the ZoneMinder database. The recording process continued, but since it wasn’t listed in the database, it was effectively a "ghost" camera.
Description: I encountered an issue where ZoneMinder was still recording video from a camera that wasn't listed in the web interface or database. Despite the camera not being visible in ZoneMinder, I found its files in the /storage/65 directory, which were consuming about 3.8TB of disk space.
Investigation:
I checked the ZoneMinder database and found no record of the camera with ID 65 (SELECT * FROM Monitors WHERE Id=65; returned an empty set).
I found the camera's recording process still running using the command: ps aux | grep 'zmc -m 65', which indicated that it was actively recording.
After identifying the process, I stopped it to prevent further recording.
Conclusion: The camera was orphaned, meaning it existed as a recording source but had no corresponding entry in the ZoneMinder database. The recording process continued, but since it wasn’t listed in the database, it was effectively a "ghost" camera.
-
- Posts: 1370
- Joined: Sat Aug 31, 2019 7:35 am
- Location: San Diego
Re: Disk Space Usage Higher Than Reported in ZoneMinder
Did that kill it permanently, after a restart/reboot?I stopped it to prevent further recording.
You could run sudo zmaudit.pl
to check the entire disk for orphans, in case there are more somewhere.
Re: Disk Space Usage Higher Than Reported in ZoneMinder
I haven't tried restarting the system yet because this device is in a datacenter, and I avoid rebooting it unless it's absolutely necessary. However, I plan to migrate ZoneMinder to a more powerful server soon due to my need for object detection and additional storage space.dougmccrary wrote: ↑Tue Feb 25, 2025 1:25 amDid that kill it permanently, after a restart/reboot?I stopped it to prevent further recording.
You could run sudo zmaudit.pl
to check the entire disk for orphans, in case there are more somewhere.
For now, I have concerns about running the zmaudit.pl command because if it deletes recordings that I actually need, I could face legal issues. Instead, I have manually and carefully inspected my /storage directory. Other than the orphaned camera I identified, there are no additional orphaned recordings.
Re: Disk Space Usage Higher Than Reported in ZoneMinder
Object detection seems very complex to me, and I think I'll need to ask for help with that separately. 
