Delete Videos to reduce Disk Space Usage
Delete Videos to reduce Disk Space Usage
Good Day everyone, I know surely that my issue is not new and most probably it is my mistake but here is a summary of my issue.
I have Zoneminder installed on a Ubuntu 21 VM hosted on my Hyper-V server and configured correctly and was running smoothly for several months.
My Storage Location is on my Raid10 8 TB File Server.
Recently Noticed that only 400 GBs remain and I need to clear some space so I did a filter (As I saw in several guides) to clear events prior to one month and Theoretically it worked as Now I only have Events around 30 days.
But to my surprise the space is still reserved and the video storage folder is the same size only the events in the web GUI are not there.
Any Help would be highly appreciated.
I have Zoneminder installed on a Ubuntu 21 VM hosted on my Hyper-V server and configured correctly and was running smoothly for several months.
My Storage Location is on my Raid10 8 TB File Server.
Recently Noticed that only 400 GBs remain and I need to clear some space so I did a filter (As I saw in several guides) to clear events prior to one month and Theoretically it worked as Now I only have Events around 30 days.
But to my surprise the space is still reserved and the video storage folder is the same size only the events in the web GUI are not there.
Any Help would be highly appreciated.
-
- Posts: 1215
- Joined: Sat Aug 31, 2019 7:35 am
- Location: San Diego
Re: Delete Videos to reduce Disk Space Usage
The folder is a fixed size, like a disk or a bucket. Dump the bucket and get room for more.
If you just point zm to a disk it will use all of it.
You probably should make a partition on your system to dedicate to zm.
If you just point zm to a disk it will use all of it.
You probably should make a partition on your system to dedicate to zm.
Re: Delete Videos to reduce Disk Space Usage
How do I do that, it is a file share for a folder on my File server.
Can I just delete the folder?? will it be recreated again??
I highly appreciate your previous reply and would love some clarifications. Thanks.
Can I just delete the folder?? will it be recreated again??
I highly appreciate your previous reply and would love some clarifications. Thanks.
-
- Posts: 1215
- Joined: Sat Aug 31, 2019 7:35 am
- Location: San Diego
Re: Delete Videos to reduce Disk Space Usage
Not sure.
I think zm would make the folder you specify in "Storage". But you need to do whatever it takes in your file system to make zm "see" a limited space, so that probably means you should make the space and then point zm at that.
Good luck.
I think zm would make the folder you specify in "Storage". But you need to do whatever it takes in your file system to make zm "see" a limited space, so that probably means you should make the space and then point zm at that.
Good luck.
Re: Delete Videos to reduce Disk Space Usage
Thanks for the advice will try to figure out how to do that.
In the meantime, I still do not know how to clear that space. Could I just delete the folders?? Will they be recreated autoMagically??
Is there a specific setting / Filter I can set in which it can clear the videos and clear the space ??
Thanks to all who can advise me.
In the meantime, I still do not know how to clear that space. Could I just delete the folders?? Will they be recreated autoMagically??
Is there a specific setting / Filter I can set in which it can clear the videos and clear the space ??
Thanks to all who can advise me.
Re: Delete Videos to reduce Disk Space Usage
For whatever reason, I think I need to clarify.
I Made a filter to check all events older than 30 days and delete them. I did just that it deleted all events older than 30 days but did not clear the space thus the folder still holds 400 GBs of videos that are not linked to any event thus I do not know how to clear them manually unless I delete the whole folder (With all events old and recent.
If I did that will it recreate the folders again??
I Made a filter to check all events older than 30 days and delete them. I did just that it deleted all events older than 30 days but did not clear the space thus the folder still holds 400 GBs of videos that are not linked to any event thus I do not know how to clear them manually unless I delete the whole folder (With all events old and recent.
If I did that will it recreate the folders again??
-
- Posts: 1215
- Joined: Sat Aug 31, 2019 7:35 am
- Location: San Diego
Re: Delete Videos to reduce Disk Space Usage
run zmaudit.pl
It'll probably take awhile...or you could just checkmark RUN_AUDIT in Options->System toward the bottom of the page.
It'll probably take awhile...or you could just checkmark RUN_AUDIT in Options->System toward the bottom of the page.
Re: Delete Videos to reduce Disk Space Usage
You could blow the whole lot away, but a find/mtime/exec rm command would be nicer.
This will run an 'ls', for safety. Just run again with rm when happy with what it is about to remove.
Code: Select all
sudo find /your/zoneminder_location/ -type f -mtime +7 -execdir ls -la -- '{}' \;
-
Re: Delete Videos to reduce Disk Space Usage
Trying this right now and it is taking ages but looks like is working. will report back when it is done.dougmccrary wrote: ↑Mon Jan 24, 2022 11:13 pm run zmaudit.pl
It'll probably take awhile...or you could just checkmark RUN_AUDIT in Options->System toward the bottom of the page.
I did use the command line since doing it from the web GUI did not do anything.
Thanks.
Re: Delete Videos to reduce Disk Space Usage
Thanks for your reply.Magic919 wrote: ↑Tue Jan 25, 2022 8:17 am You could blow the whole lot away, but a find/mtime/exec rm command would be nicer.
This will run an 'ls', for safety. Just run again with rm when happy with what it is about to remove.Code: Select all
sudo find /your/zoneminder_location/ -type f -mtime +7 -execdir ls -la -- '{}' \;
I do not understand what Is needed to do and what will the outcome be.
Thanks again for your reply and if you clarified I would highly appreciate it.
Re: Delete Videos to reduce Disk Space Usage
I have been running the command "zmaudit.pl" for several days now and although from the looks of it it is finding and deleting unlinked files and seems a huge TON still I see no reduction in utilized space, in fact, I am noticing a continuous increase of utilized space.dougmccrary wrote: ↑Mon Jan 24, 2022 11:13 pm run zmaudit.pl
It'll probably take awhile...or you could just checkmark RUN_AUDIT in Options->System toward the bottom of the page.
I will wait a bit more maybe if it is finished I will find a nice surprise.
-
- Posts: 1215
- Joined: Sat Aug 31, 2019 7:35 am
- Location: San Diego
Re: Delete Videos to reduce Disk Space Usage
Yeah, it is kinda slow, but there's a lot of stuff to do, especially in your case.
I need to clarify something that I said earlier that no doubt explains that the usage you're looking at keeps increasing... See where it says DiskSpace? ZM considers it owns all of that. It never really frees space, just overwrites it when it's not using it. The first number is what zm is not using at the moment.
You need to somehow create some limited space on your filesystem, as zm will use all of it. Normally, that would be a disk partition, sorry I don't know how that is done on your system.
I need to clarify something that I said earlier that no doubt explains that the usage you're looking at keeps increasing... See where it says DiskSpace? ZM considers it owns all of that. It never really frees space, just overwrites it when it's not using it. The first number is what zm is not using at the moment.
You need to somehow create some limited space on your filesystem, as zm will use all of it. Normally, that would be a disk partition, sorry I don't know how that is done on your system.
Re: Delete Videos to reduce Disk Space Usage
Just as a follow up I ended up deleting the Camera Folders while ZoneMinder VM Was Turned Off and ZoneMinder recreated them again.
Setup my Filters to auto-delete anything older than 35 days. (End Date Less than or equal -35 day
Lots hope that this works and will report later if it worked or not.
Setup my Filters to auto-delete anything older than 35 days. (End Date Less than or equal -35 day
Lots hope that this works and will report later if it worked or not.
-
- Posts: 1215
- Joined: Sat Aug 31, 2019 7:35 am
- Location: San Diego
Re: Delete Videos to reduce Disk Space Usage
See ya in a month or so.
I hope that works for you.
I hope that works for you.