Opened 18 years ago

Closed 17 years ago

#1744 closed task (fixed)

support multiple recording directories

Reported by: ltd@… Owned by: cpinkham
Priority: minor Milestone: 0.21
Component: mythtv Version: head
Severity: medium Keywords:
Cc: ltd@… Ticket locked: no

Description

What this patch does is allows you to specify multiple recording directories (separated by commas). mythbackend will then 'choose' one of those recording directories based on which one has the most free disk space.

Rationale behind this patch (rather than using DM/LVM/MD et al) is that creating one large partition means that if you lose a HDD you lose _all_ content, not just part of your media store.

No databases changes are involved with this patch (i.e. myth isn't storing the actual directory chosen anywhere). Backends will search each recording directory to find the recording. This also means that you are free to move your media around _between_ your recording directories & it will still find the media.

Auto Expiration will now loop across multiple directories, checking each individually to ensure they meet the minimum space threshold.

A minor change I made was in the default filenames chosen for recording (libs/libmythtv/programinfo.cpp:1294). That part isn't necessary but I found it useful when testing to 'see' what the programmes being recorded actually were... feel free to drop that hunk if you don't like the revised filenames.

Attachments (5)

multiple_recording_dirs.txt (25.3 KB) - added by ltd@… 18 years ago.
patch
mythrename_patch.txt (4.2 KB) - added by ltd@… 18 years ago.
contrib/mythrename.pl
multiple_recording_dirs.diff (25.7 KB) - added by Janne <janne-mythtv@…> 18 years ago.
applies cleanly to [10750] svn trunk
diff16.txt (28.9 KB) - added by ltd@… 18 years ago.
updated patch (as of [11121], have been running this successfully for 5 months with no issues
mythtv-0.20-r11396-multiple-dirs.diff (29.0 KB) - added by michael_zanetti@… 18 years ago.
Updated the patch to apply to svn head

Download all attachments as: .zip

Change History (14)

Changed 18 years ago by ltd@…

Attachment: multiple_recording_dirs.txt added

patch

Changed 18 years ago by ltd@…

Attachment: mythrename_patch.txt added

contrib/mythrename.pl

comment:1 Changed 18 years ago by anonymous

This works really well and removes the need for unreliable LVM configurations that span multiple disks without any mirroring.

comment:2 Changed 18 years ago by danielk

Owner: changed from Isaac Richards to danielk

I'll look at this after I take care of some of my segfault tickets.

comment:3 Changed 18 years ago by NEWBURY@…

Just a passing thought or two while reading this ticket.

Great! idea. Moreoever, the various places/directories where videos are stored *could* be stored in the settings table, so that no command line parameters are needed to tell the backend where to search.

Thirdly, it would on top of that, be possible to designate certain directories for certain types of video, so that the 'parental control' parameters are more easily controlled... Put all the kid's stuff on /dev/hdx or whatever....

Looking forward to this, so as to avoid using LVM etc. or the horrors of moving everything from a small drive to a larger one. Sooner rather than later please!

Geoff

comment:4 Changed 18 years ago by danielk

Type: enhancementtask

It looks like a lot of the issues have been thought out in this patch.

But I would also like to add some checks to figure out which filesystem is best to record to when recording starts. i.e. checking that next files to auto-expire are there, and perhaps load-balancing a bit between the available file systems and prefrerring local filesystems over remote ones (esp if a slave backend has local access to the remote filesystem.) So I'm changing this to a task to remind me to address those issues.

comment:5 Changed 18 years ago by danielk

Milestone: 0.200.21

Changed 18 years ago by Janne <janne-mythtv@…>

applies cleanly to [10750] svn trunk

comment:6 Changed 18 years ago by Richard Dale

I can confirm that the patch from Janne applies cleanly to 11059 too and works nicely.

Changed 18 years ago by ltd@…

Attachment: diff16.txt added

updated patch (as of [11121], have been running this successfully for 5 months with no issues

comment:7 Changed 18 years ago by anonymous

Auto expire of live tv doesn't work correctly with these patches. Live tv is being stored in all the directories but auto expire is only looking in the first directory for the live tv files.

Changed 18 years ago by michael_zanetti@…

Updated the patch to apply to svn head

comment:8 Changed 18 years ago by cpinkham

Owner: changed from danielk to cpinkham

Taking ownership of this after talking with Daniel. I'm not sure what if any parts of this will make it into SVN because of other ongoing parallel work so I'm going to leave the ticket open for now. I am currently working on the previously discussed concept of Storage Groups which will implement the functionality contained in this patch and more.

comment:9 Changed 17 years ago by cpinkham

Resolution: fixed
Status: newclosed

Closing this ticket since the Storage Groups patch has been committed.

Note: See TracTickets for help on using tickets.