[mythtv-users] Unionfs [was: Multiple Directories for Recordings]

Tim Phipps mythtv-users at phipps-hutton.freeserve.co.uk
Fri Sep 22 09:31:38 UTC 2006


On Friday 22 September 2006 07:52, Lincoln Dale wrote:
> [i wasn't subscribed to mythtv-users but saw this thread in the mailing
> list archives.  hence reviving a 2 week old thread :)]
>  > was wondering if it is possible to spread TV show recordings across
>  > multiple directories or disks rather than a single directory.
> if you're prepared to run a SVN-head tree or patch MythTV, YES, this is
> possible.  i've been running a multiple-directories-recording patch now for
> over 5 months.
> the plan is for this to be (hopefully) incorporated into myth 0.21.

I've been playing with unionfs as a way of merging multiple directories into 
one. It's available in Debian testing in the unionfs-modules-2.6.17-2-686 
package now that 2.6.17 is the kernel.

root at hal:/tmp# mount -t unionfs -o dirs=/myth:/home unionfs store
root at hal:/tmp# df -h
Filesystem            Size  Used Avail Use% Mounted on
rootfs                9.9G  3.7G  5.8G  40% /
udev                  1.0G  2.5M 1022M   1% /dev
/dev/hda2             9.9G  3.7G  5.8G  40% /
/dev/hda3             214G  170G   42G  81% /home
/dev/hdd1             111G   88G   23G  80% /myth
unionfs               324G  257G   65G  80% /dev/shm/tmp/store

The advantages would be:
*) Works with unpatched MythTV.
*) Losing a disk will just lose the recordings on that disk.
*) Migration from the original single disk doesn't require reformatting the 
original disk.

But these things stop me using it:
*) All new files get put in the first writeable branch.
*) I don't know what happens when the first branch fills up (autoexpire won't 
help if other branches have space).
*) Can't move files from one branch to another without unmounting the union. 
That requires shutting down all of Myth.
*) Deletion only supports "whiteout" mode so you end up with a .wh file for 
every file ever created. Not sustainable.

I might try it out with the first branch being what was the original store and 
the other branches being directories with old "precious" recordings in 
loopback filesystems sized to be 100% full and autoexpire turned off for 
those recordings. My worry is that autoexpire will get it wrong and either 
delete too much or too little (Prime directive: never lose a Coronation 
Street episode).

Cheers,
Tim.


More information about the mythtv-users mailing list