Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LVM + RAID follow up

Derek Atkins wrote:
> Are you using RAID-0, RAID-1, or RAID-5?

I am using RAID1, mirroring.  Same data on two drives.  That gives 2x
performance on reads, 1x performance on writes as compared to non-RAID.

> I kind of want to use RAID-5, not RAID-0 or RAID-1..

RAID0's only useful, IMHO, for scratch space (example, high-def video
editing)--gives 2x on writes if you have two drives, but no fault-tolerance. 
RAID5's a useful tradeoff between performance and capacity, but given the low
cost of hard drives these days, I figure I don't really need RAID5 (until I
decide to move my entire video collection onto hard drives, which I'm
deferring until the whole DRM mess is sorted out.  *rant on* I want to put
about 500 DVDs onto a hard drive jukebox, and start collecting high-def video,
but the copyright issue has prevented reasonable software from becoming
available.  Try as I might, I can't find anyone who has built a Linux-based or
Xbox-based server to play back DVD VOBs using the same type of remote control
that the rest of the family's accustomed to.) *rant off* So for now I only
need a couple hundred gigs of storage.  Note also that to run RAID5 you need
separate controllers for each drive.  A standard motherboard contains two PATA
controllers, you need to make at least a third available if you want good
performance.  (SATA is probably the solution, now that the drives are nearly
as cheap as PATA.)

>  But I also don't know how
> to combine the RAID vs. LVM vs. partitions in order to have
> a protected /boot partition in addition to a very very large /

I don't bother with putting /boot on RAID, haven't found a reliable way to do
it yet.  But it doesn't change very often so you can simply rsync it to your
other drive whenever you do a kernel update.

The distros, at least SuSE, will set up LVM-over-RAID for you out of the box,
just follow the directions.  Make sure to leave some unallocated space in the
LVM.  (My advice--set up a small /boot partion, 200M to 500M, and make a
second partition /dev/md0 take up the rest of the space on the smaller of the
two drives.  Make these two partitions the same size on the larger drive.  If
the two drives are the same, proceed; if there is remaining space on the
larger one, you can set up some scratch storage.  Then decide what logical
volumes you want to create.  I like to make my root and tmp filesystems
completely separate from anything else, to prevent runaway apps eating up
space from crashing the system; don't forget to create a swap volume of a gig
or so. )  Here's an example of a few of my logical volumes:

# lvdisplay -C
  LV          VG      Attr   LSize  Origin Snap%  Move Log Copy%
  volroot     system  -wi-ao  8.00G
  voluser     system  -wi-ao 10.00G
  swap        system1 -wi-ao  1.00G
  volmp3      system  -wi-ao 91.00G
  voltmp      system1 -wi-ao  2.00G

If your hardware supports hot-swap then you can upgrade hard drives without
even rebooting.  Most IDE hardware, alas, requires a reboot.  With SCSI you
can force a probe thus:

# echo "scsi add-single-device 0 0 0 0" >/proc/scsi/scsi

I'm not yet experienced with SATA.

One side note--I bought an external USB drive recently.  I belatedly
discovered that the SCSI driver interface to USB drives doesn't support
idle-timeout spindown (remember my other thread about obsessive energy

P.S.  Get out the vote!  And support the project, maybe
someday we can create a real open-source democracy...

This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!

Boston Linux & Unix /