Check hardware raid linux

How to Find Hardware RAID Information on Linux

If you want dont know, How to Find Hardware RAID Information on Linux, Then you have come to the right place. This post will help you to Identify your server has physical raid controller or not, if not they may be using software raid. Lets check for physical raid controller. If you are interested in learning, Request you to go through the below recommended tutorial.

How to Find Hardware RAID Information on Linux

In order to get any hardware information or specification about the server. you can use lspci command. This command will give us a very long output with all hardware details in low level format. So better use grep command to filter the specific information.

But We want only raid information from the server, use grep command to search for the word raid.

[root@selva ~]# lspci -vv | grep -i raid
01:00.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS 2208 [Thunderbolt] (rev 01)
Kernel driver in use: megaraid_sas
Kernel modules: megaraid_sas

The above example output shows exact raid controller specifications we are looking for. but we are not sure whether the raid has been configured or not. From the above output, it is confirmed that we have raid controller available in server.

Lets find any raid been configured or not.

In every linux, we have a file called /proc/scsi/scsi where all information about scsi device or disk will be mentioned by the kernel.

So, use cat command and open the file /proc/scsi/scsi

[root@selva ~]# cat /proc/scsi/scsi
Attached devices:
Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: MegaRAID Model: LD 0 RAID5 699G Rev: 513O
Type: Direct-Access ANSI SCSI revision: 02

If your server configured with any raid, here you can find the details. In the above example it shows as RAID 5.

Nowadays all raid controller manufacturers provide you cmd based utility and web-based utility. This will make you to easily identify much more information.

For HP systems, this helps narrow down to a particular model or part number.

HP setups are fairly easy. You can cat /proc/driver/cciss/cciss* and receive an output like,

cciss1: HP Smart Array P800 Controller
Board ID: 0x3223103c
Firmware Version: 4.12
IRQ: 122
Logical drives: 2
Current Q depth: 0
Current # commands on controller: 0
Max Q depth since init: 217
Max # commands on controller since init: 386
Max SG entries since init: 31
Sequential access devices: 0

cciss/c1d0: 587.12GB RAID 1(1+0)
cciss/c1d1: 1000.17GB RAID 1(1+0)

Читайте также:  Linux detect file system

Keep practicing and have fun. Leave your comments if any. Support Us: Share with your friends and groups.

Источник

Checking Hardware RAID status Live

I want to check the Hardware RAID status of my host. I know there is a way to check it from the Server Vendor has their own command line utility for checking the performing of all the physical devices. Is there any third party Package which can give me the status of my current RAID . Edited as per the Answer smartctl not working

# lspci | egrep -i 'raid|adaptec' 01:00.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS 2008 [Falcon] (rev 03) # smartctl -d scsi --all /dev/sg1 -H smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-573.3.1.el6.x86_64] (local build) Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net Vendor: IBM Product: ServeRAID M1015 Revision: 2.12 User Capacity: 597,998,698,496 bytes [597 GB] Logical block size: 512 bytes Logical Unit id: 0x600605b003e420c016766a6e4652e202 Serial number: 0002e252466e6a7616c020e403b00506 Device type: disk Local Time is: Thu Mar 3 21:26:11 2016 IST Device does not support SMART Error Counter logging not supported Device does not support Self Test logging 

2 Answers 2

I was able to find and install storcli package in my Server and now I am able to find the drive failure.

Below is the step to follow

[root@GURUWEBII tmp]# rpm -ivh storcli-1.03.11-1.noarch.rpm Preparing. ########################################### [100%] package storcli-1.03.11-1.noarch is installed [root@GURUWEBII tmp]# /opt/MegaRAID/storcli/storcli64 /c0 show all PD LIST : ======= ------------------------------------------------------------------------- EID:Slt DID State DG Size Intf Med SED PI SeSz Model Sp ------------------------------------------------------------------------- 64:0 8 Onln 0 278.464 GB SAS HDD N N 512B MBF2300RC U 64:1 12 Onln 0 278.464 GB SAS HDD N N 512B MBF2300RC U 64:2 10 UBad - 278.464 GB SAS HDD N N 512B ST9300603SS U 64:3 9 Onln 0 278.464 GB SAS HDD N N 512B ST9300603SS U ------------------------------------------------------------------------- EID-Enclosure Device ID|Slt-Slot No.|DID-Device ID|DG-DriveGroup DHS-Dedicated Hot Spare|UGood-Unconfigured Good|GHS-Global Hotspare UBad-Unconfigured Bad|Onln-Online|Offln-Offline|Intf-Interface Med-Media Type|SED-Self Encryptive Drive|PI-Protection Info SeSz-Sector Size|Sp-Spun|U-Up|D-Down|T-Transition|F-Foreign 

