Linux hardware raid info

Могу ли я обнаружить аппаратную информацию RAID из Linux?

Когда я нахожусь в Linux, я могу получить следующую информацию lsblk (нерелевантные диски удалены из вывода):

Когда я вручную извлекаю диски из сервера, я могу сказать, что физически использую следующие диски:

Поскольку на сервере больше физической памяти, чем в Linux, это означает, что я, очевидно, использую какую-то систему RAID. Приложив немного математики, я часто могу выяснить, какой тип системы RAID используется.

Есть ли способ для меня, чтобы определить, использую ли я аппаратный RAID изнутри Linux , и выяснить всю информацию о нем (например, тип RAID, доступные диски), не выключая сервер, физически вытаскивая диски, и читаете их ярлыки?

Может ли эта информация быть собрана изнутри Linux, или цель аппаратного RAID — сделать базовую систему невидимой для операционной системы?

Способ получения информации о RAID будет полностью зависеть от используемого вами RAID-контроллера. Часто у производителей есть инструменты, которые можно загрузить с их веб-сайта, которые можно использовать для запроса контроллера RAID и получения этой информации.

Чтобы узнать, какой RAID-контроллер вы используете, попробуйте одну из следующих команд:

Утилита lspci

Здесь мы ищем информацию «3ware Inc 9690SA SAS / SATA-II RAID PCIe» .

lsscsi

Команда недоступна в Debian и Ubuntu, но быстрое sudo apt-get install lsscsi извлечение ее из репозиториев. Обратите внимание, что если вы не используете контроллер RAID, здесь указывается производитель и номер модели вашего жесткого диска.

Здесь мы видим, что производитель — «AMCC», а номер модели карты RAID — «9690SA-8I» . Быстрый поиск в Google показывает, что эта карта также известна как «AMCC 3Ware 9690SA-8I» .

Третий метод (который дает довольно мало выходных данных) — использовать lshw команду. Запустите lshw -class disk с правами root, чтобы отображать только информацию о жестких дисках (включая информацию о RAID).

Поиск инструментов RAID-контроллера

Теперь, когда у нас есть производитель и номер модели, должна появиться возможность найти инструменты на их веб-сайте или, по крайней мере, узнать подробности Google о том, как найти и использовать инструменты для этого конкретного контроллера.

Если производитель отображается в этом списке, посмотрите эти ответы для получения дополнительной информации о том, как получить информацию о RAID для вашей карты:

Запуск что — то подобное lspci -knn | grep ‘RAID bus controller’ .

Используя этот вывод, Google (например) для LSI Logic / Symbios Logic MegaRAID SAS 2208 .

Найти его использует storcli утилита для опроса контроллера RAID.

Загрузите и установите его.

storcli64 show дает вам конкретную модель контроллера, а также индекс контроллера, количество групп дисков и виртуальных дисков.

storcli64 /c0/d0 show показывает первый контроллер, первую группу дисков. Сообщает вам уровни рейда, в том числе и вложения.

storcli64 /c0/eall/sall show all показывает всю информацию на всех дисках.

Дополнительные справочные данные для этих команд можно найти здесь:

Должно быть все, что вам нужно сделать. Просто используйте обычный аппаратный самоанализ в Linux, затем Google, затем загрузите и установите необходимые утилиты.

Предложения и комментарии @ Джина абсолютно точны.

Этот ответ полностью зависит от результатов, которые вы получаете от lspci команды, и от возможности вашего поиска в Google определить производителя и подобрать правильный инструмент командной строки.

Но это показывает, что вы можете получить все это с сервера, из командной строки, не останавливая машину, не открывая корпус и не вытаскивая диски, что, я надеюсь, полезно.

Это не универсальный ответ, и он не дает вам всей необходимой информации, но на одном используемом нами аппаратном RAID-контроллере Adaptec он дает некоторый доступ к самим дискам через специальные устройства / dev / sg1 / dev / sg2 и т. д. Мы можем запустить smartctl -a / dev / sg1, чтобы получить много информации об этом физическом диске, включая производителя, номер модели, интерфейс, серийный номер, размер и другие данные.

Что касается выяснения того, какой контроллер используется, я согласен с комментарием Джина о dmidecode, dmesg и lspci — я бы тоже попробовал сначала.

Читайте также:  Перезагрузить сеть linux debian

Для создания профиля хранилища я бы сделал следующее перед запуском lspci или загрузкой чего-либо.

3ware

Это было проверено на следующих RAID-контроллерах: 9690SA-8I

Пожалуйста, дайте мне знать в комментариях, работает ли он для вашего конкретного контроллера, или если инструкции нуждаются в обновлении для вашей модели.

загрузка

Во-первых, вам нужно скачать инструмент tw_cli . Это можно найти на веб-сайте Avago Technologies *:

* Не волнуйтесь, это не сторонний сайт; 3ware было куплено AMCC, а затем продано корпорации LSI, которая позже стала частью Avago [ источник ]. Чтобы подтвердить это, обратите внимание, что 3ware.com перенаправляет на соответствующую страницу на avagotech.com .

