Editing
RAID Cards
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
= LSI/MegaRaid = == Notes == Unlike the Adaptec RAID cards, the LSI cards store two copies of the configuration meta-data. Once copy is in NVRAM on the cards itself, the other copy is on the disks. If there is configuration data in NVRAM it will be used, even if the data on the disks is different. What all this means is that if a card ever needs to be swapped out, you have to make sure the NVRAM is cleared before installing the new card. The clear config option in the menus doesn’t work. In order to clear the NVRAM choose new config and then don’t create any arrays. Then save the new config. Once the config is cleared you can install the card in an existing system. Once installed, you have to go to the view/add config menu and make sure the arrays are there, then save the config. Another thing to be aware of is that once you create an array, there’s no way to delete it without doing an entirely new config. You can get around this by taking note of the current config, then do a new config with only the arrays you want, and save the config. DO NOT initialize the arrays after saving the new config or you’ll lose all the data on that array. I did something weird where I cleared the config, then re-created the config, all without rebooting, and when I exited after re-creating, the system was fine (despite giving lots of errors after the config was cleared). Technical support<br> 8:30am to 5:30pm EST<br> 800-633-4545 == CLI notes == There are 2 shell-based options to manage the RAID card: <tt>megamgr</tt> and <tt>megarc</tt> megamgr is a curses-based program which closely mimics the BIOS config utility. To run it, you must be in the directory where it's installed: cd /usr/local/sbin/; megamgr When working in megamgr and entering an ESC, you'll notice nothing happens immediately. After pressing the ESC key, you must press another key before the ESC takes effect. So for instance, after pressing ESC press the up or down arrow (which is inocuous since it won't cause any undesired changes). There is also a CLI-based program called <tt>megarc</tt> == Common CLI commands == All commands must be run from /usr/local/sbin/ Info/status: megarc -ldInfo -a0 -Lall take drive 3 offline: megarc "-physOff -a0 pd[0:3]" Rebuild drive 3: megarc "-doRbld -RbldArray[0:3] -a0 -ShowProg" View rebuild progress: megarc -showRbld -a0 == Creating/removing mirror == === via CLI === This will add a new mirror from drives located in the 2nd and 3rd slots: <pre>cd /usr/local/sbin/; megarc -addCfg -a0 -R1[0:2,0:3] WB CIO echo "scsi add-single-device 0 0 1 0" > /proc/scsi/scsi</pre> To delete that mirror: <pre>cd /usr/local/sbin/; megarc -delLD -a0 -L1 echo "scsi remove-single-device 0 0 1 0" > /proc/scsi/scsi</pre> This will add a new mirror from drives located in the 4th and 5th slots: <pre>cd /usr/local/sbin/; megarc -addCfg -a0 -R1[0:4,0:5] WT CIO echo "scsi add-single-device 0 0 2 0" > /proc/scsi/scsi</pre> To delete that mirror: <pre>cd /usr/local/sbin/; megarc -delLD -a0 -L2 echo "scsi remove-single-device 0 0 2 0" > /proc/scsi/scsi</pre> None of the above is data destructive. You can remove a mirror and re-create it and all the data will still be there...as long as you don't initialize the drive. === via BIOS configuration utility or Megamgr === Totally new configuration: <pre>Configure, New configuration (space 2x to select 2 drives) Enter to end selection F10 to configure Space to select Span-1 F10 to configure RAID=1 StripeSize=64k Write policy=WRBACK Read policy=NORMAL Cache Policy=Cached IO ESC, accept</pre> NOTE: when adding an additional drive, choose view/add not New Configuration – otherwise you'll wipe out the existing mirror/config. Adding to existing configuration: <pre>Configure->View/Add Configuration-> ([space] on the 2 drives)->[enter] F10 [space] Span-1 F10 Advanced->Cache Policy=CachedIO Accept Save Exit </pre> If this was added to a running machine, to get the device to show up (in linux) run: echo "scsi add-single-device 0 0 1 0" > /proc/scsi/scsi Make sure SCSI transfer rate is 320M under objects, channel, channel 1 Go to objects, adapter Make sure alarm is enabled ---- To remove a mirror: Objects->Logical Drive->(move cursor to drive)->F5 If on a running server (assuming you unmounted it first): echo "scsi remove-single-device 0 0 1 0" > /proc/scsi/scsi ---- Create mirror from volume: #Remove drive (megarc -delLD -a0 -L1) #Then re-add config (I did it with megamgr) #Then fail the new drive and rebuild it ---- This will add a new '''VOLUME''' from drive located in the 2nd slot: <pre>Configure->View/Add Configuration-> ([space] on the #2 drive)->[enter] F10 [space] Span-1 F10 Advanced->Cache Policy=CachedIO Accept Initialize->Logical Drive 2->[space]->F10 Save Exit</pre> If on a running linux system, to add the device: echo "scsi add-single-device 0 0 1 0" > /proc/scsi/scsi == Move drives from one LSI card to another == MAKE SURE ALL DRIVES ARE REMOVED BEFORE COMPLETING!! On new card: <pre>Configure, New configuration F10 Save Power down Insert drives Reboot</pre> DO NOT INITIALIZE DRIVES! Alternate (if the drives are still in when you clear config) You can re-create mirrors without destroying data as long as created the same and drives are not initialized. <pre>Configure, Clear configuration Easy configuration (create as normal) DON’T INITIALIZE Reboot</pre> == Converting broken mirror to volume back to mirror == Assumes drive #1 is dead/out # convert #0 to volume. New config, #0 = volume, #2,#3 = R1 # put cleaned drive into slot #1. All drives out- put drive in #1, new conf, #1 volume, init, delete LD ## THIS DOESN’T WORK: new config, #0,#1 = R1, #2,#3 = R1. After reboot end up in grub shell – RAID card confused about which is boot drive ## new config, #0,#1 = R1, #2,#3 = R1. Power down. Remove #1. Power up then insert #1 = mirror 0 rebuilds == Move 2 mirrors from 2 different machines into 1 == Premise: Orig machine has 2 R1’s, taking mirror #1 from other machine and replacing mirror #1 on target machine # power off target machine, remove #1 mirror drives. Unseat #0 mirror # power up. Clear config. New config. Reboot to confirm # power down. Reinsert mirror #0 and mirror #1 from other machine # power up. Vew/add config, select DISK config, save reboot # will see original #0 mirror and #1 mirror from other machine
Summary:
Please note that all contributions to JCWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
JCWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information