[mythtv-users] MythicalLibrarian, symlinks and Myth: Will this work or will Myth lose its mind?

Raymond Wagner raymond at wagnerrp.com
Wed Feb 1 17:31:37 UTC 2012


On 2/1/2012 11:41, Matt Emmott wrote:
> In my experience, Myth will always record to the first disk in the SG 
> until that one fills up, and then move on to the second. My thought 
> was that since Myth could see the second disk's free space, it would 
> remove recordings as needed.

That's not at all the case.  MythTV uses a disk scheduler to place 
recordings on storage, with four different modes.  The "free space" 
scheduler just blindly records to the disk with the most free space, and 
the "percent free space" scheduler behaves similarly as would be 
expected.  The "disk I/O" scheduler will record to the disk with the 
lowest current load, allowing variable weights applied for concurrent 
recording, playback, commercial flagging, and transcoding, variable 
initial weights for local versus network filesystems, and even per 
directory weights.  The default "combination" scheduler is a mixture 
between the I/O and free space methods.

You could weight the remote disk very highly (meaning low probability of 
use), but that's really just a clumsy way to do it, and abuse of the 
mechanism.

> I'm going to revisit my idea of mounting the drives via NFS, and at 
> that point the symlinks should work. I hope that this won't have any 
> ill effects later on down the road... Say in six months when I want to 
> upgrade to .25-fixes or something, and Myth freaks out when all the 
> recordings are actually symlinks.

Symlinks are really just a bad way to do things, especially when MythTV 
has a built in mechanism for doing this, and has had such since Storage 
Groups were added in 0.21.  You can define your own storage group 
names.  Recordings store which storage group they are expected to be in, 
however when searching for files, MythTV will fall through to searching 
every non-special (i.e. Videos) storage group to find the content.  Set 
all your recording rules to store to one storage group, move it to a 
path in a different storage group, and preferably update the group name 
in the database.  It would also be good to check inuseprograms to make 
sure you aren't pulling the file out from under something else.

Recordings will go to the group you want it to, while your "archive" 
group will be left untouched.  MythTV still has control over the file 
should you wish to delete it.  Even the autoexpire methods can still be 
made to work, setting the minimum free space to something larger than 
your largest expected file (maybe a 20GB, 3hr movie?), such that as new 
content is archived in, old content will be deleted to maintain that 
free space.


More information about the mythtv-users mailing list