[mythtv-users] Help moving /video from a single drive to a LVM mount point

Jonathan Rogers jonner at teegra.net
Mon Feb 12 08:34:47 UTC 2007

On Sat, 2007-02-10 at 15:29 -0500, Jeffrey Born wrote:
> I thought the storage groups feature was not coming out until .21 gets
> released?

I have been using 0.20 and had two drives with a VG spanning both to
make one big LV for my recordings filesystem. However, I just
reinstalled everything on that system and I switched to current SVN just
to get the multiple directory capability of storage groups. I believe
this should be inherently more stable and manageable, since the drives
aren't tied together.

When I installed Ubuntu, I lost my existing LVM configuration and
consequently all the old recordings. I can't blame it all on the
multi-disk LVM configuration, but the extra complexity did contribute.

I did successfully install Ubuntu on the two-drive LVM VG without
damaging the existing LV containing the recordings (twice in fact).
However, though the installer seemed to have completed successfully, the
bootloader configuration didn't work. One time, it was Grub and once
Lilo. I think the BIOS ordering of the drives must have confused the
installers, as one drive is regular parallel ATA and one is SATA, with
the BIOS configured to boot the SATA drive.

I tried a third installation attempt with somewhat different options and
managed to hose the LVM configuration at some point, though I don't know
how, since that didn't happen the first two times. I looked around the
web to see if there was any hope of recovering the LVM configuration; it
seems like I might have had a chance if I had explicitly backed up the
LVM metadata to an external file. Though I had done a regular backup of
the entire system excluding the recordings (which would have taken
something like 100 DVD-Rs), I hadn't realized that I needed to
explicitly back up the LVM metadata.

When I accepted that everything was gone, I was free to really start
from scratch. I disconnected the secondary ATA drive, did a
straightforward install on the primary SATA drive (still using Ubuntu's
LVM configurator) and everything went smoothly. After I had MythTV
working from Ubuntu packages, I connected the secondary ATA drive and
built MythTV from SVN, which upgraded itself without a hitch. I made a
separate VG using the entire secondary disk, then an LV and an XFS
filesystem. I added filesystems from each drive to the Default storage
group and it seems to be working fine, putting recordings in both

I say all this to recommend that you try to use the new storage groups
feature while you still have a relatively empty system and it's easy to
change. I think spanning a filesystem across multiple drives without
redundancy should be avoided unless absolutely necessary. I've done it
quite a few times before, but it's often made me uneasy. I wanted to get
away from it even before I lost all my recordings recently. I'm sure I
could have avoided my lossage with more care and knowledge, but I think
the mistakes I made were easy ones.

Even if you know exactly what you're doing, a filesystem spanning
multiple drives is less secure and stable than on a single drive. A
problem with any one drive, whether bad sectors or simply being
disconnected, can easily render all files inaccessible and it's twice as
likely that you will encounter a failure in a group of two drives than
in a single drive. If one of your two drives fails and the single
filesystem spans both, you can lose all the files. On the other hand, if
one of your two drives fails, but they contain independent filesystems,
you will only lose the files on one drive. Of course, if you want even
higher reliability, you can build a RAID, such as RAID-5 (which requires
three or more drives and uses an entire drive's worth of space for
redundant information), but I think that's overkill for TV recordings.

Jonathan Rogers <jonner at teegra.net>

More information about the mythtv-users mailing list