[mythtv-users] An LVM'd drive died! What do I do...

Erik Karlin e_karlin at yahoo.com
Thu Oct 27 12:42:46 EDT 2005


On Thu, Oct 27, 2005 at 05:07:50PM +0100, Alexander Fisher wrote:
> On 10/27/05, David Bennett <davidbennett1979 at gmail.com> wrote:
> > I must admit you have me quite intrigued by this RAID 5.
> >
> > So heres the deal, I am going to go out and buy some disks.
> > Anything I need to know before I start?
> 
> 250GB disks currently seem to give the most GB per $ or ?
> 
> > How (and what) do I need to know to setup a software Raid 5 on my
> > linux? Any guides etc.?
> 
> I've had quite a bit of success installing Debian with RAID and LVM
> configured during the install.  GRUB won't boot off RAID5 (or LVM?)
> but it will boot off RAID1.  Therefore, I would suggest something like
> this ...
> 
> 3 disks sda,sdb,sdc. 3 partitions on each.
> sd[abc]1 small (<1GB) RAID 1 (md0) formatted ext3 and used for /boot.
> sd[abc]2 small formatted for swap.  Swap is automatically striped
> across swap partitions.  If you don't want your system to potentially
> crash when you have a disk failure, you can put swap over RAID 1
> instead.

I've done exactly this, though I did do a raid1 for swap too.

> sd[abc]3 remaining space, RAID 5, and one LVM PV on top of this. 
> Create one VG and several LVs out of this, one for each of your other
> filesystems (/, /usr /var/mediastore etc.)  Format these XFS but don't
> make them bigger than they need to be, (XFS can easily grow
> filesystems online but doesn't support shrinking).

Here's where I diverge, and haven't seen mentioned yet. I went the
raid10 route instead. with raid5, you can lose up to 1 drive in the
array. any more and you lose the array. With raid10 you can lose half,
in theory, as long as they're not in the same raid1 set. I've got 6x250g
disks as 3 raid1 mirrors and then raid0 the 3 raid1 arrays.

I have no desire to deal with failed disks. I want to minimize the
impact of any failures as much as possible.

> 
> Other hints ...
> Don't put more than one ide drive on a single ide channel.   A failing
> drive often takes out the bus.  SATA drives make sense, but SMART
> support for SATA is still under development.  You should also make
> sure that your SATA chipset has got linux support!

haven't gone sata yet, but my mobo has 2 sata connectors. Right now I'm
using the onboard ide and two dual channel ide cards. All the drives are
masters

> 
> With some luck, by the time you're ready to grow your RAID 5, online
> RAID resizing will have been finished and been tested a bit.
> 
> > Also, I wonder if there is any easy way to get the info off from my
> > current 2 drive LVM onto the raid? (I would like to use some of these
> > LVM drives to be put in this raid).
> 
> This could be tricky.  I can't think of a way to do this at the
> moment.  If you can consolidate this data into a 1 disk LVM ...

use degraded raid arrays, as long as it's big enough
> 
> > Can I started with all my info on
> > one HD and turn that into a Raid, or does a raid have to be
> > parititoned, constructed and THEN have information copied on to it...
> 
> In theory, you could start by only using 2 of the 3 disks.  You'll
> have to create a degraded RAID 5.  Once you've freed up the 3rd disk
> (possibly my moving some LVs?) you can add it back to the RAID 5 and
> let it resync.

This works well, you can specify a disk called missing when you create
the array and it will run degraded. This is how I created a 6 disk
raid10 array with only 4 disks until the 250gb's went on sale again.
Granted I had a bigger risk if something failed, but it was only a few
months before drives drop in price again.

> 
> Hope this helps,
> Alex


More information about the mythtv-users mailing list