[mythtv-users] Mirroring via LVM or RAID?

Sage sage at gypsycaravan.com
Sat Jul 8 05:14:20 UTC 2006


I have never heard of LVM being used for mirroring by itself; I've
only heard of LVM being installed on top of a software RAID partition.
 The purpose of LVM is to create one big partition with little virtual
partitions inside of it.  Those virtual partitions can be resized and
moved around much more easily than real partitions.  That's an
entirely separate function from mirroring.

I've never used it myself, but LVM is supposedly very stable, and is
built into every modern distribution.  One problem with LVM is that
your /boot partition cannot reside on it; you still have to have a
separate boot partition.

Regardless of whether you choose to use LVM, software RAID is probably
what you want for redundancy.  Set your 400 GB disks up with two
partitions each; one software RAID partition each and one swap
partition each (It's a bad idea to put your swap partition on top of a
software RAID array -- I've seen stability problems from it firsthand,
and you don't need swap redundancy; just having two separate swap
partitions is enough).

Then join the two software RAID partitions into a single software RAID
1 array, and create two partitions inside that array; one /boot
partition (formatted with ext3), and one LVM partition.  Then you can
create the rest of your virtual partitions inside the LVM partition --
at the very least, set up one virtual partition for the OS (ext3
format) and one virtual partition for MythTV recordings (xfs format).
By creating a separate partition for recordings you can manage them
more easily, and by creating it in LVM you'll be able to resize it if
necessary.

There are only two major problems with software RAID 1:
1. They can be a hassle if you need to boot into any other system.
For instance, if you screw up your install and need to boot into
Knoppix or something to fix it, you may find that Knoppix treats your
drives as separate disks and not a single RAID 1 array.  Some of the
more cutting-edge distributions -- Ubuntu in particular -- have fixed
this;  I'm running Ubuntu 6.06 (Dapper Drake) and if I boot into the
Ubuntu Live DVD, my disks are still recognized as a single RAID 1.
2. Even if you have your /boot partition on a software RAID 1, the
bootloader is only installed on one disk.  Which means that if your
first disk dies, even if the other disk is still alive, you can't boot
into it.  You can fix this by manually installing grub onto the second
disk, but you have to remember to do so every time you update grub
(which probably won't be often).

If you can deal with those two issues, software RAID 1 is rock-solid.
I've used it for years on various motherboards and hard drives, and
have had no problems.

As for hardware RAID, I would actually recommend against it.  Due to
driver support, it's probably less reliable than software raid, unless
you're buying a heavy-duty professional RAID card, and even then,
you're not likely to see any real-world performance gains on a
mirrored array.  It's also not as flexible as software RAID; one of
the big advantages of software RAID vs. hardware RAID is that software
RAID actually makes an array out of two partitions, not out of two
disks.  So you could actually make two partitions on each disk, and
then have one RAID 1 array and one RAID 0 array -- useful if you want
to have redundancy on your OS but high speed for recordings.

Also note that moving from software RAID to hardware RAID isn't easy
-- software RAID creates a device inside the operating system, whereas
hardware RAID creates a device in BIOS so that the OS doesn't even see
the separate disks.  You probably won't be able to make that move
without reinstalling your operating system.  The only time you really
benefit from hardware RAID is if you want to dual-boot Windows from
the same disks.

On 7/7/06, Jon Larson <jtlarson at u.washington.edu> wrote:
>
>
> I've got 2 new 400GB SATA hard disks (with the possibility for more) and I
> want to transfer my mythtv installation from my old 40GB test drive to the
> new drives.
>
> I definitely want to have some level of redundancy, so mirroring is a must;
> but I need advice on which method will be the easiest to expand, better
> performance, more stable, etc. Eventually I might get a hardware RAID card,
> but that won't happen for at least several months so I need to find a
> suitable software solution for now.
>
> It seems like LVM mirroring would be easier to set up and expand, but I
> can't find much documentation that deals with it's mirring capabilities--how
> to set it up, is it reliable, etc?
>
> I'd appreciate any help you can give.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
>
>


More information about the mythtv-users mailing list