• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Linux RAID and LVM

DarkTXKnight

Senior member
I am very new to Linux, but after some deep reading I want to set up a MythTV\Ubuntu box. I want to implement software raid or LVM out of the disks I have for a little more perfromance and redundancy. I want to be able to add disks later as my needs grow but Id like some advice on the best structure for what I have .

What I have :
Sempron 2500+
2GB RAM

disks:
2x120 Western Digital IDE
2x60 Seagate IDE
2x 36GB 10K Seagate SCSI U160
1x 18 GB 10K Seagate SCSI U160

This is a proof of concept for the Wife as one day I'll probably add a lot more disk, but for now it is enough.

Any advice is appreciated
 
Not really, grouping a handful of differently sized disks together is simple with LVM but it won't give you any redundancy. Since you currently have 2 of each size you could mirror the two like sized disks and then create a single large LVM volume out of the mirrors, it would be redundant but it would halve your available space.
 
interesting idea, so in effect I could do this

RAID0A=2x120

RAID0B=2x60

RAID0C=2x36

Combine RAIDA + RAIDB + RAIDC in LVM

total = 216 GB (roughly)

Maybe use the 18 for a system drive by itself and the array for data? Or should I add it to the LVM as well?
 
Ya that's the idea.

But I feel that the drive's performance is going to go to waste on those 10K Scsi guys. It's like a convoy of ships.. it's only going to go as fast as the slowest drive.

Probably what I'd like to do is leverage the speed of those SCSI drives to get the best performance out of the machine. It's a mythtv box so that means your going to have to have storage for shows you want to save, but your going to also have to have space to do the DVR stuff.

As you know your able to do 'live' stop, fast forward, rewind becuase the TV signal is encoded to mpeg2 or mpeg4, saved to disk, and then played back all at the same time. So the drive speed is going to affect how well the DVR performs.

So what I would do would be something like:
RAID0A=2x120
RAID0B=2x60
Combine RAIDA + RAIDB in LVM
Use that for storage. Since no matter what happens to the drives you probably want to be able to easily recover saved shows and movies. Speed doesn't matter so much as the drives are quite adequate for playback so reliability is the primary concern.

That would net you 180gigs of storage, which is enough for about a hundred hours of good quality Mpeg2 video at regular television resolution.

Then to maximize the advantage of the SCSI drives you would stripe the 36 gig drives together. This will give you the fastest 'scratch space'. You would then direct Mythtv to use that for regular TV viewing and other such things. This would probably be fast enough for 2-3 tv capture devices and will allow for several hours of 'paused' tv.

Then the system can be housed on the 18gig which will provide good performance for starting applications and such and you can set aside a small logical volume to backing up configurations and such.
 
drag I like that idea a lot. since i have never seriously installed linux before, any suggestions for partitions ?? i know there need to be /swap (100mb) and /home and i guess maybe /data (for video storage) but what others would be suggested?
 
Probably make the swap a gig or two (you have plenty of ram, but disk space is cheap and it's cheap insurance). There is no '/swap' though. It doesn't mount anywere the OS kernel uses it directly. It's not like the swap file in Windows,
it'll use the partition raw as it has it's own format.

So Linux needs a minimal 2 partitions to be installed generally. A / (root) partition and a swap partition. Those both would be on your 18 gig disk.

I am assuming that your using software raid for everything... (so that makes a difference if you throw some hardware stuff in there)

For each drive you want to use in the raid arrays you will partition them into one big partition. Then you use those partitions as devices to build the raid arrays.

For the disks in their paticular RAID arrays they will end up as /dev/md0 and /dev/md1 and /dev/md2. I don't know which would be which, I think it matters only in the order you create them. So lets assume that the 2 120 gigs are /dev/md0, the 2 60 gigs are /dev/md1 and the 2 36 gig scsi drives are /dev/md1. You don't need to partition the raid devices.

So then you would use /dev/md0 and /dev/md1 as Physical Volumes (PV) you combine to make the Volume Group (VG) that will be divided up in Logical Volumes (LV) by the Logical Volume Management (LVM) stuff. You can make the entire thing into one big logical volume if you want, but you can also divide it up into various logical volumes depending on what you want. They are resizable and dynamic (weither or not the actual file systems on them are also is another matter).

So you can do things like leave a bunch of unused space if you feel like it that can be allocated later for different purposes, but it may just be a pain for you later if you want to use it all for storage.

Then you just format the /dev/md2 (the 2 striped scsi) and use that like that, like it was a regular partition or whatnot.


Now you can do something like mount the storage logical volume as /storage and mount the striped array as /data if you want and configure Mythtv to use them, or you can find out what Mythtv uses by default and then mount them on those directories. It depends on the default configuration of mythtv, but you can ultimately do whatever you want.


So the only question that is realy up to you is do you want /home to be a logical volume in your storage or do you want /home to be on the same disk as root?

It's nice to have a /home partition or volume as you can save setting and user files in between OS installations. It's not nessicary. Whatever you think would be best.
 
Back
Top