[SATLUG] Re: now help with raid setup on linuxmce box

John Pappas j at jvpappas.net
Mon Sep 22 17:58:03 CDT 2008


Your discussion below includes ZERO redundancy.  RAID 0=No Redundancy.  My
suggestions inline below:

On Mon, Sep 22, 2008 at 13:11, Todd W. Bucy <toddwbucy at grandecom.net> wrote:
>
> In this particular box I will have 2 320 gig and 2 500 gig drives.  with my
> raid I want it all redundancy, as much
> space as possible and speed.


How does this sound:  Partition up the 500GB disks like so:
SDx1 = 128MB RAID (Linux fd = raid autodetect) Bootable
SDx2 = 6GB RAID (linux fd)
SDx3 = ~174GB RAID (linux fd)
SDx4 = 320GB RAID (linux fd)

Then set up /dev/md0 with RAID 1 (Mirror) with the SDx1 partitions for
/boot, set up /dev/md1 with RAID 1 using SDx2 for SWAP, set up /dev/md3 with
RAID 1 using SDx3 for LVM (LVs: root, var, home), and SDx4 and the SDx1 from
the 320's for a 4 disk RAID 5 Array (/dev/md4) using the 2x 320Gb disks and
2x 320GB Partitions.  Then LVM  That would net ~960GB of protected media
storage and 174GB of protected storage for system and user files.  You could
then set up LVM on md4 to allocate as needed, or just have it be one big
file system (ie /video or the like).


> I know that I cant have it all (i dont have the $$) so I am trying to
> figure out a strategy....I was thinking of
> doing a raid0 of 2x320 = 640 and a raid0 of 2x500 = 1tb then lvm the two
> raid arrays for approximately 1.64 tb.


Using the setup above (Albeit a little complex) you will get both the
performance and protection that you require, within the budget (and existing
equiptment) you have.


> question will the lvm provide any redundancy given the size difference
> between the two raid arrays?


 LVM does not equal redundancy.  Understand that redundancy reduces overall
capacity, as the word redundancy infers.  If you want to protect data, you
must keep EXTRA data (ie overhead).  The lowest redunancy overhead comes
with RAID5, since 1 disk of some number > 3 is used for this protection
data.  IN the case above, it is 25%, which is the best you can achive with
only 4 disks.  If you had 6 disks you would have ~16% overhead (%
overhead=1-(total-1/total))

or would it be more advisable to do 2 raid1 then lvm them to get 840gb?
>

Not to be pedantic, but LVM != Redundancy.  RAID 1 is 50% overhead, since
each block is stored twice.  My suggestion above maximizes flexibility and
protection while minimizing RAID overhead.


> given that this will be a media server I want as much drive space as I
> can get but I don't want to loose all my media should a drive die on me.
>

Agreed.  This accomplishes that.   My setup (SageTV) is:
(long listing)
----------
# fdisk -l /dev/sd?

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd293022e

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       60801   488384001   fd  Linux raid
autodetect

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x41b4d84a

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       60801   488384001   fd  Linux raid
autodetect

Disk /dev/sdc: 300.0 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xc6ebc6ec

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1          17      136521   fd  Linux raid
autodetect
/dev/sdc2              18         267     2008125   82  Linux swap / Solaris
/dev/sdc3             268       36483   290905020   fd  Linux raid
autodetect

Disk /dev/sdd: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xbf91de1c

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1       60801   488384001   fd  Linux raid
autodetect

Disk /dev/sdi: 300.0 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xc6ebc6eb

   Device Boot      Start         End      Blocks   Id  System
/dev/sdi1   *           1          17      136521   fd  Linux raid
autodetect
/dev/sdi2              18         267     2008125   82  Linux swap / Solaris
/dev/sdi3             268       36483   290905020   fd  Linux raid
autodetect

Disk /dev/sdj: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdj1               1       60801   488384001   fd  Linux raid
autodetect

 # cat /proc/mdstat
Personalities : [raid1] [raid0] [raid6] [raid5] [raid4] [linear]
md2 : active raid5 sda1[0] sdj1[3] sdb1[2] sdd1[1]
      1465151808 blocks level 5, 64k chunk, algorithm 2 [4/4] [UUUU]

md0 : active raid1 sdc1[0] sdi1[1]
      136448 blocks [2/2] [UU]

md1 : active raid1 sdc3[0]
      290904896 blocks [2/1] [U_]
------------

DAMN!  Just noticed my md1 is out of sync!!  Indicated by [2/1][U_].  looks
like sdi3 dropped out.  WIll rebuild!


> thanks for any advice on this topic
>

My pleasure!
jp


More information about the SATLUG mailing list