Sample output of my disk which was failed.

Источник

Использование smartctl для проверки RAID контроллеров Adaptec под Linux

Команду «smartctl -d ata -a /dev/sdb» можно использовать для проверки жесткого диска и текущего состояния его соединения с системой. Но как с помощью команд smartctl проверить SAS или SCSI диски, спрятанные за RAID контроллером Adaptec в системах под управлением Linux ОС? Для этого необходимо использовать последовательные синтаксисы проверки SAS или SATA. Как правило — это логические диски для каждого массива физических накопителей в операционной системы. Команду /dev/sgX возможно использовать в качестве перехода через контроллеры ввода/вывода, которые обеспечиваюь прямой доступ к каждому физическому диску, подключенному к RAID контроллеру Adaptec.

Распознает ли Linux контроллер Adaptec RAID?

Для проверки Вы можете использовать следующую команду:

# lspci | egrep -i 'raid|adaptec' 

В результате выполнения команды получите следующее:

81:00.0 RAID bus controller: Adaptec AAC-RAID (rev 09) 

Загрузка и установка Adaptec Storage Manager для Linux

Необходимо установить Adaptec Storage Manager в соответсвии собранному дисковому массиву.

Читайте также:  Microsoft project для linux

Проверяем состояния SATA диска

Команда для сканирования накопителя выглядит довольно просто:

В результате у Вас должно получится следующее:

/dev/sda -d scsi # /dev/sda, SCSI device 

Таким образом, /dev/sda — это одно устройство, которое было определено как SCSI устройство. Выходит, что у нас SCSI собран из 4 дисков, расположенных в /dev/sg . Введите следующую smartclt команду, чтобы проверить диск позади массива /dev/sda:

# smartctl -d sat --all /dev/sgX # smartctl -d sat --all /dev/sg1 

Контроллер должен сообщать о состоянии накопителя и уведомлять про ошибки (если такие имеются):

# smartctl -d sat --all /dev/sg1 -H 

Для SAS диск используют следующий синтаксис:

# smartctl -d scsi --all /dev/sgX # smartctl -d scsi --all /dev/sg1 ### Ask the device to report its SMART health status or pending TapeAlert message ### # smartctl -d scsi --all /dev/sg1 -H 

В результате получим что то похожее на:

smartctl version 5.38 [x86_64-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen Home page is http://smartmontools.sourceforge.net/ Device: SEAGATE ST3146855SS Version: 0002 Serial number: xxxxxxxxxxxxxxx Device type: disk Transport protocol: SAS Local Time is: Wed Jul 7 04:34:30 2010 CDT Device supports SMART and is Enabled Temperature Warning Enabled SMART Health Status: OK Current Drive Temperature: 24 C Drive Trip Temperature: 68 C Elements in grown defect list: 0 Vendor (Seagate) cache information Blocks sent to initiator = 1857385803 Blocks received from initiator = 1967221471 Blocks read from cache and sent to initiator = 804439119 Number of read and write commands whose size segment size = 45998 Vendor (Seagate/Hitachi) factory information number of hours powered up = 13224.42 number of minutes until next internal SMART test = 42 Error counter log: Errors Corrected by Total Correction Gigabytes Total ECC rereads/ errors algorithm processed uncorrected fast | delayed rewrites corrected invocations [10^9 bytes] errors read: 58984049 1 0 58984050 58984050 3151.730 0 write: 0 0 0 0 0 9921230881.600 0 verify: 1308 0 0 1308 1308 0.000 0 Non-medium error count: 0 No self-tests have been logged Long (extended) Self Test duration: 1367 seconds [22.8 minutes] 

А вот команда для проверки следующего диска с интерфейсом SAS, названного /dev/sg2:

# smartctl -d scsi --all /dev/sg2 -H 

В /dev/sg1 заменяется номер диска. Например, если это RAID10 из 4-х дисков, то будет выглядеть так:

/dev/sg0 - RAID 10 контроллер. /dev/sg1 - Первый диск в массиве RAID 10. /dev/sg2 - Второй диск в массиве RAID 10. /dev/sg3 - Третий диск в массиве RAID 10. /dev/sg4 - Четвертый диск в массиве RAID 10. 

Проверить жесткий диск можно с помощью следующих команд:

# smartctl -t short -d scsi /dev/sg2 # smartctl -t long -d scsi /dev/sg2 
-t short : Запуск быстрого теста. -t long : Запуск полного теста. -d scsi : Указывает scsi, как тип устройства. --all : Отображает всю SMART информацию для устройства. 

Использование Adaptec Storage Manager

Другие простые команды для проверки базового состояния выглядят следующим образом:

# /usr/StorMan/arcconf getconfig 1 | more # /usr/StorMan/arcconf getconfig 1 | grep State # /usr/StorMan/arcconf getconfig 1 | grep -B 3 State 
Device #0 Device is a Hard drive State : Online -- S.M.A.R.T. : No Device #1 Device is a Hard drive State : Online -- S.M.A.R.T. : No Device #2 Device is a Hard drive State : Online -- S.M.A.R.T. : No Device #3 Device is a Hard drive State : Online 

Обратите внимание на то, что более новая версия arcconf расположена в архиве /usr/Adaptec_Event_Monitor. Таким образом, весь путь должен выглядеть так:

# /usr/Adaptec_Event_Monitor/arcconf getconfig [AD | LD [LD#] | PD | MC | [AL]] [nologs] 
Prints controller configuration information. Option AD : Информация исключительно о контроллере Adapter LD : Информация исключительно о логических устройствах LD# : Дополнительная информация об указанном логическом устройстве PD : Информация исключительно о физическом устройстве MC : Информация исключительно о Maxcache 3.0 AL : Вся информация 

Вы можете самостоятельно проверить состояние массива Adaptec RAID на Linux с помощью ввода простой команды:

Читайте также:  Linux where is jdk

# /usr/Adaptec_Event_Monitor/arcconf getconfig 1

# /usr/StorMan/arcconf getconfig 1 

Примерный результат на фото:

По традиции, немного рекламы в подвале, где она никому не помешает. Напоминаем, что в связи с тем, что общая емкость сети нидерландского дата-центра, в котором мы предоставляем услуги, достигла значения 5 Тбит / с (58 точек присутствия, включения в 36 точек обмена, более, чем в 20 странах и 4213 пиринговых включений), мы предлагаем выделенные серверы в аренду по невероятно низким ценам, только неделю!.

Источник

linux + How to verify hardware or software RAID?

Is it possible to know by Linux command if my RAID is HW or SW RAID? for example in my machine — BLADE from dell MANUFACTURE by /ptoc/mdstat seems my RAID is «SW RAID» ?

cat /proc/mdstat Personalities : [raid1] md1 : active raid1 sdr2[1] sdq2[0] 390054912 blocks super 1.2 [2/2] [UU] bitmap: 1/3 pages [4KB], 65536KB chunk md0 : active raid1 sdr1[1] sdq1[0] 524224 blocks super 1.0 [2/2] [UU] bitmap: 0/1 pages [0KB], 65536KB chunk 
lsblk vg00-lv_root 253:0 0 50G 0 lvm / └─md1 9:1 0 372G 0 raid1 ├─sdq2 65:2 0 372.1G 0 part │ └─sdq 65:0 0 372.6G 0 disk └─sdr2 65:18 0 372.1G 0 part └─sdr 65:16 0 372.6G 0 disk vg00-lv_swap 253:1 0 16G 0 lvm [SWAP] └─md1 9:1 0 372G 0 raid1 ├─sdq2 65:2 0 372.1G 0 part │ └─sdq 65:0 0 372.6G 0 disk └─sdr2 65:18 0 372.1G 0 part └─sdr 65:16 0 372.6G 0 disk vg00-lv_var 253:2 0 100G 0 lvm /var └─md1 9:1 0 372G 0 raid1 ├─sdq2 65:2 0 372.1G 0 part │ └─sdq 65:0 0 372.6G 0 disk └─sdr2 65:18 0 372.1G 0 part └─sdr 65:16 0 372.6G 0 disk mdadm --detail /dev/md1 /dev/md1: Version : 1.2 Creation Time : Mon Jun 26 13:14:03 2017 Raid Level : raid1 Array Size : 390054912 (371.99 GiB 399.42 GB) Used Dev Size : 390054912 (371.99 GiB 399.42 GB) Raid Devices : 2 Total Devices : 2 Persistence : Superblock is persistent Intent Bitmap : Internal Update Time : Sun Jul 9 12:45:29 2017 State : clean Active Devices : 2 Working Devices : 2 Failed Devices : 0 Spare Devices : 0 Name : localhost:1 UUID : b13eee32:f5894d0c:23aaf608:a67290c9 Events : 605 Number Major Minor RaidDevice State 0 65 2 0 active sync /dev/sdq2 1 65 18 1 active sync /dev/sdr2 

Источник

Оцените статью
Adblock
detector