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

Alexander Fisher alexjfisher at gmail.com
Thu Oct 27 12:07:50 EDT 2005


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.
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).

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!

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 ...

> 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.

Hope this helps,
Alex


More information about the mythtv-users mailing list