Введите tw_cli в строку поиска, а затем перемещайтесь, пока не найдете название загрузки CLI Linux — from the 10.2.2.1/9.5.5.1 code sets (номер последней версии может отличаться от указанного здесь)

Извлеките zip-файл, и либо в, x86 либо x86_64 вы найдете tw_cli бинарный файл, который вам нужен. Сохраните этот двоичный файл на свой сервер или компьютер.

Запуск tw_cli

ПРИМЕЧАНИЕ: (1) Утилита командной строки, возможно, должна запускаться от имени пользователя root. (2) Запустите его так же, как любой другой двоичный файл, либо добавив его в путь, либо запустив его непосредственно из текущего каталога с помощью ./tw_cli .

Сначала запустите tw_cli show список доступных контроллеров RAID в вашей системе:

Здесь мы видим, что подключен один контроллер с идентификатором c2 (запомните этот идентификатор!), К которому подключено 6 физических дисков. Чтобы получить более подробную информацию о том, какие диски подключены к устройству, запустите tw_cli /c2 show (заменив /c2 его идентификатором вашего контроллера):

Первая группа показывает используемые настройки RAID. Вторая группа показывает, какие диски в настоящее время физически подключены к серверу.

В этом конкретном случае у меня есть две конфигурации RAID:

  • u0 -> Диски p0 и p1 оба диска по 300 ГБ одного и того же производителя, настроенные на использование RAID-1 (точные зеркала друг друга)
  • u1 -> У меня есть четыре 1TB Hitachi дисков ( p2 через p5 ) , установленные с использованием RAID-5 ( «один из дисков» используются для сохраняются уверены данные , если какая — либо один из других дисков не получится ). Это означает (как мы видим сверху), u1 имеет 3 ТБ (или, скорее, 2793.94 GB ) полезных данных.

Еще больше информации о состоянии и работоспособности накопителей можно найти, запустив tw_cli /c2/u0 show или tw_cli /c2/p0 show . Более подробную информацию и команды можно найти на страницах руководства .

Источник

How to check RAID configuration in Linux

How to check current RAID configuration in Linux

RAID is an acronym for Redundant Array of Independent Disks. It is nothing but combined single virtual device created from disk drives or partitions. Some RAID levels include redundancy and so can survive some degree of device failure. Linux support following RAID devices:

  1. RAID0 (striping)
  2. RAID1 (mirroring)
  3. RAID4
  4. RAID5
  5. RAID6
  6. RAID10
  7. MULTIPATH
  8. FAULTY
  9. CONTAINER

Check RAID configuration in Linux

The /proc/mdstat is a special file that stores essential information about all presently active RAID devices. Type the following cat command:
cat /etc/mdadm.conf
Or
cat /proc/mdstat

From the above output, it is clear that I have RAID 10 viraul device made of 5 disk partitions as follows:

  • md125 – RAID device file name
  • active raid10 – RAID type
  • sde3[3] sdb3[2] sdc3[1] sdd3[4] sda3[0] – RAID 10 device named /dev/md125 made of five partitions (also known as “component device”)
  • [UUUUU] – Shows status of each device of raid member disk/partition. The “U” means the device is healthy and up/running. The “_” means the device is down or damaged

Reviewing RAID configuration in Linux

Want to determine whether a specific device is a RAID device or a component device, run:
# mdadm —query /dev/DEVICE
# mdadm —query /dev/md125
# mdadm —query /dev/md12

Источник

Find out RAID Controller Type and Model on Linux

Sometimes you need to find out RAID controller type and model on Linux servers, and this can become a tricky situation if you don’t know the right commands. On this post we will explore exactly that, how to get your Raid type and Model.

Linux Command to find out Raid Controller Type and Model

lshw and lspci are commands that we will be using to get the needed RAID information.

Читайте также:  Select windows side by side

On Ubuntu and Debian systems:

Install lshw and lspci

For CentOS / RHEL users:

The output should be something like this:

Then type this command to get RAID controller information:

This is the output on my system:

Now let’s find out the RAID type using lspci command.

In my case, it displays the RAID controller type and model exactly as I needed:

Getting advanced information from your Raid configuration

lshw can be used to get more information about Raid type and configuration, use this command:

Get the exact Hardware RAID Level

The RAID hardware controller isolates the OS from the raw disks. And the only way to know the exact RAID level is by first installing the raid card utilities provided by the manufacturer.

Yo can also get Hardware RAID Level information from your system startup, you can check out on your bios for detected hardware, and also there is usually a Raid startup application that check/print/monitor/control things.

Get the exact Software RAID Level

You can use dmraid command if you built your Raid using software.

This will list and discover all raid devices, along with format and RAID level used

Now you know how to detect if you have RAID controller on your system or not, and also a way to find out RAID Controller Type, Model, and also to know the RAID level type.

Источник

Can I detect hardware RAID infromation from inside Linux?

When I’m inside of Linux, I can get the following information from lsblk (irrelevant drives removed from output):

When I manually pull the drives out of the server, I can tell I’m physically using the following drives:

Because there is more physical storage in the server than available space in Linux, this means I’m obviously using some form of RAID system. With a bit of math, I can often figure out what type of RAID system is being used.

