[mythtv-users] Linux software raid question

Richard Freeman r-mythtv at thefreemanclan.net
Sat Jun 7 11:32:52 UTC 2008

Johnny Russ wrote:
> I know I 
> will need to edit /etc/fstab to make sure everything is getting mounted 
> in the right spots. Are there other things that need to be attended to 
> when transfering a complete system over to software raid like this?

I somewhat-recently did something very similar to this - I added a few 
drives and used the opportunity afforded by the extra space to move the 
entire system over to RAID.  Here is what I did:

1.  Created raid1 boot/root partitions.  I made my root partition fairly 
small to avoid the waste associated with raid1.  About the only actual 
files on /root are bin, etc, sbin, lib, and root - about 280MB.  Note 
that your distro must be pretty good about it puts in these directories 
or you'll have bootup problems.

2.  The rest of the space on the drives went into one big raid5.  I used 
lvm to chop that space up into a few partitions - home, portage, var, 
video, and "data" (everything else).  My logic was to contain anything 
that could grow beyond where I'd want it to be, and to be able to use 
the right filesystem for each job.

3.  I slowly moved and symlinked/mounted files from my running system 
into the new one, maybe shutting down one service at a time to do it. 
Some of the moves necessitated taking the server out of production, but 
I was able to slowly move and test quite a bit of it.  I prefer this to 
just going single-user, moving tons of data, 

4.  For the more critical parts of the system I made copies instead of 
moves, and set up a grub boot option for both root partitions.

5.  Once I was booted up in the new environment and satisfied that all 
was well I repartitioned my old drives into a big raid5 and added it to 
the lvm volume.  I then used pvmove to move my myth video partition to 
be located on the older drives.  Those drives included some 5400 RPM 
drives that shouldn't be a big deal with myth, and putting myth on its 
own spindles would tend to reduce head seeking and IOBOUND errors.

The only hard-and-fast rules are that boot MUST be raid1, and root 
generally must be as well unless you use an initrd to mount it.
Oh, if you want a fully-fault-tolerant system swap should be on raid as 
well.  However, there is a bit of a caveat there - if you're using IDE 
on consumer-grade hardware there is a good chance that the whole system 
will crash if a drive goes out anyway - the bus may not handle having a 
half-dead drive on it.  Linux itself handles it fine, but if the 
motherboard can't talk to your other good drives then that isn't of much 
help.  Server-grade hardware, SCSI, and SATA are more likely to handle 
drive failures more gracefully.

More information about the mythtv-users mailing list