Since I had a few spare hard drives left over from my hardware upgrade, I thought about adding them to my KnoppMyth DVR.
While physically installing the drives and formatting each with fdisk was simple, I ran into a problem using mythtv-setup, since there’s only one folder that can be specified for storing recordings:

I did try using:
/myth*/tv
which would have been neat if it worked, but the setup utility complained about a bad folder path.
The latest KnoppMyth (which, alas, never did install correctly on my machine way back when) supports Storage Groups, which lets you define multiple folders for saving recordings.
But since I was still using KnoppMyth R5F27, I was stuck with useless drives.
That’s where UnionFS came to the rescue.
With UnionFS (which, fortunately, was already installed in R5F27), I was able to merge all my /myth*/tv folders to one mount point.
Here’s how I got it to work:
I started by creating the single mount point which will contain the contents of all four drives (/myth/tv, /myth1/tv, /myth2/tv, and myth3/tv):
# mkdir /mnt/tv
I change the permissions and owner to match the original /myth/tv folder:
# chmod --reference=/myth/tv /mnt/tv
# chown mythtv:mythtv /mnt/tv
And then I was able to use UnionFS to define /mnt/tv as containing the contents of all /myth*/tv folders with read and write (rw) access to all files:
# modprobe unionfs
# mount -t unionfs -o dirs=/myth/tv=rw:/myth1/tv=rw:/myth2/tv=rw:/myth3/tv=rw unionfs /mnt/tv
The UnionFS official site was a bit lacking in documentation, but this tutorial was very helpful.
Then I made sure this mount point is always established on boot (I should probably update /etc/fstab instead, but this method works just as well, since the mount only needs to be there when the mythbackend is running, which occurs after all the boot levels have finished):
# echo "mount -t unionfs -o dirs=/myth/tv=rw:/myth1/tv=rw:/myth2/tv=rw:/myth3/tv=rw unionfs /mnt/tv" >> /etc/init.d/rc-local
Finally, I was able to go back into mythtv-setup and use /mnt/tv as the target folder.
An unwanted side effect, though, was a change to the /etc/udev/rules.d/z25_persistent-cd.rules file: instead of having symbolic links from /dev/dvd to /dev/hdd and /dev/cdrom to /dev/hdd, there was an /dev/dvd1 pointing to /dev/hdd and /dev/cdrom1 pointing to /dev/hdd.
As a result, playing DVDs would fail, since xine expects /dev/dvd to exist.
Strangely, changing the mythtv setup to use /dev/dvd1 instead failed, as did creating an explicit symbolic link from /dev/dvd to /dev/hdd.
Fortunately, this post on a Fedora forum described the solution.
All I needed to do was comment out all the lines in the /etc/udev/rules.d/z25_persistent-cd.rules file except the last two (most recent), and edit those from this:
# CREATIVE_DVD-ROM_DVD1610E (pci-0000:00:1f.1-ide-1:1)
ENV{ID_CDROM}==”?*”, ENV{ID_PATH}==”pci-0000:00:1f.1-ide-1:1″, SYMLINK+=”cdrom1″, ENV{GENERATED}=”1″
ENV{ID_CDROM}==”?*”, ENV{ID_PATH}==”pci-0000:00:1f.1-ide-1:1″, SYMLINK+=”dvd1″, ENV{GENERATED}=”1″
to this:
# CREATIVE_DVD-ROM_DVD1610E (pci-0000:00:1f.1-ide-1:1)
ENV{ID_CDROM}==”?*”, ENV{ID_PATH}==”pci-0000:00:1f.1-ide-1:1″, SYMLINK+=”cdrom”, ENV{GENERATED}=”1″
ENV{ID_CDROM}==”?*”, ENV{ID_PATH}==”pci-0000:00:1f.1-ide-1:1″, SYMLINK+=”dvd”, ENV{GENERATED}=”1″