You are not logged in.

#1 2010-05-18 15:04:44

tommed
Member
From: Berkshire, Engalnd
Registered: 2009-06-10
Posts: 54
Website

Filesystem which overwrites itself?

Hi Guys,

I have an IP camera which I want to write the stream to disk all the time.

The obvious issue with this is that the disk will obvious become full after a while.

I could write a daemon to clear-up the older files when disk space becomes low; but I was wondering if there was a file system available that would automatically write newer files over older files? Sounds like a bit of a niche, I know, but thought there might be something out there...?

Thanks!

Offline

#2 2010-05-18 16:13:54

Bralkein
Member
Registered: 2004-10-26
Posts: 354

Re: Filesystem which overwrites itself?

I've never heard of a filesystem that does that, but it should be easy to manage by using instead a cron job to clear things up. If the camera delivers data at a constant rate you could figure out how much data you need to delete every hour or every day and just sling a tiny shell script in /etc/cron.hourly or /etc/cron.daily to take care of things. I reckon it would take about 10 minutes to set up. If you haven't decided already I would advise putting the camera data on another file system whatever you're doing, just so that your whole disk doesn't get eaten if something goes wrong. I did something similar to this before and it turns out computers start behaving badly when they're all full up!

Good luck with your camera, if you spy anything interesting with it please remember to upload and post links wink

PS. Hello from Reading!

Offline

#3 2010-05-18 16:22:21

tommed
Member
From: Berkshire, Engalnd
Registered: 2009-06-10
Posts: 54
Website

Re: Filesystem which overwrites itself?

Thanks Bralkein,

And hello from Newbury! Blimey, it is a small world! I was just chatting to the manager of the Reading Jazz Café (in the Madeski stadium) on Twitter!! (They have a comedy club on this Wednesday)

I am happy to do it programmatic-ally (either cron or a daemon) as I need my own daemon on this box anyway, just wondered if there was a fs that does this, as there must be a requirement for one in other sectors!!

Not spying on anything myself, it's bespoke software for a security firm. So unfortunately, no dodgy picks available for sharing! wink

I was planning on rolling the stream to different date-named files every day (3gp codec, so very small file data), so clearing out old video footage would be very simple to do. But a filesystem that did it for me would be a more elegant solution (i believe)

Offline

#4 2010-05-18 16:50:50

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: Filesystem which overwrites itself?

Make your own filesystem. FUSE to the rescue!

(Hello from Ganymede, puny Earthlings.)


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#5 2010-05-18 17:30:27

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Filesystem which overwrites itself?

I don't believe such a beast exists, as I reckon you would run into so many problems trying to design such a file system, and what problem would it solve actually?


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#6 2010-05-18 20:41:32

briest
Member
From: Katowice, PL
Registered: 2006-05-04
Posts: 468

Re: Filesystem which overwrites itself?

This is the very solution used by inn to keep news spool: cycbuf (cyclic buffer). I have never seen this idea implemented in a standard-accessible filesystem, though.

Offline

#7 2010-05-19 07:14:14

Blue Peppers
Member
From: Newbury, UK
Registered: 2009-02-01
Posts: 178

Re: Filesystem which overwrites itself?

tommed wrote:

And hello from Newbury! Blimey, it is a small world!

Hello from Newbury as well! Very small world indeed...


Consistency is not a virtue.

Offline

#8 2010-08-02 15:53:34

tommed
Member
From: Berkshire, Engalnd
Registered: 2009-06-10
Posts: 54
Website

Re: Filesystem which overwrites itself?

Wow @BluePeppers! Another member and we'll have to start a Newbury Arch forum! Ha ha ha!

Offline

#9 2010-08-02 17:03:36

diegonc
Member
Registered: 2008-12-13
Posts: 42

Re: Filesystem which overwrites itself?

I guess this is what you are after:
http://en.wikipedia.org/wiki/Log-structured_file_system

Offline

#10 2010-08-02 18:02:50

marfig
Member
From: Portugal
Registered: 2010-07-30
Posts: 189
Website

Re: Filesystem which overwrites itself?

Still a newb, so apologies in advance if this answer misses the mark entirely.
...

Arch includes already on the Core repository the logrotate tool. It's most probably already installed in your machine since it's a part of Base and is also probably already running (/etc/cron.daily/). There's a stub wiki entry for it. But configuration is easy enough. I think you could adapt it easily to deal with your problem.

EDIT: Just now noticed this thread had been dug from the grave. In any case, here's my post for completion.

Last edited by marfig (2010-08-02 18:05:32)


I probably made this post longer than it should only because I lack the time to make it shorter.
- Paraphrased from Blaise Pascal

Offline

#11 2024-03-05 22:08:37

Automath
Member
Registered: 2016-05-16
Posts: 115

Re: Filesystem which overwrites itself?

A wiped disk kinda works like that as inodes get overwritten but data remain on disk. Not a good implementation, nor sure if functional at all, but works kinda that way.
Anyway you have to wipe the drive anytime it gets full so its the same.

Offline

#12 2024-03-05 23:16:33

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,620

Re: Filesystem which overwrites itself?

You're necroing a 14 year old thread...

https://wiki.archlinux.org/title/Genera … bumping%22

Closing.

Offline

Board footer

Powered by FluxBB