[prev in list] [next in list] [prev in thread] [next in thread] 

List:       evms-devel
Subject:    Re: [Evms-devel] Question converting to EVMS volumes on new hardware
From:       "Brian T. Hutchinson" <bhutchinson () ntelos ! net>
Date:       2005-03-25 21:52:10
Message-ID: 4244880A.9060207 () ntelos ! net
[Download RAW message or body]

Hi Kevin & the EVMS team!

I got interrupted on trying to do this last fall and now I'm back on 
it.  Boy I should have taken notes!

I have completed all of Kevin's instructions (see his email below mine) 
down to step 9.  Now I trying to mount the "old" (drive a) and "new" 
(drive b) volumes and copy the data from volumes on drive a to evms 
volumes on drive b so I can then blow away drive a, finish the steps 
(13-24) so evms can regenerate drive "A" from the info on drive "B".  
Hope I haven't lost anyone.

How should I go about using the sysresccd to do this?  I finally figured 
out I had to run evmsn on the CD to bring up the evms tool.

I thought this would be as simple as starting up evmsn and selecting 
Action->File System->Mount to mount a source and target volume so I 
could copy the volume, but none of the volumes show up in this screen 
for mounting!  Am I doing something wrong here?

The version of sysresccd I'm using reports 0.2.15.  Looking at Debian 
dpkg -l, it looks like I'm using version 2.5.0-1 of evms, evms-cli, 
evms-gui and evms-ncurses.

Thanks again for all your help. 

Regards,

Brian

Kevin Corry wrote:

