How do I setup FreeNAS to overwrite oldest file when HD full......

Status
Not open for further replies.

Super2

Cadet
Joined
Sep 27, 2015
Messages
5
Something that's been irritating me about FreeNAS is that I cannot figure out how to make it overwrite the oldest video files when the hard drive is full. I have a security camera system that I setup, and I use FreeNAS as my storage server OS to store the video files onto the hard drive. Every so often I have to delete some of the video files to make it accept data again from my cameras. That's really starting to get old very fast. So any ideas anyone?
 
Joined
Jan 9, 2015
Messages
430
Write a script to automatically remove they.
 
Joined
Jan 9, 2015
Messages
430
This should be configured with the camera software, not with FreeNAS.
Agreed, that would be the first line of defense.
 

Super2

Cadet
Joined
Sep 27, 2015
Messages
5
FreeNAS is very powerful with scripting capability. I just need the script example shown. Also, using camera software for a server that its only purpose is to store the video data, does not make sense to put camera software on it. FreeNAS should have the capability to overwrite the oldest file first when the hard drive is full.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
FreeNAS is very powerful with scripting capability. I just need the script example shown. Also, using camera software for a server that its only purpose is to store the video data, does not make sense to put camera software on it. FreeNAS should have the capability to overwrite the oldest file first when the hard drive is full.
This is such a small niche that it doesn't make sense to make it a part of freenas. Freenas is storage. First and foremost. I most certainly don't want it to delete my oldest files.

Script it or get your camera software to do it. Freenas is not intended with your camera software in mind.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I didn't say anything about putting the camera software on the server, I said to configure the camera software so that it automatically removes its oldest files when its storage reaches a certain threshold. If your camera software doesn't have that feature, it's woefully under-featured. I cannot strongly enough disagree that a NAS (or any sort of storage system) should automatically delete the oldest files when it gets full--that's a recipe for disaster.

No doubt you can hack this in with some sort of shell script, but that's really addressing the issue at the wrong place.
 
Joined
Jan 9, 2015
Messages
430
FreeNAS is very powerful with scripting capability. I just need the script example shown.
Just spent a few minutes Googling the 'find' command. You will see how it can find file before a date/time and delete them.
FreeNAS should have the capability to overwrite the oldest file first when the hard drive is full.
I disagree.
 
Last edited:

Super2

Cadet
Joined
Sep 27, 2015
Messages
5
Guess I'll Google search how to do it then since no one seems very helpful and simply think I need to do this or that instead..... Btw, my setup is two 6TB partitions of 6 2TB drives in raid 10. One partition is strictly for camera videos and other is for general data. I don't understand why people on here think I meant all my space....Sigh....Thanks for not helping me at all...:rolleyes:
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
Guess I'll Google search how to do it then since no one seems very helpful and simply think I need to do this or that instead..... Btw, my setup is two 6TB partitions of 6 2TB drives in raid 10. One partition is strictly for camera videos and other is for general data. I don't understand why people on here think I meant all my space....Sigh....Thanks for not helping me at all...:rolleyes:

Not helpful?

We told you exactly what you needed to do. Write up a script for it. This is not the responsibility of freenas to do this for you.

We don't think you meant all of your space but its pretty silly to think that it should be a function of the nas to handle something your camera software should.

This has NOTHING to do with freenas and everything to do with the software you are using.
 
Joined
Jan 9, 2015
Messages
430
I think pointing you in the right direction was being helpful. I'm not going to spoon feed you and write the script for you.

I don't think any of us believe that you want to delete all your files. You made it clear just old camera feeds.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
We are being helpful. We're telling you that what you want to do is a bad idea, and that there are better ways to do it. Does your camera software seriously not have an option to automatically delete old recordings?

Step back and think about this for a minute. You're suggesting that a storage device should decide on its own that some files are expendable, and delete them. Can you really not understand why this is, at least in a general case, a bad idea? And thus why FreeNAS doesn't (and, I'd wager, never will) have a checkbox option to do this for you?

If your camera software really is brain-dead enough that it can't manage its own storage, and for some reason you aren't interested in using more sensible software, shell scripts are your friend. There's nothing unique to FreeNAS in writing them, so any Unix scripting tutorials would be fine. Available scripting languages in the base install include csh, bash, and Python; I'm not sure if there are others as well. Once you've got the script written, you can set up a cron job to run it at whatever interval you want.
 

Super2

Cadet
Joined
Sep 27, 2015
Messages
5
Can I install open source camera software onto FreeNAS? I prefer not use my home computer for the software. MY server is secured away to where intruders will not find it if they break into my house. I'd like to keep it that way.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
Can I install open source camera software onto FreeNAS? I prefer not use my home computer for the software. MY server is secured away to where intruders will not find it if they break into my house. I'd like to keep it that way.
You might be able to install it in a jail if it supports freebsd.

How are you cameras recording now? Don't they require software to run?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Depends on the software. If you're thinking of Zoneminder, you can install it in a jail, or in a VirtualBox VM. Search here for some threads on it. If other software, it depends.
 

Super2

Cadet
Joined
Sep 27, 2015
Messages
5
My cameras have the capability to send video data over the FTP protocol. That is why my server was able to take in the data and store it as 254MB files. The cameras are Foscams F19805W. As long as the software can support video streams over FTP, then I can use it.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
There's a good chance that Zoneminder would work. I installed it under Ubuntu in a VirtualBox VM, since the available BSD port/package wasn't very current and the source wouldn't easily compile for me. It's a little rough around the edges, though, compared to what I understand some of the Windows-based software offers. If you were going to use a VM anyway, you could consider installing Windows in one and running the software that way.

Zoneminder definitely has the ability to delete old recordings to keep from filling up its storage.
 
Status
Not open for further replies.
Top