Find
in
entire site
wiki pages
files
This is the EasyVoxBox wiki. -
EasyVoxBox.org -
Thu 09 of Sep, 2010 [07:50 UTC]
Menu
Home
Contact us
Stats
Categories
Calendar
Wiki
Wiki Home
Last Changes
Rankings
List pages
Orphan pages
Print
File Galleries
List galleries
Rankings
Raid1 howto
Raid Level 1
backlinks...
Misc
Raid Level 1 Howto for EVB
There seems to be too many raid configurations to try to automate them into the kickstart file.
EVB RAID howto
paper writing services
Download the distro iso and mount it under an http server.
Copy out the ks.cfg file. Edit it to comment out the diskpart section and change to url install.
Boot from a CentOS 5.1 CD and at the boot prompt:
linux ks=http://***path to ks file****
The disk partition text mode will come up during the install.
Use this link as a reference:
http://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-raid-config.html
http://www.flmnh.ufl.edu/linux/linux_software_raid.htm
Once the new OS is booted, the GRUB bootloader needs to be told that either disk can boot.
grub
grub>root (hd0,0) ***Sets mbr on both hdd's
grub>setup (hd0)
grub>root (hd1,0)
grub>setup (hd1)
grub>quit
==============================================
the following was taken from a TB article
RAID1, LVM (logical volumes) - howto
updated 25/07/2006 *****
I have been doing some work on automating some resliiency features into the standard install of AAH (and now Trixbox). This would be for an IDE based machine using software RAID (for redundancy) and Logical volumes - LVM (for flexibility).
First the issues:
1. Implementing RAID and logical volumes post-install is complicated, dangerous and not reccomended.
2. RAID (hardware or software) and LVM are desirable features. IDE is still the cheapest storage platform. This is especially true of Asterisk installs as many PBX's use low end hardware.
3. The default install of Trixbox does not allow any options to install RAID or LVM
4. The text mode Anaconda install does not allow manual configuration of Logical volumes however a kickstart file does.
5. A kickstart install of RAID will always (!!!!) produce file system corruption if the RAID is not allowed to sync before the first reboot.
6. High end RAID hardware is still relatively expensive. Linux drivers are not always available or if available, unstable.
Point 5 will many times disuade people to use RAID and LVM.
Although software RAID is undesirable for many applications Asterisk is not usually a disk intensive application so lends itself well to software RAID.
Ok here's what I did to get this working:
Hardware configuration:
HD 1 connected to primary IDE as master.
HD 2 connected to secondary IDE as master.
CDROM connected to secondary IDE as slave.
The hard disks don't need to be exactly the same size. Actually using this method the disks don't need to be the same size at all. I would recommend that the smallest disk be at least 5Gigs (not tested). I used two 20Gig drives I had knocking around. The Raid will config itself to the smallest disk and the larger disk will match up to the smaller disk Raid. Although I worked this for IDE drives it can be used on any type of disk subsystem - scsi, sata etc with some modification for the drive labels.
CDROM modification:
I used UltraISO on windows to modify the CDROM. I am sure there are other ways to do this. Open the ISO with UltraISO and copy the ks.cfg file somewhere. Edit this file. (If you are using Windowz make sure your editor supports Unix Linefeeds. Very important! I used Editpad Lite.)
Edit the ks.cfg as follows:
Remove the 'Reboot' line.
Where it says
Partition clearing information
clearpart --all --initlabel
part /boot --fstype ext3 --size=100
part / --fstype ext3 --size=1024 --grow
part swap --size=256 --grow --maxsize=768
Replace with
Partition clearing information
clearpart --all --initlabel
part raid.01 --size=100 --ondisk=hda --asprimary
part raid.02 --size=100 --ondisk=hdc --asprimary
part swap --size=256 --ondisk=hda
part swap --size=256 --ondisk=hdc
part raid.11 --size=1 --grow --ondisk=hda
part raid.12 --size=1 --grow --ondisk=hdc
raid /boot --level=1 --device=md0 raid.01 raid.02
raid pv.01 --level=1 --device=md1 raid.11 raid.12
volgroup vg01 pv.01
logvol / --vgname=vg01 --size=10000 --name=root
This will give you a 100MB RAID 1 /boot partition, two 256Mb swap partitions (change the 256 to a desirable size or replace with --recommended) and the rest of the disk will be a RAID1 Logical volume containing the / (or root) filesystem. All partitions will be formatted as Ext3 as normal.
custom research paper
Where it says (in the section starting - %post)
mount /dev/hda /mnt/source
change to
mount /dev/md1 /mnt/source
You can also add the following lines to the end of the
NaV
section. This will update the boot information to make both drives bootable. Remember to update the hdx numbers to match your drive configuration. (thanks oztrixter)
FOR TESTING ONLY ************
chvt (3)
i=1
while i=1
do
clear
cat /proc/mdstat
sleep 2
done
/sbin/grub --batch <<EOT 1>/dev/null 2>/dev/null
root (hd0,0)
setup (hd0)
root (hd1,0)
setup (hd1)
quit
EOT
Thats it. Save this file as kslvm.cfg.
Add it to the root directory of the ISO and save the iso under a different name.
Burn to a CD. Boot your asterisk machine from this CD and use the following command to start the install.
linux ks=cdrom:/kslvm.cfg
The install process will continue as before however it will ask you to confirm various things (as we are using the 'interactive' setting). Just accept all the defaults i.e go to 'ok' or 'next' or 'proceed' whichever comes up. Use 'Tab' key to change the highlighted items and enter to accept. The only place where you will have to enter some text is at the 'root password' screen (NOTE not at the 'grub password' screen!!). Choose a root password.
Begin the install. Let it run through to the end. When you see the REBOOT screen STOP. Don't do anything here. We need to wait for the RAID's to complete thier first sync. This is why we have to do the install in interactive mode. We only get the REBOOT screen in interactive mode. For IDE disks the only way I have found of reliably checking this is to wait for the drive light to go out. This can take some time depending on the speed of the disks and thier size. Go and have a coffee. If you have no other indication here just wait about half an hour/45 mins to be sure.
Once you are sure the disks are in sync. Reboot. You are done.
When you can login. Login as root using the password setup during the earlier phase. you can check the state of the Raid by using the following command:
cat /proc/mdstat
You should have two raids called md0 and md1. In square brackets for each it should say
2/2
. Your disks are ready and Trixbox is installed.
If it doesn't say
2/2
but the machine has restarted ok and it says
2/1
then one or both your raids has not synced properly or your disk is faulty (bad blocks). To manually sync the raids type the following (for simplicity all the commands are included below. If a partition is already in a raid the command will fail with an error. This you can ignore and move onto the next command):
mdadm -a /dev/md0 /dev/hda1
mdadm -a /dev/md0 /dev/hdc1
mdadm -a /dev/md1 /dev/hda3
mdadm -a /dev/md1 /dev/hdc3
use
watch cat /proc/mdstat
to monitor the raid re-build. Once it is complete you can issue the
reboot
command and restart the machine. check your raids again with cat /proc/mdstat. They should be ok now.
OK so the above is in an ideal world. My experiences with this:
In a VMWARE machine everything works fine. (to test this you need to create a second hard drive when creating the virtual machine then do the install booting either off the new CDROM or the new ISO).
On a DELL Poweredge 600C server class machine on the restart the Logical volume seems to start before the Raid drive MD1 has completed its initialisation. This means that the LVM claims the one of the MD1 partitions and MD1 then fails to start synced. A manual re-sync is required (on every reboot!!! damnit). However the whole system seems to be healthy and works fine. I have a question waiting approval on the Centos devel forums regarding this.
I would appreciate any feedback on this and if anyone has time to try this out and share their experience. It moves AAH/Trixbox up a notch in the small business world.
For anyone who wants to revert (or vert) an existing drive to Raid, here is a good link:
http://linux-sxs.org/hardware/raid_for_idiots.html
Just ignore the last bit and use grub instead as described in this post.
Regards
Rehan Khan.
Created by:
admin
last modification: Friday 09 of July, 2010 [19:59:04 UTC] by
AssuntaSal
source
history
similar
slides
Login
user:
pass:
Remember me
[
register
|
I forgot my password
]
Last changes
1)
Raid1 howto
2)
HomePage
3)
email relay
4)
Security
5)
VSP Trunks
6)
Fax
7)
EVB and WRT54GL SOHO Networking
8)
Misc
9)
Roadmap
10)
Spandsp and Asterisk1.4 on CentOS 5
Search
in:
Entire Site
Wiki Pages
Files
Wiki
File Galleries