How to view RAID disk array information in Linux _linux

Source: Internet
Author: User
Tags dell openmanage

How to view RAID disk array information under Linux

The following is the information that is found when you build server raid, take notes, don't be interested in friends please disregard.

A way to view soft and hard raid information under Linux.

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

Cat/proc/mdstat

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

Hardware RAID: The best way to see it is through the management tools of an installed RAID manufacturer, with CmdLine and a graphical interface. For example, the Adaptec company's hardware card can be viewed through the following commands:

#/usr/dpt/raidutil-l All

You can see very detailed information.

Of course more cases are not installed with the appropriate management tools, only to rely on Linux itself generally I know two ways:

# DMESG |grep-i raid

# CAT/PROC/SCSI/SCSI

The information displayed is similar to that of the raid manufacturer, model, and level, but it is not possible to view the information on each piece of hard disk.

In addition to the actual test, the Dell server can be displayed through the command, and HP, IBM and other servers through the above command is not displayed. The Dell BMC can be viewed only by installing the hardware manufacturer's administrative tools.

Cat/proc/scsi/scsi

You can see the device on the SCSI. You can see the RAID level in general. LSPCI can see the model of the raid card.

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

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

command to use:

Megacli-ldinfo-lall-aall Check RAID level
Megacli-adpallinfo-aall Check RAID card information
Megacli-pdlist-aall View Hard Drive information
Megacli-adpbbucmd-aall View battery Information
Megacli-fwtermlog-dsply-aall View RAID Card log

Introduction of common parameters of MEGACLI

Megacli-adpcount "Number of display adapters"
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 "Display BBU capacity Information"
Megacli-adpbbucmd-getbbudesigninfo-aall "Show Bbu Design Parameters"
Megacli-adpbbucmd-getbbuproperties-aall "Show current BBU Properties"
Megacli-cfgdsply-aall "Display RAID card model, RAID settings, disk related information"

Changes in the state of the tape, from the dial, to the disk in the process.

Device | normal| damage| rebuild| Normal
Virtual Drive | optimal| degraded| degraded| Optimal
Physical Drive | online| Failed–> unconfigured| rebuild| Online

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

MEGACLI Common usage

2008-10-24 09:32

1. Prepare

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

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

That is, replace the installation directory/opt with/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 disk caching 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 Disk caching 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, consisting of a physical disk 2,3,4, the hot spare for the array is the physical disk 5

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

4.2 Create an array, do not specify hot standby

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

4.3 Delete array

Megacli-cfglddel-l1-a0

4.4 Add Disk Online

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

This means that the 1,raid level of the Rebuild Logical Disk group is 5, adding the Physical disk number: 1:4. After the rebuild, the newly added physical disk is automatically in the Rebuild (sync) state, at which point the fdisk-l does not see the space of the array becoming larger and can only be seen after the system reboots. If there is only one partition under the array, then the partition is also directly increased, if there are multiple partitions, do not know how to allocate new space? Have a chance to try, hehe

5. View array Initialization information

After the 5.1 array is created, there is a process of initializing the synchronization block to see its progress.

Megacli-ldinit-showprog-lall-aall

Or as shown in a dynamic visual text interface

Megacli-ldinit-progdsply-lall-aall

5.2 View the progress of array background initialization

Megacli-ldbi-showprog-lall-aall

Or as shown in a dynamic visual text interface

Megacli-ldbi-progdsply-lall-aall

6, create a global hot standby

Specify 5th disk as global hot standby

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

You can also specify a dedicated hot standby for an array

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

7, delete the global hot standby

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

8, a piece of physical disk line/online

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 as shown in a dynamic visual text interface

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

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

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

The Dell series of machines, as long as the PERC RAID controller, can be detected using the Megarc command-line tool

Megarc for Windows

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

After decompression, it's megarc.exe.

Megarc for Linux

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

Use unzip solution to compress out, then chmod megarc*

The parameters under Windows and Linux are the same:

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 0x00000000 0x0887c000 ONLINE
0 0x00000000 0x0887c000 ONLINE

If you want to view through the graphical interface, you must install the big one: Dell openmanage Server Administrator
Linux under more than 90 M,win under the more than 100 m.

Dell has a better tool under Linux: Raidmon (for win is not yet found)

Currently supports Ide/eide, SCSI raid:lsi Logic CERC ATA-MB, 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 the unpack, there's a megamon-4.0-0a.i386.rpm.

/etc/init.d/raidmon Start After installation end

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

You can also edit the/etc/megamon.conf and add the administrator's mailbox to the end of the file, so that when the error is detected, the message is automatically sent.
(mail.35.cn seems to be filtered out as junk mail)

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

The Dell 1950 PERC 5/i SAS RAID Controller uses 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

The contents of this article are all finished, I hope to be useful for you, for more information, please continue to pay attention to the cloud Habitat community website.

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.