Is there a way for me to detect if I’m using hardware RAID from inside of Linux, and figure out all the information about it (such as type of RAID, available drives) without turning off the server, physically pulling the drives out, and reading their labels?

Can this information be gathered from inside of Linux, or is the point of hardware RAID to make the underlying system «invisible» to the operating system?

6 Answers 6

How to get the RAID information is going to depend entirely on the RAID controller you are using. Often, manufacturers will have tools that can be downloaded from their website which can be used to query the RAID controller and get this information.

In order to find which RAID controller you are using, try one of the following commands:

lspci

Here, the information we are looking for is «3ware Inc 9690SA SAS/SATA-II RAID PCIe».

lsscsi

The command is not available on Debian and Ubuntu, but a quick sudo apt-get install lsscsi will fetch it from the repos. Note, if you are not using a RAID controller, the manufacturer and model number of your harddrive will show up here instead.

Here we see the manufacturer is «AMCC» and the model number of the RAID card is «9690SA-8I». A quick Google search shows that this card is also known as «AMCC 3Ware 9690SA-8I».

A third method (which gives quite a bit of output data) is to use the lshw command. Run lshw -class disk as root to only display the details about harddrives (which includes RAID information).

Finding the RAID controller tools

Now that we have the manufacturer and model number, it should be possible to find the tools on their website, or at least be able to Google details on how to find and use the tools for that specific controller.

If the manufacturer shows up in this list, see these answers for more details on how to get the RAID information for your card:

Run something like lspci -knn | grep ‘RAID bus controller’ .

Using that output, Google (for example) for LSI Logic / Symbios Logic MegaRAID SAS 2208 .

Find it uses the storcli utility to interrogate the RAID controller.

Читайте также:  Asus a52j drivers windows 10

Download it and install it.

storcli64 show gives you the model of controller specifically, and the controller index, number of drive groups, and virtual drives.

storcli64 /c0/d0 show shows you first controller, first drive group. Tells you raid levels, including nesting.

storcli64 /c0/eall/sall show all shows you all the information on all the disks.

Further reference data for those commands can be found here:

Should be all you have to do. Just use the normal hardware introspection in Linux, then Google, then download and install the utilities that go with it.

@Gene’s suggestions and comments are absolutely spot-on.

This answer is entirely specific to the output you get from the lspci command, and the ability for your Google search to identify the manufacturer and to grab the correct command line tool.

But it does show that you can get all of this from a server, on a command line, without halting the machine, opening the case, and pulling drives, which I hope is helpful.

For creating a storage profile, I’d do the following before running lspci or downloading anything.

This isn’t a one-size-fits-all answer and doesn’t give you all the information you need, but on one Adaptec hardware RAID controller we’ve used it. It gave some access to the drives themselves via special devices /dev/sg1 , /dev/sg2 , etc.

We could run smartctl -a /dev/sg1 to get a lot of info on that physical drive including manufacturer, model number, interface, serial number, size, and other data.

As far as figuring out which controller is being used, I agree with Gene’s comment about dmidecode , dmesg , and lspci — those would be my ones to try first as well.

3ware

This has been tested on the following RAID controllers: 9690SA-8I

Please let me know in the comments if it worked for your specific controller, or if the instructions need updating for your model.

Downloading

First, you need to download the tool tw_cli . This can be found on the Avago Technologies website*:

* Don’t worry, it’s not a third party website; 3ware was purchased by AMCC, and then later sold to the LSI Corporation, which later became part of Avago [source]. To back this up, note that 3ware.com redirects to the relevant page on avagotech.com.

Type tw_cli into the search bar, then navigate around until you find a download named CLI Linux — from the 10.2.2.1/9.5.5.1 code sets (the latest version number may be different than what is listed here)

Extract the zip file, and in either the x86 or x86_64 you will find the tw_cli binary that you need. Save this binary to your server or computer.

Running tw_cli

NOTE: (1) The command-line utility may need to run as root. (2) Run it as you would any other binary by either adding it to the path, or by running it directly from the current directory with ./tw_cli .

First, run tw_cli show to list which RAID controllers are available on your system:

Here we can see there is one controller attached, with the id of c2 (remember this id!), which has 6 physical drives attached. To get more details about which drives are attached to the unit, run tw_cli /c2 show (replacing /c2 with the ID of your controller):

The first group shows the RAID setups being used. The second group shows which drives are currently physically attached to the server.

In this particular case, I have two RAID configurations:

  • u0 -> Drives p0 and p1 are both 300 GB drives by the same manufacturer, set up to use RAID-1 (exact mirrors of each other)
  • u1 -> I have four 1TB Hitachi drives ( p2 through p5 ) set up using RAID-5 («one of the drives» is used to make sure data is preserved if any one of the other drives fails). This means (as we can see from the top), u1 has 3TB (or, rather, 2793.94 GB ) of usable data.

Even more information about the status and health of the drives can be found by running tw_cli /c2/u0 show or tw_cli /c2/p0 show . More details and commands can be found in the man pages.

Источник

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