[mythtv] Storage Groups functionality

Chris Pinkham cpinkham at bc2va.org
Sun Feb 5 18:16:15 UTC 2006

I wanted to start a thread to talk about the Storage Groups functionality
that has been mentioned for post-0.19 work.

This is mainly to Kevin, but I wanted to post to the list to see if anyone
elase had any other ideas.

Over time, there has been 2 different ways mentioned to spread out
recordings over multiple directories.  The first is to just have multiple
recording directories listed where files are either round-robin balanced
between the three or where new recordings just go to the filesystem with
the most free space.  The second is the concept of storage groups where
the user can specify multiple storage groups each one with it's
own directory.  Then each scheduled recording can be assigned to one
of the storage groups or the default.

I'd like to see a merger of both those ideas.  I know there are lots of
people who would use the functionality to do things like separate their
'A-Team' recordings onto a Raid-10 filesystem while keeping their
wife's 'Desparate Housewifes' on a non-redundant filesystem, but there
are also a lot of us who just want to load-balance storage between
multiple filesystems.  I like the idea of Storage Groups because I
can separate off my A-Team recordings, but for the other 95% of
recordings, I may just want to spread them out over my three video
filesystems so the filesystems are always pretty much equal in
the amount of free space they have.  The Storage Group concept
doesn't have to even be multiple filesystems, it could be just different
directories on the same filesystem as others have mentioned they would
like to be able to do.

As far as implementation goes, I think it would be a lot easier to
just handle the Storage Group at the record table level and not at
the recorded table level.  I think we should go one step farther
than we are now with the 'basename' column and add a 'dirname' (or
whatever it is called) column.  This would hold the directory of
the file (obviously).  This way we don't have to deal with storage
group changes, etc. like when a user decides to change the directory
on one of their storage groups.  I think the ability to move
recordings from one Storage Group to another is a nice-to-have, but
not a requirement for the initial implementation.  The
directory-determining logic could look at the record.storagegroup field
and if it was a normal group name, it would use the directory specified
for that group, but if it was one of the special virtual groups such
as 'Most Free Disk Space' or possibly 'Least Recordings' or others,
then it would perform a few calculations to figure out which directory
out of all the real Storage Groups should be used.  Perhaps the default
would even be to just use the storage group with the most amount of
disk space free, or there could be a special 'Default' storage group
where the group name was not user-editable, only the directory.

Of course we'll have to handle this in lots of places in the code, but
those can be talked about later, I just wanted to see if I could start
some kind of discussion on the topic.


More information about the mythtv-dev mailing list