Linux view RAID disk array information

Source: Internet
Author: User
Tags unzip extract dell openmanage

Software RAID: can only be viewed by the Linux system itself

Cat/proc/mdstat

You can see information such as RAID level, status, and so on.

Hardware RAID: The best way to do this is through the management tools of the installed RAID vendors, with CmdLine and graphical interfaces. such as the Adaptec company's hardware card can be viewed by the following command:

#/usr/dpt/raidutil-l All

You can see very detailed information.

Of course, more often than not install the appropriate management tools, only rely on the Linux itself, generally I know two ways:

# DMESG |grep-i raid

# CAT/PROC/SCSI/SCSI

The information displayed is similar to the raid manufacturer, model, level, but cannot view each block of hard disk information.

In addition to the actual test, the Dell server can be displayed by command, and the HP, IBM and other servers through the above command is not displayed. Only the hardware vendor's management tools can be installed to view the Dell BMC.

Cat/proc/scsi/scsi

You can see that the device is on SCSI. The raid level can be seen in general. LSPCI can see the model number of the RAID card.

==========================================================

RPM-IVH megacli-1.01.09-0.i386.rpm

command to use:
Megacli-ldinfo-lall-aall RAID Level Check
Megacli-adpallinfo-aall Check RAID card information
Megacli-pdlist-aall Viewing hard disk information
Megacli-adpbbucmd-aall View battery Information
Megacli-fwtermlog-dsply-aall View RAID Card logs

MEGACLI Common Parameters Introduction
Megacli-adpcount "Display adapter Count"
Megacli-adpgettime–aall "Show Adapter Time"
Megacli-adpallinfo-aall "Show All Adapter Information"
Megacli-ldinfo-lall-aall "Show all Logical disk group information"
Megacli-pdlist-aall "Show All Physical Information"
Megacli-adpbbucmd-getbbustatus-aall |grep ' Charger status ' "View charging status"
Megacli-adpbbucmd-getbbustatus-aall "Show Bbu status information"
Megacli-adpbbucmd-getbbucapacityinfo-aall "Show Bbu Capacity Information"
Megacli-adpbbucmd-getbbudesigninfo-aall "Show Bbu Design Parameters"
Megacli-adpbbucmd-getbbuproperties-aall "Show current BBU Properties"
Megacli-cfgdsply-aall "Show RAID card model, RAID settings, disk related information"

Changes in the status of the tape, from the drawing to the disk.
Device | normal| damage| rebuild| Normal
Virtual Drive | optimal| degraded| degraded| Optimal
Physical Drive | online| Failed–> unconfigured| rebuild| Online

============================================

MEGACLI Common usage
1. Preparation

The new version of MEGACLI-1.01.24-0.I386.RPM will install the program under/OPT, you can customize the installation directory, for example:

Rpm–relocate/opt/=/usr/sbin/-I. megacli-1.01.24-0.i386.rpm

Replace the installation directory/opt with the/usr/sbin.
View all Physical Disk information

Megacli-pdlist-aall

Adapter #0

Enclosure Number:1
Slot Number:5
Device Id:5
Sequence Number:2
Media Error count:0
Other Error count:0
Predictive Failure count:0
Last predictive Failure Event Seq number:0
Raw SIZE:140014MB [0x11177328 sectors]
Non coerced SIZE:139502MB [0x11077328 sectors]
coerced SIZE:139392MB [0x11040000 sectors]
Firmware State:hotspare
SAS Address (0): 0x5000c50008e5cca9
SAS Address (1): 0x0
Inquiry data:seagate st3146855ss s5273ln4y1x0
.....

2. View the disk cache policy

Megacli-ldgetprop-cache-l0-a0

Adapter 0-vd 0:cache policy:writeback, Readaheadnone, Direct

Or

Megacli-ldgetprop-cache-l1-a0

Adapter 0-vd 1:cache policy:writeback, Readaheadnone, Direct

Or

Megacli-ldgetprop-cache-lall-a0

Adapter 0-vd 0:cache policy:writeback, Readaheadnone, Direct
Adapter 0-vd 1:cache policy:writeback, Readaheadnone, Direct

Or

Megacli-ldgetprop-cache-lall-aall

Adapter 0-vd 0:cache policy:writeback, Readaheadnone, Direct
Adapter 0-vd 1:cache policy:writeback, Readaheadnone, Direct

Or

Megacli-ldgetprop-dskcache-lall-aall

Adapter 0-vd 0:disk Write cache:disk ' s Default
Adapter 0-vd 1:disk Write cache:disk ' s Default

3. Set the disk cache policy

Caching Policy Explanation:

WT (Write through
WB (Write back)
NORA (No read ahead)
RA (Read ahead)
ADRA (Adaptive read ahead)
Cached
Direct

Example:

Megacli-ldsetprop wt| wb| nora| ra| Adra-l0-a0

Or

Megacli-ldsetprop-cached|-direct-l0-a0

Or

Enable/disable Disk Cache

Megacli-ldsetprop-endskcache|-disdskcache-l0-a0

4. Create/delete array
4.1 Create a RAID5 array, composed of physical disk 2,3,4, the hot spare of the array is the physical disk 5

MEGACLI-CFGLDADD-R5 [1:2,1:3,1:4] WB Direct-hsp[1:5]-a0

4.2 Creating an array without specifying a hot spare

MEGACLI-CFGLDADD-R5 [1:2,1:3,1:4] WB direct-a0

4.3 Deleting an array

Megacli-cfglddel-l1-a0

4.4 Adding disks online

Megacli-ldrecon-start-r5-add-physdrv[1:4]-l1-a0

This means that the Rebuild Logical disk group 1,raid level is 5, adding the Physical disk number: 1:4. After the rebuild is complete, the newly added physical disk is automatically in the Rebuild (sync) state, and this time fdisk-l is not able to see the space of the array become larger, only after the system restarts. If there is only one partition under the array, the partition is also increased directly, if
Have multiple partitions, do not know how to allocate new space? Have a chance to try, hehe
5. View array Initialization information
5.1 Once the array is created, there is a process to initialize the synchronization block to see its progress.

Megacli-ldinit-showprog-lall-aall

or display it in a dynamic visual text interface

Megacli-ldinit-progdsply-lall-aall

5.2 Viewing the background initialization progress of the array

Megacli-ldbi-showprog-lall-aall

or display it in a dynamic visual text interface

Megacli-ldbi-progdsply-lall-aall

6. Create a global hot spare

Specify 5th disk as global hot spare

Megacli-pdhsp-set [-enclaffinity] [-nonrevertible]-physdrv[1:5]-a0

You can also specify a dedicated hot spare for an array

Megacli-pdhsp-set [-dedicated [-array1]] [-enclaffinity] [-nonrevertible]-physdrv[1:5]-a0

7. Delete Global Hot spare

Megacli-pdhsp-rmv-physdrv[1:5]-a0

8, will be a physical disk offline/on-line

Megacli-pdoffline-physdrv [1:4]-a0

Megacli-pdonline-physdrv [1:4]-a0

9. View Physical Disk Rebuild progress

Megacli-pdrbld-showprog-physdrv [1:5]-a0

or display it in a dynamic visual text interface

Megacli-pdrbld-progdsply-physdrv [1:5]-a0

: http://gcolpart.evolix.net/debian/misc/dell/MegaCli-1.01.24-0.i386.rpm

=============================================

Dell's series of machines, as long as the PERC RAID controller, can be used megarc this command-line tool to detect

Megarc for Windows

Http://www.lsi.com/files/support/rsa/utilities/megaconf/ut_win_megarc_1.10.zip

After decompression, it is Megarc.exe

Megarc for Linux

Http://www.lsi.com/files/support/rsa/utilities/megaconf/ut_linux_megarc_1.11.zip

After using unzip extract, then chmod megarc*

Both Windows and Linux have the same parameters:

Megarc-dispcfg-a0
./megarc-dispcfg-a0

The output results are as follows:

Logical drive:0 (adapter:0): Status:optimal
—————————————————
spandepth:01 Raidlevel:5 rdahead:adaptive Cache
STRIPSZ:064KB stripes:4 Wrpolicy:writeback

Logical Drive 0:spanlevel_0 Disks
CHNL target Startblock Blocks physical target St
—- —— ———- —— ——————
0 0x00000000 0x0887c000 ONLINE
0 0x00000000 0x0887c000 ONLINE
0 0x0887c000 0x00000000 ONLINE
0 0x00000000 0x0887c000 ONLINE

If you want to see through the graphical interface, you have to pack that big guy: Dell OpenManage Server Administrator
There are more than 90 M,win under Linux with more than 100 m.

Dell also has a better tool under Linux: Raidmon (for Win's not found yet)

Currently supports Ide/eide, SCSI raid:lsi logic CERC ATA, perc 4/dc, perc 4/di, perc 4/sc, LSI Logic (formerly AMI) PERC3/DC, PE RC3/DCL, PERC3/QC, PERC3/SC

Perc-cerc-apps-6.03-a06.tar.gz

http://support.dell.com/support/downloads/download.aspx?c=us&l=en&s=gen&releaseid=r71524& formatcnt=2&fileid=92846

After unpacking, there was a megamon-4.0-0a.i386.rpm

/etc/init.d/raidmon Start After installation

# tail-f/var/log/megaserv.log can see the test report. If there is a problem, it will be reflected in this log.

You can also edit the/etc/megamon.conf to add the administrator's mailbox to the end of the file so that when an error is detected, the message is automatically sent.
(mail.35.cn as if it had been filtered out of spam)

Therefore, it is suggested that Megarc (manual) with Raidmon (automatic) is a better solution.

The Dell 1950 PERC 5/i SAS RAID Controller is used with this command-line tool:

MEGACLI for Linux

Http://www.lsi.com/support/downloads/megaraid/miscellaneous/Linux_MegaCLI_1.01.24.zip

MEGACLI for Windows

Http://www.lsi.com/support/downloads/megaraid/miscellaneous/Windows_MegaCLI_1.01.25.zip

# Unzip Linux_megacli_1.01.24.zip
# Unzip Megaclilin.zip
# RPM-IVH megacli-1.01.24-0.i386.rpm

#/opt/megacli-cfgdsply-aall

The output is as follows:

==============================================================================
adapter:0
Product Name:perc 5/i Integrated
memory:256mb
Bbu:present
Serial no:12345
==============================================================================

Raid Level:primary-1, Secondary-0, RAID level Qualifier-0
Size:285568mb
State:optimal

Physical disk:0
Media Error count:0
Other Error count:0
Firmware State:online

Physical Disk:1
Media Error count:0
Other Error count:0
Firmware State:online

Linux view RAID disk array information

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.