>Hi Brian,
>
>On Monday 16 August 2004 8:28 pm, bhutchinson@ntelos.net wrote:
>  
>
>>I've been reading the archives and the User Guide for a while now.  I kind
>>of know what my problem is and I think I know my choices but I don't know
>>how to actually do what I want need to do.  Can you tell by that sentence
>>that I'm confused? :)
>>
>>I have a new machine with two ATA 133 200Gig drives.  One drive has a
>>Debian Sarge distro on it with these partitions (result of df):
>>Filesystem           1K-blocks      Used Available Use% Mounted on
>>/dev/evms/hda1         3842376    178448   3468740   5% /
>>tmpfs                   241544         0    241544   0% /dev/shm
>>/dev/evms/hda5         4807056     73916   4488956   2% /boot
>>    
>>
>
>This is an *enormous* volume for /boot (4.8GB). Most people can get by with 
>a /boot volume of 50 to 100MB. Even if you're testing a *lot* of different 
>kernels, a couple hundred MB is usually more than enough. I currently have 9 
>kernel images in my /boot, and that directory only takes up 26MB.
>
>  
>
>>/dev/evms/hda6         9614116   1740200   7385544  20% /usr
>>/dev/evms/hda7         9614116    124172   9001572   2% /home
>>/dev/evms/hda8       168137368    990964 158605452   1% /var
>>    
>>
>
>The rest of this looks pretty good. Very large /var volume. A mail or news 
>server perhaps?
>
>  
>
>>My goal is to convert all partitions to EVMS Volumes and then I'd like to
>>RAID 1 the entire disk to the other 200G drive that is new with nothing on
>>it.  Finally I'd like to be able to take snapshots of certain volumes
>>(maybe the entire disk) for backups.
>>    
>>
>
>Hmmm. To start off with, raid-1 can't be added after-the-fact. And if you want 
>to do snapshotting, you'll need LVM on top of the raid-1.
>
>  
>
>>I'm running the 2.6.7-bk8 kernel.  It looks like I need a way to come up
>>without mounting any of the above filesystems so I can convert them to
>>EVMS OR it looks like I can create EVMS volumes on the unused 200G disk
>>and then copy the data from the partitions over to the newly created
>>volumes then blow away the original disk with partitions and create a RAID
>>1 out of it.
>>
>>I really don't know how to move forward with either option!  I figured out
>>this much searching the archives but don't know which one would be easier
>>or how to actually do it.  Help!
>>    
>>
>
>To begin with, I'd suggest booting from a CD that has support for EVMS. 
>Debian's install CD might, but I'm not sure. I know Gentoo's install CD will 
>work, or you can grab a small rescue-CD iso from http://www.sysresccd.org/. 
>Perform all of the following from the boot-CD.
>
>Here's my suggestion for you volume configuration. Start with your second disk 
>(which I'll assume is hdb - and if it is, I'll also suggest moving it to your 
>secondary IDE controller to prevent the primary IDE controller from being a 
>bottleneck).
>
>1. Start evmsn or evmsgui.
>2. Assign the DOS segment-manager to hdb.
>3. Create two segments (partitions) on hdb. hdb1 will hold /boot and hdb2 will 
>hold everything else. Size them accordingly.
>4. Create two raid-1 regions, one each for hdb1 and hdb2. They will each only 
>have one child object at first, meaning they won't actually be mirrored. That 
>will change later. We'll assume region md/md0 is created on segment hdb1, and 
>md/md1 is created on hdb2.
>5. Make md/md0 into an EVMS volume. Call it "Boot" (or some other name of your 
>choosing), and you'll have a volume called /dev/evms/Boot.
>6. Create an LVM container using md/md1. Call the container "system" (or some 
>other name).
>7. Create regions from the LVM container, one for each additional 
>volume/filesystem you want. Based on your "df" output, you'll want to create 
>four regions, called "root", "usr", "home", and "var". You might want others 
>as well (e.g. "swap", "opt"). Size the regions appropriately. Leave some 
>freespace for later if you think you'll want to create additional volumes in 
>the future.
>8. Create an EVMS volume for each of these LVM regions. The EVMS volumes have 
>their own names. You'll probably want to name them something similar to the 
>names of the regions.
>9. Create filesystems on each EVMS volume.
>10. Mount these new volumes and your existing volumes.
>11. Copy the data from each of your existing volumes to the new volumes.
>12. Unmount all the volumes.
>13. Remove the "old" volumes (/dev/evms/hda1, /dev/evms/hda5, etc).
>14. Remove the "old" segments (hda1, hda5, etc).
>15. Create two segments on hda that are the same size as the segments on hdb.
>16. Now you'll need to deactivate all the volumes and objects in order to 
>modify the raid1 regions. To do this, you'll simply need to reboot into the 
>boot-CD.
>17. Start evmsn again, but don't save or activate anything yet.
>18. Select region md/md0 and choose "add active object" from the pop-up menu. 
>Select segment hda1 to add to md/md0.
>19. Do the same thing with md/md1 and hda2.
>20. Save changes, which will reactivate all the objects and volumes, and will 
>begin syncing the data in the raid-1 regions from hdb1 to hda1 and from hdb2 
>to hda2. You can follow the progress in /proc/mdstat, and speed up the 
>progress by "echo"ing a suitable number 
>into /proc/sys/dev/raid/speed_limit_min. When the syncing is done, all of 
>your volumes will be mirrored to both disks.
>21. Mount the volumes.
>22. Update the fstab file to reflect the new names of the volumes. For 
>example, your /home filesystem line will change from:
>/dev/evms/hda7       /home           ext3    defaults        0       2
>to:
>/dev/evms/Home       /home           ext3    defaults        0       2
>or whatever name you chose for that volume.
>23. Update your boot-loader config file. Your root filesystem name has 
>changed, so you'll need to adjust the "root=" kernel parameter. The initrd 
>information stays the same as before. You should also consult the Lilo or 
>Grub documentation for how to configure and reinstall the boot-loader itself 
>now that your /boot is mirrored.
>24. You should now be able to reboot into your normal system. As long as the 
>boot-loader is properly configured, the kernel will load and run, then the 
>initrd will load and run and activate all your volumes and mount the root-fs. 
>Then your init scripts will run and mount the remaining volumes. Everything 
>else should run normally.
>
>If you have any other questions or run into any problems with these 
>instructions, please ask. Good luck!
>
>  
>



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Evms-devel mailing list
Evms-devel@lists.sourceforge.net
To subscribe/unsubscribe, please visit:
https://lists.sourceforge.net/lists/listinfo/evms-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic