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!
= Perc 4/5/6 = == Notes == Perc cards are installed in all our modern Dell servers (2850/2950) in various flavors. All are based on LSI architecture and therefore use similar commands/utilities. The BIOS config utility is different however. Perc5 (and 6?) cards use the <tt>megacli</tt> utility, whereas Perc4 (2850's) use the <tt>megarc</tt> utility. It's possible to take a drive from a live mirror on a 5/i card and move it to replace a dead mirror on a 6/i card, the 6/i card will recognize the newly-inserted drive as a spare and rebuild using the remaining good drive as the master. == Common CLI commands (megacli) == Reference:<br> http://tools.rapidsoft.de/perc/<br> http://linux.dell.com/files/whitepapers/solaris/Managing_PERC6_0714.pdf View rebuild progress for drive 1: megacli -PDRbld -ProgDsply -PhysDrv[1:1] -aALL View rebuild ETA for drive 1: megacli -PDRbld -ShowProg -PhysDrv[1:1] -aALL View rebuild rate megacli -AdpGetProp RebuildRate -Aall View info on logical drives and physical drives megacli -LdPdInfo -aALL Set drive 1 offline megacli -PDOffline -PhysDrv[1:1] –aAll Set drive 1 online megacli -PDOnline -PhysDrv[1:1] –aAll View info on logical drives megacli -LDInfo -Lall -aAll Setup a new raid1 config from drives 0,1 (works on 2950/Perc5/i/linux) megacli -CfgLdAdd -r1[1:0,1:1] WB ADRA Cached -a0 Show adapter info megacli adapallinfo a0 view logical drive config info megacli cfgdsply a0 view physical drive info for all drives megacli pdlist a0 When you create a raid0 mirror you know it’s raid0 per the following in ldinfo: RAID Level: Primary-0, Secondary-0, RAID Level Qualifier-0 For raid1 it’s: RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0 Remove LD1 megacli cfglddel L1 a0 Init a disk megacli ldinit start L1 a0 Check consistency (jail7 freezes when trying to perform): megacli -LDCC -Start -L0 -a0 Watch consistency check in realtime: megacli -LDCC -ProgDsply -L0 -a0 See consistency check progress snapshot: megacli -LDCC -ShowProg -L0 -a0 List adapter serial number and firmware level megacli -AdpAllInfo -aALL Testing Battery megacli -AdpBbuCmd -aAll Enclosure info megacli -EncInfo -aALL Controller log megacli -FwTermLog -Dsply -aALL RAID array status megacli -LDInfo -Lall -aALL Patrol Read - The megacli tool has a 'patrol read' function which provides for regular media scanning. To show the current settings, megacli -AdpPR -Info -aALL To perform a manual scan, megacli -AdpPR -Start -aALL The progress can be monitored using the 'Info' option. megacli -AdpPR -Info -aALL Battery Monitoring megacli -AdpBbuCmd -aALL Logical Device Consistency Check megacli -LDCC -Start -LALL -aALL megacli -LDCC -ShowProg -LALL -aALL Power Supply Monitoring - The power supply failures are logged through the event log. megacli -AdpEventLog -GetEvents -f /tmp/event.log -a1 This writes a set of event entries into the file. RAID 0 to RAID 1 conversion for system disks Delete the second raid0 : megacli -CfgLdDel L1 -a0 Migrate to raid1 : megacli -LDRecon start r1 [Add PhysDrv[32:1]] L0 -a0 Check progression : megacli -LDRecon ShowProg L0 -a0 Check the logical drive information and note that it still displays as a 1-disk RAID0 but it also displays the reconfiguration in progress under “Ongoing Progresses” field. The VD configuration information changes after the Raid Level Migration has completed successfully. megacli -LDInfo -Lall -aALL Converting from RAID-5/Spare to RAID-6 megacli -PDHSP -Rmv -PhysDrv [32:5] -a0 megacli -CfgLdDel L1 -a0 megacli -CfgLdAdd -r6[32:2,32:3,32:4,32:5] -a0 == Creating/removing mirror == === Perc5: via CLI === This will add a new mirror from drives located in the 2nd and 3rd slots: megacli cfgldadd r1[1:2,1:3] wb adra cached a0 megacli ldinfo lall a0 (confirm it’s there, look for bg init, make take a few mins to show up) <pre>Adapter 0 -- Virtual Drive Information: Virtual Disk: 0 Name: RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0 Size:139392MB State: Optimal Stripe Size: 64kB Number Of Drives:2 Span Depth:1 Default Cache Policy: WriteBack ReadAdaptive Direct Current Cache Policy: WriteThrough ReadAdaptive Direct Access Policy: Read/Write Disk Cache Policy: Disk's Default Virtual Disk: 1 Name: RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0 Size:428672MB State: Optimal Stripe Size: 64kB Number Of Drives:2 Span Depth:1 Default Cache Policy: WriteBack ReadAdaptive Direct Current Cache Policy: WriteThrough ReadAdaptive Direct Access Policy: Read/Write Disk Cache Policy: Disk's Default Ongoing Progresses: Background Initialization: Completed 1%, Taken 0 min.</pre> If you have DRAC virtual media enabled, the scsi devices look like: <pre>cat /proc/scsi/scsi Attached devices: Host: scsi0 Channel: 00 Id: 08 Lun: 00 Vendor: DP Model: BACKPLANE Rev: 1.00 Type: Enclosure ANSI SCSI revision: 05 Host: scsi0 Channel: 02 Id: 00 Lun: 00 Vendor: DELL Model: PERC 5/i Rev: 1.00 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi1 Channel: 00 Id: 00 Lun: 00 Vendor: Dell Model: Virtual CDROM Rev: 123 Type: CD-ROM ANSI SCSI revision: 02 Host: scsi2 Channel: 00 Id: 00 Lun: 00 Vendor: Dell Model: Virtual Floppy Rev: 123 Type: Direct-Access ANSI SCSI revision: 02</pre> And the new drive will show up as /dev/sdc So, turn off virtual media first, to do this: <pre>cat /proc/scsi/scsi Attached devices: Host: scsi0 Channel: 00 Id: 08 Lun: 00 Vendor: DP Model: BACKPLANE Rev: 1.00 Type: Enclosure ANSI SCSI revision: 05 Host: scsi0 Channel: 02 Id: 00 Lun: 00 Vendor: DELL Model: PERC 5/i Rev: 1.00 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi0 Channel: 02 Id: 01 Lun: 00 Vendor: DELL Model: PERC 5/i Rev: 1.00 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi1 Channel: 00 Id: 00 Lun: 00 Vendor: Dell Model: Virtual CDROM Rev: 123 Type: CD-ROM ANSI SCSI revision: 02 Host: scsi2 Channel: 00 Id: 00 Lun: 00 Vendor: Dell Model: Virtual Floppy Rev: 123 Type: Direct-Access ANSI SCSI revision: 02 [root@virt18 ~]# echo "scsi remove-single-device 1 0 0 0" > /proc/scsi/scsi [root@virt18 ~]# cat /proc/scsi/scsi Attached devices: Host: scsi0 Channel: 00 Id: 08 Lun: 00 Vendor: DP Model: BACKPLANE Rev: 1.00 Type: Enclosure ANSI SCSI revision: 05 Host: scsi0 Channel: 02 Id: 00 Lun: 00 Vendor: DELL Model: PERC 5/i Rev: 1.00 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi0 Channel: 02 Id: 01 Lun: 00 Vendor: DELL Model: PERC 5/i Rev: 1.00 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi2 Channel: 00 Id: 00 Lun: 00 Vendor: Dell Model: Virtual Floppy Rev: 123 Type: Direct-Access ANSI SCSI revision: 02 [root@virt18 ~]# echo "scsi remove-single-device 2 0 0 0" > /proc/scsi/scsi [root@virt18 ~]# cat /proc/scsi/scsi Attached devices: Host: scsi0 Channel: 00 Id: 08 Lun: 00 Vendor: DP Model: BACKPLANE Rev: 1.00 Type: Enclosure ANSI SCSI revision: 05 Host: scsi0 Channel: 02 Id: 00 Lun: 00 Vendor: DELL Model: PERC 5/i Rev: 1.00 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi0 Channel: 02 Id: 01 Lun: 00 Vendor: DELL Model: PERC 5/i Rev: 1.00 Type: Direct-Access ANSI SCSI revision: 05 [root@virt18 ~]# echo "scsi add-single-device 0 2 2 0" > /proc/scsi/scsi Vendor: DELL Model: PERC 5/i Rev: 1.00 Type: Direct-Access ANSI SCSI revision: 05 SCSI device sdc: 142082048 512-byte hdwr sectors (72746 MB) sdc: asking for cache data failed sdc: assuming drive cache: write through SCSI device sdc: 142082048 512-byte hdwr sectors (72746 MB) sdc: asking for cache data failed sdc: assuming drive cache: write through Attached scsi disk sdc at scsi0, channel 2, id 2, lun 0 [root@virt18 ~]# cat /proc/scsi/scsi Attached devices: Host: scsi0 Channel: 00 Id: 08 Lun: 00 Vendor: DP Model: BACKPLANE Rev: 1.00 Type: Enclosure ANSI SCSI revision: 05 Host: scsi0 Channel: 02 Id: 00 Lun: 00 Vendor: DELL Model: PERC 5/i Rev: 1.00 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi0 Channel: 02 Id: 01 Lun: 00 Vendor: DELL Model: PERC 5/i Rev: 1.00 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi0 Channel: 02 Id: 02 Lun: 00 Vendor: DELL Model: PERC 5/i Rev: 1.00 Type: Direct-Access ANSI SCSI revision: 05 [root@virt18 ~]# fdisk -l Disk /dev/sda: 146.1 GB, 146163105792 bytes 255 heads, 63 sectors/track, 17769 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 392 3148708+ 83 Linux /dev/sda2 393 914 4192965 82 Linux swap /dev/sda3 915 17769 135387787+ 83 Linux Disk /dev/sdb: 146.1 GB, 146163105792 bytes 255 heads, 63 sectors/track, 17769 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 * 1 522 4192933+ 82 Linux swap /dev/sdb2 523 17769 138536527+ 83 Linux Disk /dev/sdc: 72.7 GB, 72746008576 bytes 255 heads, 63 sectors/track, 8844 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/sdc doesn't contain a valid partition table [root@virt18 ~]# echo "scsi add-single-device 0 0 3 0" > /proc/scsi/scsi [root@virt18 ~]# echo "scsi add-single-device 1 0 0 0" > /proc/scsi/scsi Vendor: Dell Model: Virtual CDROM Rev: 123 Type: CD-ROM ANSI SCSI revision: 02 sr0: scsi-1 drive [root@virt18 ~]# echo "scsi add-single-device 2 0 0 0" > /proc/scsi/scsi Vendor: Dell Model: Virtual Floppy Rev: 123 Type: Direct-Access ANSI SCSI revision: 02 Attached scsi removable disk sdd at scsi2, channel 0, id 0, lun 0 [root@virt18 ~]# cat /proc/scsi/scsi Attached devices: Host: scsi0 Channel: 00 Id: 08 Lun: 00 Vendor: DP Model: BACKPLANE Rev: 1.00 Type: Enclosure ANSI SCSI revision: 05 Host: scsi0 Channel: 02 Id: 00 Lun: 00 Vendor: DELL Model: PERC 5/i Rev: 1.00 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi0 Channel: 02 Id: 01 Lun: 00 Vendor: DELL Model: PERC 5/i Rev: 1.00 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi0 Channel: 02 Id: 02 Lun: 00 Vendor: DELL Model: PERC 5/i Rev: 1.00 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi1 Channel: 00 Id: 00 Lun: 00 Vendor: Dell Model: Virtual CDROM Rev: 123 Type: CD-ROM ANSI SCSI revision: 02 Host: scsi2 Channel: 00 Id: 00 Lun: 00 Vendor: Dell Model: Virtual Floppy Rev: 123 Type: Direct-Access ANSI SCSI revision: 02</pre> Then we have: <pre>cat /proc/scsi/scsi Attached devices: Host: scsi0 Channel: 00 Id: 08 Lun: 00 Vendor: DP Model: BACKPLANE Rev: 1.00 Type: Enclosure ANSI SCSI revision: 05 Host: scsi0 Channel: 02 Id: 00 Lun: 00 Vendor: DELL Model: PERC 5/i Rev: 1.00 Type: Direct-Access ANSI SCSI revision: 05</pre> And we do: echo "scsi add-single-device 0 2 1 0" > /proc/scsi/scsi And it’d show up as /dev/sdb To watch the bg init: megacli ldbi progdsply l1 a0 ---- To delete that mirror: megacli cfglddel L1 a0 echo "scsi remove-single-device 0 2 1 0" > /proc/scsi/scsi None of the above is data destructive On a Dell5/i (2950) on linux: <pre>[root@virt18 ~]# cat /proc/scsi/scsi Attached devices: Host: scsi0 Channel: 00 Id: 08 Lun: 00 Vendor: DP Model: BACKPLANE Rev: 1.00 Type: Enclosure ANSI SCSI revision: 05 Host: scsi0 Channel: 02 Id: 00 Lun: 00 Vendor: DELL Model: PERC 5/i Rev: 1.00 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi0 Channel: 02 Id: 01 Lun: 00 Vendor: DELL Model: PERC 5/i Rev: 1.00 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi1 Channel: 00 Id: 00 Lun: 00 Vendor: Dell Model: Virtual CDROM Rev: 123 Type: CD-ROM ANSI SCSI revision: 02 Host: scsi2 Channel: 00 Id: 00 Lun: 00 Vendor: Dell Model: Virtual Floppy Rev: 123 Type: Direct-Access ANSI SCSI revision: 02 [root@virt18 ~]# echo "scsi remove-single-device 2 2 0" > /proc/scsi/scsi</pre> And to add that drive back in: <pre>[root@virt18 ~]# echo "scsi add-single-device 0 2 2 0" > /proc/scsi/scsi [root@virt18 ~]# cat /proc/scsi/scsi Attached devices: Host: scsi0 Channel: 00 Id: 08 Lun: 00 Vendor: DP Model: BACKPLANE Rev: 1.00 Type: Enclosure ANSI SCSI revision: 05 Host: scsi0 Channel: 02 Id: 00 Lun: 00 Vendor: DELL Model: PERC 5/i Rev: 1.00 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi0 Channel: 02 Id: 01 Lun: 00 Vendor: DELL Model: PERC 5/i Rev: 1.00 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi1 Channel: 00 Id: 00 Lun: 00 Vendor: Dell Model: Virtual CDROM Rev: 123 Type: CD-ROM ANSI SCSI revision: 02 Host: scsi2 Channel: 00 Id: 00 Lun: 00 Vendor: Dell Model: Virtual Floppy Rev: 123 Type: Direct-Access ANSI SCSI revision: 02 Host: scsi0 Channel: 02 Id: 02 Lun: 00 Vendor: DELL Model: PERC 5/i Rev: 1.00 Type: Direct-Access ANSI SCSI revision: 05</pre> === Perc4: via CLI === Make sure (to allow addcfg): dev.amr.0.allow_volume_configure: 1 List drives <pre>megarc -LogPhysInfo -a0 Finding Devices On Each MegaRAID Adapter... Scanning Ha 0, Chnl 1 Target 15 Adapter No 0 : Total Logical Drive(s)- 1 Logical drive 0: RaidLevel 1 Physical Drive Information Channel 0 139900MB drive scsi ID 0 CoerSZ: 286515200(Sectors) 139900(MB) RawSZ: 286749487(Sectors) 139900MB drive scsi ID 1 CoerSZ: 286515200(Sectors) 139900(MB) RawSZ: 286749487(Sectors) 69880MB drive scsi ID 2 CoerSZ: 143114240(Sectors) 69880(MB) RawSZ: 143374649(Sectors) 69880MB drive scsi ID 3 CoerSZ: 143114240(Sectors) 69880(MB) RawSZ: 143374649(Sectors)</pre> Before: <pre>megarc -ldInfo -a0 -lall Finding Devices On Each MegaRAID Adapter... Scanning Ha 0, Chnl 1 Target 15 *******Information Of Logical Drive 0******* Logical Drive : 0( Adapter: 0 ): Status: OPTIMAL --------------------------------------------------- SpanDepth :01 RaidLevel: 1 RdAhead : Adaptive Cache: CachedIo StripSz :064KB Stripes : 2 WrPolicy: WriteBack Logical Drive 0 : SpanLevel_0 Disks Chnl Target StartBlock Blocks Physical Target Status ---- ------ ---------- ------ ---------------------- 0 00 0x00000000 0x1113e000 ONLINE 0 01 0x00000000 0x1113e000 ONLINE</pre> After:<br> This will add a new mirror from drives located in the 2nd and 3rd slots (make sure in sh): <pre>sh megarc -addCfg -a0 -R1[0:2,0:3] WB RAA CIO -strpsz64 megacli ldinfo lall a0 *******Information Of Logical Drive 0******* Logical Drive : 0( Adapter: 0 ): Status: OPTIMAL --------------------------------------------------- SpanDepth :01 RaidLevel: 1 RdAhead : Adaptive Cache: CachedIo StripSz :064KB Stripes : 2 WrPolicy: WriteBack Logical Drive 0 : SpanLevel_0 Disks Chnl Target StartBlock Blocks Physical Target Status ---- ------ ---------- ------ ---------------------- 0 00 0x00000000 0x1113e000 ONLINE 0 01 0x00000000 0x1113e000 ONLINE *******Information Of Logical Drive 1******* Logical Drive : 1( Adapter: 0 ): Status: OPTIMAL --------------------------------------------------- SpanDepth :01 RaidLevel: 1 RdAhead : Adaptive Cache: CachedIo StripSz :064KB Stripes : 2 WrPolicy: WriteBack Logical Drive 1 : SpanLevel_0 Disks Chnl Target StartBlock Blocks Physical Target Status ---- ------ ---------- ------ ---------------------- 0 02 0x00000000 0x0887c000 ONLINE 0 03 0x00000000 0x0887c000 ONLINE</pre> Initialize the drive: <pre>megarc -initLd -a0 -l1 ********************************************************************** Monitoring Initialization on Adapter No 0 ********************************************************************** LD00: LD01:000% LD02: LD03: LD04: LD05: LD06: LD07: LD08: LD09: LD10: LD11: LD12: LD13: LD14: LD15: LD16: LD17: LD18: LD19: LD20: LD21: LD22: LD23: LD24: LD25: LD26: LD27: LD28: LD29: LD30: LD31: LD32: LD33: LD34: LD35: LD36: LD37: LD38: LD39: ********************************************************************** Monitoring Initialization on Adapter No 0 ********************************************************************** LD00: LD01:100% LD02: LD03: LD04: LD05: LD06: LD07: LD08: LD09: LD10: LD11: LD12: LD13: LD14: LD15: LD16: LD17: LD18: LD19: LD20: LD21: LD22: LD23: LD24: LD25: LD26: LD27: LD28: LD29: LD30: LD31: LD32: LD33: LD34: LD35: LD36: LD37: LD38: LD39:</pre> (back to shell, continues in bg) to see: megarc -ViewBICCProg -a0 Can't delete that mirror: <pre>megarc -DelLd -a0 -l1 ********************************************************************** MEGARC MegaRAID Configuration Utility(FreeBSD)-1.04(03-02-2005) By LSI Logic Corp.,USA ********************************************************************** [Note: For SATA-2, 4 and 6 channel controllers, please specify Ch=0 Id=0..15 for specifying physical drive(Ch=channel, Id=Target)] Type ? as command line arg for help Finding Devices On Each MegaRAID Adapter... Scanning Ha 0, Chnl 1 Target 15 Failed to delete logical drive 1 on adapter 0</pre> Check consistency: <pre>megarc -chkonLd -a0 -l0 ********************************************************************** Monitoring Check Consistency on Adapter No 0 ********************************************************************** LD00:000% LD01: LD02: LD03: LD04: LD05: LD06: LD07: LD08: LD09: LD10: LD11: LD12: LD13: LD14: LD15: LD16: LD17: LD18: LD19: LD20: LD21: LD22: LD23: LD24: LD25: LD26: LD27: LD28: LD29: LD30: LD31: LD32: LD33: LD34: LD35: LD36: LD37: LD38: LD39:</pre> (spits out new screen every few sec) To watch again after cancelling: megarc -ViewBICCProg -a0 === via BIOS configuration utility ===
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