
mtdean at thirdcontact
Nov 21, 2009, 5:43 PM
Post #7 of 9
(635 views)
Permalink
|
|
Re: Moved db to new machine, mythtv still finds old recordings
[In reply to]
|
|
On 11/21/2009 05:28 PM, Thomas Börkel wrote: > Deleting the RecordFilePrefix in table settings did not help. > > Then I realized, I had several entries in table storagegroup for SG > "Default". All for different hosts (new backend, frontends). And all > those entries (besides the one of the new host), pointed to the old > directory. > > Apparently, it used any of them to find the recording. It even used the > Default SG of another host, after I changed the SGs in table recorded to > a different value (not "Default"). > > After I deleted all SGs but the ones from the new host, it did not try > to play from the old directory anymore. > > Now I have 2 SGs and this works: > - "backend", pointing to the old dir, for older recordings (changed in > table recorded) > - "Default", pointing to the new dir, for newer recordings > > Sounds like a bug to me. No, it's working fine in 0.22. On your master backend, you define a storage group and create a list of directories associated with that storage group. Then, you're done. Do not create directory lists for that same storage group on other hosts--otherwise, you get the issues you're having. Instead, once a storage group is defined on the master backend, /all/ hosts use ("inherit") the same list of directories for that storage group. If, and only if, you have a host that /needs/ a different list of directories--meaning that you have a directory path that exists on more than just the one host, but it is important that that one host is the only host that uses the directory path--then, you can /override/ the directory list defined on the master backend for the remote host. Note, however, you really would be better off fixing your directory paths so all hosts can use the same directory list. Does this mean that all the directories in the list must exist on all the hosts? No. A missing directory in the directory list is ignored. As a matter of fact, it is not even important that all the directories in the directory list exist on the master backend. Again, a missing directory in the directory list is ignored. Why should you only define the directory list one time on the master backend instead of re-defining the exact same (or worse, slightly different) lists on multiple backends? Well, if the question didn't answer it for you, let me be a bit more overt this time... If you define the same information multiple times on multiple hosts, then when you need to change the information, you have to change it multiple times on multiple hosts. Also, you can /only/ edit the directory list for a given host /from/ that host's mythtv-setup. Therefore, if you retire a host (or hostname) without explicitly deleting the directory list override for the storage group on that host, you leave garbage in the database which could cause issues with storage group fallback months or even years down the road. These issues were worse in 0.21-fixes (and are exactly what caused the problems for you). In 0.22, deleting a storage group from the master backend's mythtv-setup deletes the group (the list of directories associated with that group on /all/ hosts). Whereas, "deleting a storage group" from a remote system's mythtv-setup simply deletes the override (the list of directories used only for that host). Therefore, if you have garbage from old hosts, use mythtv-setup from 0.22-fixes or higher to delete the group, then define it properly only on the master backend and let inheritance make it easier to maintain your directory lists. Note that in 0.21-fixes, there are some issues with inheritance for any non-Default storage group, but if you use only the Default storage group, everything works fine when configured as I described. Note, also, that it is /critical/ that you do not specify a mount point directory path in a storage group directory list. If you do and the file system is not mounted, MythTV will happily write recordings to the "parent" file system--usually the root file system--and, in conjunction with other apps writing to that file system, may actually fill it up and cause problems. Always specify a subdirectory under the mount point. That way, if the file system isn't mounted, Myth will see it's a missing directory and ignore it. Mike _______________________________________________ mythtv-users mailing list mythtv-users [at] mythtv http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
|