Author Topic: 0810 MythTV storage groups discussion  (Read 4709 times)

merkur2k

  • Addicted
  • *
  • Posts: 513
    • View Profile
0810 MythTV storage groups discussion
« on: April 30, 2009, 11:13:08 pm »
Was working through some issues I was having with storage groups only to discover that i ended up fixing a known issue (I really need to read the release notes more often), but at least I learned alot about how the storage groups work. That said I do have some suggestions to make or at least wish to start some discussion on them while I implement them in the scripts.
In response to the following:
"One last change is in the "Default" storage group - it no longer points to the drive with most space. This was changed because eventually it would throw mythweb for a loop once the paths changed. I will look into a better way to defaultly record to the drive with most space, most likely using recording profiles."
It is my understanding that MythTV will always choose the device with the most amount of free space, given that all other weights are equal, and that all dirs are in the same storage group. thus the easy solution for the above problem is to simply put all public/tv_shows/[device] dirs into the "default" storage group. I have tested this out on my setup and it works perfectly.
This information was gleaned from http://www.mythtv.org/wiki/Storage_Groups#Storage_directories and http://www.mythtv.org/wiki/Storage_Groups_Weighting
It would probably also make sense to add the same set of dirs to the LiveTV storage group so that Myth can manage them properly as well.
One additional change I made to my system was to give the system drive an artifically high weight so that it will only ever be used if everything else is full, but this is just because i have a very small system drive in my test rig (17 gig). Its a very easy thing to do as it is just a single line that lives in mythconverg.settings and would be exactly the same for every install so could be included in the install if this is something that the average user would want.
Overall I am very impressed with the way MythTV has implemented these storage groups, it is way more flexible than I initially thought possible and the weighting system is very well designed.
I would like to see some discussion on this from developers and users alike.

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
Re: 0810 MythTV storage groups discussion
« Reply #1 on: May 04, 2009, 01:56:24 am »
I've been responsible for the MythTV storage group implementation, and it is not quite finished yet.
Regarding the default group - this needs to point to the root tv_shows_x directory to make older 0710 recordings work, as they won't have a storagegroup set upon upgrading. Also, regarding weighting etc, this would get way too complex for normal users that want to just use MythTV and go. On top of that, users will not always want the drive with the most space to be used.  So currently, storage groups are just one group per storage device path, so you can select the final destination of the recording, I have also added support for custom storage groups (starting with "custom:") to help vill this void.

On final change i plan on making is the addition of an "LMCE: Auto" storage group, which as you suggest will contain all directories and will always use the device with the most space. For new recordings, I can probably have this one selected by default.

This combination will allow users to have the choice between:
A) Selecting an exact recording location amongst LMCE storage devices
B) Have a means to have the device with most space selected
C) Add their own custom storage groups.

Good suggestions, but to make mythtv "easy to use out-of-the-box" for 90% of LMCE users, getting too deep into storage group features and weighting features will make the system a bit too difficult for those users.

What do you think of my proposal above?

merkur2k

  • Addicted
  • *
  • Posts: 513
    • View Profile
Re: 0810 MythTV storage groups discussion
« Reply #2 on: May 04, 2009, 04:38:18 pm »
I had the same thoughts as you regarding an "auto" group, which is exactly what the default group ends up being. I think it represents the option that users would most often want as well, making it the perfect place to put all the drives (since it is of course the default option if nothing else is chosen).
I think we are really talking about the same thing here, just with slightly different implementations. My solution covers points A and B perfectly (with B being the default). I didnt put any effort into option C since you seem to have that under wraps and its not a feature i personally have a need for right now anyway.
I did find that I didnt have a need for adding any custom weighting with this setup, as it chose the drive i wanted it to by default.
The only changes i made to the script were two additional lines to insert each public dir into both default and LiveTV storage groups and I have been very happy with the results over the last several days.