How to view soft and hard raid information in CentOS

Source: Internet
Author: User
Tags dell openmanage

How to view soft and hard raid information in CentOS
Software raid: You can only view cat/proc/mdstat on the Linux system to view raid level, status, and other information. Hardware raid: the best solution is to use the installed raid vendor's management tools to check whether there is a broken line or a graphical interface. For example, the Adaptec hardware card can be viewed through the following command: #/usr/dpt/raidutil-L all can see very detailed information. Of course, in more cases, there is no corresponding management tool installed. If you only need to rely on Linux itself, I generally know two methods: # dmesg | grep-I raid # cat/proc/scsi displays similar information, such as the raid manufacturer, model, and level, but cannot view the information of each hard disk. In addition, after actual tests, Dell servers can be displayed through commands, while servers such as HP and IBM cannot be displayed through the above commands. You can only view the information by installing the management tools of hardware vendors. Cat/proc/scsi can be seen as a device on SCSI. Generally, you can see the RAID level. The model of the RAID card is displayed in lspci. ========================================================== ========================== Rpm-ivh MegaCli-1.01.09-0.i386.rpm command use: megaCli-LDInfo-Lall-aALL query raid level MegaCli-AdpAllInfo-aALL query raid card information MegaCli-PDList-aALL view hard disk information MegaCli-AdpBbuCmd-aAll view battery information MegaCli-FwTermLog- aALL common parameters for viewing RAID card logs MegaCli-adpCount [display adapter count] MegaCli-AdpGetTime-aALL [display adapter time] MegaCli-AdpAllInfo-aAll [display all adapter information] MegaCli-LDInfo -LALL -AAll [display information of all Logical Disk groups] MegaCli-PDList-aAll [display all physical information] MegaCli-AdpBbuCmd-GetBbuStatus-aALL | grep 'charger status' [view charging Status] MegaCli -AdpBbuCmd-GetBbuStatus-aALL [display BBU status information] MegaCli-AdpBbuCmd-consumer-aALL [display BBU capacity information] MegaCli-AdpBbuCmd-GetBbuDesignInfo-aALL [display BBU design parameters] MegaCli- adpBbuCmd-GetBbuProperties-aALL [display current BBU attributes] MegaCli-cfgdsply-aALL [display RAID card model, raid settings and Disk information: changes in the tape status, from Disk pulling to Disk insertion.. Device | Normal | Damage | Rebuild | NormalVirtual Drive | Optimal | Degraded | OptimalPhysical Drive | Online | Failed-> Unconfigured | Rebuild | Online ======== ==================================== MegaCli, preparing the new version of MegaCli-1.01.24-0.i386.rpm will install the program under/opt, you can customize the installation directory, such as: rpm-relocate/opt/=/usr/sbin/-I MegaCli-1.01.24-0.i386.rpm to replace the installation directory/opt with/usr/sbin. View all physical disk information MegaCli-PDList-aALLAdapter #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: 0Raw Size: 140014 MB [0x11177328 Sectors] Non Coerced Size: 139502 MB [0x11077328 Sectors] Coerced Size: 139392 MB [0x11040000 Sectors] Firmware state: HotspareSAS Address (0): 0x5000c50008e5cca9 SAS Address (1): 0 × 0Inquiry Data: SEAGATE ST3146855SS S5273LN4Y1X0 ..... 2. view the disk Cache Policy MegaCli-LDGetProp-Cache-L0-a0Adapter 0-VD 0: Cache Policy: WriteBack, ReadAheadNone, DirectorMegaCli-LDGetProp-Cache-L1-a0Adapter 0-VD 1: Cache Policy: writeBack, ReadAheadNone, DirectorMegaCli-LDGetProp-Cache-LALL-a0Adapter 0-VD 0: Cache Policy: WriteBack, ReadAheadNone, DirectAdapter 0-VD 1: Cache Policy: WriteBack, ReadAheadNone, directorMegaCli-LDGetProp-Cache-LALL-aALLAda Pter 0-VD 0: Cache Policy: WriteBack, ReadAheadNone, DirectAdapter 0-VD 1: Cache Policy: WriteBack, ReadAheadNone, DirectorMegaCli-LDGetProp-DskCache-LALL-aALLAdapter 0-VD 0: Disk Write Cache: disk's DefaultAdapter 0-VD 1: Disk Write Cache: Disk's Default3, setting the Disk Cache policy explanation: WT (Write throughWB (Write back) NORA (No read ahead) an example of CachedDirect for RA (Read ahead) ADRA (Adaptive read ahead): MegaCli-LDSetPr Op WT | WB | NORA | RA | ADRA-L0-a0 (before modification, you may need to modify BBU: MegaCli-LDSetProp CachedBadBBU-Lall-aALL) orMegaCli-LDSetProp-Cached |-Direct-L0-a0orenable/disable disk cacheMegaCli-LDSetProp-EnDskCache |-DisDskCache-L0-a04 create/delete arrays 4.1 create a raid5 array, the physical disk consists of 2, 3, and 4. The hot spare disk of this array is a physical disk 5 MegaCli-memory ldadd-r5 [,] WB Direct-MK []-a04.2 to create an array, do not specify Hot Standby MegaCli-Batch ldadd-r5 [,] WB Direct-a04.3 Delete array Me GaCli-removed lddel-L1-a04.4 online Add the disk MegaCli-LDRecon-Start-r5-Add-PhysDrv []-L1-a0, which means recreating the Logical Disk group 1, if the raid level is 5, add the physical disk number: 1: 4. After the rebuild, the newly added physical disk is automatically in the rebuild (synchronization) State. At this time, the fdisk-l cannot see the larger space of the array. It can only be seen after the system is restarted. If there is only one partition under the array, the partition will also increase directly. If there are multiple partitions, I don't know how to allocate new space? If you have time, try again. 5. View array initialization information. 5.1 After the array is created, there will be a process of initializing the synchronization block. You can check its progress. MegaCli-LDInit-ShowProg-LALL-aALL or display MegaCli-LDInit-ProgDsply-LALL-aALL5.2 on the dynamic visual text interface to view the array background initialization progress MegaCli-LDBI-ShowProg-LALL-aALL or megaCli-LDBI-ProgDsply-LALL-aALL6 is displayed on the dynamic visual text interface. Create a global hot standby instance and specify 5th disks as the global hot standby instance. ]-PhysDrv []-a0 can also be specified as a Dedicated Hot Standby MegaCli-pdmk-Set [-Dedicated [-Array1] [-EnclAffinity] [-nonRevertible]- physDrv []-a07: delete global hot standby Mega Cli-pdmk-Rmv-PhysDrv []-a08. deprecate/launch a physical disk MegaCli-PDOffline-PhysDrv []-a0MegaCli-PDOnline-PhysDrv []-a09, view the physical disk reconstruction progress MegaCli-PDRbld-ShowProg-PhysDrv []-a0 or display MegaCli-PDRbld-ProgDsply-PhysDrv []-a0 on the dynamic visual text interface: http://gcolpart.evolix.net/debian/misc/dell/MegaCli-1.01.24-0.i386.rpm=============================================Dell series of machines, as long as the RAID Controller PERC, can use MegaRC command line tool To detect MegaRC for Windowshttp: // unzip megarc.exe MegaRC for Linuxhttp: // unzip it, And then chmod 700 megarc * has the same parameters in Windows and Linux: megarc-dispcfg-a0./megarc-dispcfg-a0 output result: Logical Drive: 0 (Adapter: 0): Status: OPTIMAL --------------- SpanDepth: 01 Rai DLevel: 5 RdAhead: Adaptive CacheStripSz: 064KB Stripes: 4 WrPolicy: WriteBackLogical Drive 0: spanLevel_0 DisksChnl Target StartBlock Blocks Physical Target St -- ---- -- ------ 0 00 0 × 00000000 running ONLINE0 01 0 × 00000000 0x0887c000 ONLINE0 02 0 × 00000000 0x0887c000 ONLINE0 03 0 × 00000000 offline ONLINE if you want you can view it through the graphic interface, the big guy must be installed: there are more than 90 M in Dell OpenManage Server AdministratorLinux, and more than 100 M in Win. Dell also has a better tool in Linux: raidmon (not found yet for win) currently supports IDE/EIDE, scsi raid: LSI Logic cerc ata 100, PERC 4/DC, PERC 4/Di, PERC 4/SC, LSI Logic (formerly AMI) PERC3/DC, PERC3/DCL, PERC3/QC, PERC3/SCperc-cerc-apps-6.03-A06.tar.gzhttp: // support.dell.com/support/downloads/download.aspx? C = us & l = en & s = gen & releaseid = R71524 & formatcnt = 2 & fileid = 92846 after unpacking, there is a Megamon-4.0-0a.i386.rpm installed after/etc/init. d/raidmon start # tail-f/var/log/megaserv. log to view the detection report. When there is a problem, this log will be reflected. You can also edit/etc/megamon. conf and add the Administrator's mailbox to the end of the file. When an error is detected, an email is automatically sent. (Mail.35.cn seems to have been filtered out as spam.) Therefore, it is recommended that megarc (manual) and raidmon (automatic) be a better solution. The Dell 1950 PERC 5/I SAS RAID Controller uses this command line tool: MegaCLI for Linuxhttp: // www.lsi.com/support/downloads/megaraid/miscellaneous/Linux_MegaCLI_1.01.24.zipMegaCLI for Windowshttp: // 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 IntegratedMemory: 256 MBBBU: PresentSerial No: 12345 ============================================== ==================================================== RAID level: primary-1, Secondary-0, RAID Level Qualifier-0Size: 285568 MBState: OptimalPhysical Disk: 0 Media Error Count: 0 Other Error Count: 0 Firmware state: OnlinePhysical Disk: 1 Media Error Count: 0 Other Error Count: 0 Firmware state: OnlineWriteback and Writethrough difference between Write caching or write-throughwrite-through means that Write operations do not use cache at all. Data is always directly written to the disk. Disable write cache to release the cache for read operations. (Cache is shared by read/Write operations) Write caching can improve the performance of Write operations. Data is not directly written to the disk, but to the cache. From the application perspective, it is much faster than waiting to complete the disk write operation. Therefore, the write performance can be improved. The Controller writes data not written to the disk in the cache to the disk. On the surface, the Write cache method has better read and write performance than the Write-through method, but it also depends on the disk access method and Disk Load. The write-back (write cache) method is usually faster when the disk load is low. When the load is heavy, every time the data is written into the cache, it is necessary to immediately write to the disk to release the cache to save the new data to be written. If the data is directly written to the disk, the Controller runs at a faster speed. Therefore, when the load is heavy, writing data to the cache first reduces the throughput. Starting and stopping cache flushing levels these two settings affect how the controller processes cache data not written to the disk, and only takes effect in the write-back cache mode. The data written to the disk in the cache is called flushing. You can configure Starting and stopping the flushing levels value, which indicates the percentage of the total cache size occupied. When the data not written to the disk in the cache reaches starting flushing value, the controller starts flushing (written to the disk by the cache ). When the volume of data not written to the disk in the cache is less than the stop flush value, the flushing process stops. The Controller always flush the old cached data first. The cache is automatically flushing after no data is written for more than 20 seconds. A typical start flushing level is 80%. Generally, the stop flushing level is also set to 80%. That is to say, the controller does not allow more than 80% of the cache to be used for write-back cache, but tries to keep this proportion as much as possible. If you use this setting, you can add more unwritten data in the cache memory. This helps improve the performance of write operations, but sacrifices data protection. For data protection, you can use lower start and stop values. By setting these two parameters, you can adjust the Read and Write Performance of the cache. Tests show that the performance of start and stop flushing levels is good. If the stop level value is much lower than the start value, disk congestion will occur during flushing. Cache block size indicates the size of the Cache allocation unit, which can be 4 K or 16 K. Selecting the appropriate value can significantly improve the cache performance. If more applications access data smaller than 8 KB and set the cache block size to 16 KB, only a portion of the cache block is used for each access. 8 K or smaller data is always stored in a 16 K cache block, which means that only 50% of the cache capacity is used effectively, reducing the performance. 4 K is suitable for the transfer of random I/O and small data blocks. On the other hand, if it is continuous I/O and uses a large segment size, it is best to select 16 K. The large cache block size means that the number of cache blocks is small and the cache consumption delay can be shortened. In addition, for data of the same size, the cache block size is larger and the amount of cache data transferred is smaller.

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.