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



John Abreau <john.abreau at zuken.com> writes:

> On Wed, 2006-11-08 at 10:54 -0500, Rich Braun wrote:
>
>> I gather what you're suggesting is to install the new drives simultaneous with
>> the old, and issuing the commands you've cited to do a single transfer of each
>> of the two md devices, then pulling the old drives?  Sounds like a pretty
>> powerful argument in favor of LVM.
>
> Yup, that's basically it. The nice thing about doing it at the LVM 
> instead of rsync'ing everything is that it's below the filesystem 
> level. So even with the filesystem live, with processes actively 
> reading and writing files, the filesystem can be moved transparently 
> off the old disks and onto the new ones. Of course you want good 
> backups "just in case", before you try this,  but the few times I've
> done this, it all worked smoothly. 
>
> Granted I've always used RAID-1 for my components, so I was only 
> swapping two disks at a time; replacing a RAID-5 like this 
> presumably would be more complicated down at the RAID level. 

Ok, you've confused me again.  Doing it this way, to swap out
4 drives you need to have space for 8 drives!  Or are you saying
that you swap out one drive at a time?  The way I would think about
it:

0) Start with 4 drives (a, c, e, g) each at 400GB; a and c have a 200M
   /boot partition (p1) in RAID-1 (md0) and all of the rest of the
   space (p2) is combined in a RAID-5 (md1).

1) Swap out drive-a.  Partition it into three partitions: 200MB (p1),
   380GB (p2), rest-of-drive (p3).  Let md0 and md1 rebuild.

2) Repeat step-1 for drive c.

3) Swap out drive e.  Partition it into two partitions: 380GB (p2) and
   rest-of-drive (p3).  Let md1 rebuild.

4) repeat step-3 for drive g.

5) Build md2 out of the new partition.  Add md2 to LVM with space
   from md1.

I don't see how you can get rid of md1 in this case.  Even if I now
tell LVM to move all my data from md1 to md2, I don't see how that
helps me.  I can't combine p2 and p3 into a single partition.

Now, I can see how in the next swap-out, when I add a p4 (built into
an md3), if p4 is greater than p2+p3 then I can see how I could move
everything from md1 and md2 onto md3, and then combine p2 and p3 and
build a new array from the newly combined p2+p3.  But this only works
if I keep getting geometrically-bigger hard drives (well, it needs to
be Fibonachily-increasing sizes).

Am I missing something?

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available

-- 
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 / webmaster@blu.org