[mythtv] Re: New idea for storing recordings to disks
brandon+myth at linuxis.us
Fri Jul 1 12:21:17 EDT 2005
On Thu, Jun 30, 2005 at 06:55:09PM +1000, David Whyte wrote:
> > Simple solution: If the recorder runs out of space, the recorder exits.
> > Scheduler sees the recorder exited, attempts to restart it. The
> > recorder code checks the mount points for space, sees none free on
> > option one, tries option two. Just like when you restart the backend in
> > the midst of a recording, you end up with two partial recordings of the
> > same show, both viewable.
> Ewwww!!! I don't have a better solution, but that doesn't look cool at all.
> I think the better version of your idea however would be
> round-robbin'. First recording, the disk with most space, second
> recording, the disk now with most space, and so on.
> Dave - the linux virgin who has been dreading buying a new disk
> because of having to configure LVM and likes the sound of some of
> these proposal.
I've been thinking about an easy way to do multiple disks and this is my
thought, it's pretty simple...
1) Specify a location where the file is stored to while recording. (Likely
the same disk as the live-tv buffer location...)
2) If while recording, if the record directory disk gets close to the
"full" limit, run the code to delete a program. This will either free
up space on the recording drive, or another drive. If it's on the
recording drive then we have space to record and we're done.
3) If the oldest show to be removed is on another disk, we do a
little calculation. We look at the file size of the program that is to
be moved from the record directory to the other disks. We now need
to find out which disk would be the best place to move this file to. We
start adding up how much disk would be freed on each drive if we start
deleting the older shows. Once we go through enough shows and have a
disk drive that will fit the show that is being moved, we delete all the
programs required to fit that show onto the other disks.
The reason for this little bit of complexity, is so if the show being
moved from the record directory is 300GB's (This happened during the
olympics) we won't delete shows on all the various partitions if we
won't be using the space right then.
If anyone can come up with any pit falls I missed...
More information about the mythtv-dev