Linux hp smart array driver

Software Delivery Repository

The Ubuntu HP Dynamic Smart Array Driver (hpdsa) allows you to use b-series array controllers (and only b-series array controllers) in «smart array mode.» If you disable smart array mode on your b-series controller ProLiant’s ROM based setup utility (RBSU), the open-source, in-distro ahci driver will pickup the device automatically and you do not need to use the hpdsa driver. However, if you want to utilize the latest storage management tools from HP, or migrate your volumes to a hardware-based p-series Smart Array in the future, you’ll want to use the HP Dynamic Smart Array driver with your hardware in smart array mode.

This driver is freely distributable, however it is closed-source and proprietary to HPE and MicroSemi.

Install Ubuntu with MaaS and hpdsa driver

Download install-time amd64 driver disc

Install Ubuntu with the hpdsa driver

    Flash a USB key with one of the above disc images, using /dev/sdc1 as the example usb partition:

 gunzip hpdsa-1.2.4-140.ubuntu14.04.2.x86_64.img.gz dd if=hpdsa-1.2.4-140.ubuntu14.04.2.x86_64.img of=/dev/sdc1 
inst.dd modprobe.blacklist=ahci 
 chroot /target echo "blacklist ahci" > /etc/modprobe.d/install-hpdsa.conf depmod `uname -r` #note: use ticks, not apostrophes here. update-initramfs -u exit 

Subscribe your system to the ubuntu-hpdsa apt repository

Cut-n-paste the following text into /etc/apt/sources.list.d/ubuntu-hpdsa.list on your system:

# HP Dynamic Smart Array Driver
deb http://downloads.linux.hp.com/SDR/repo/ubuntu-hpdsa trusty main

Import the Hewlett-Packard gpg public key for use with apt

Update your local apt indexes

Install/Update the hpdsa driver

Note: DKMS kernel modules depend on «build-essential, and dkms» package sets.

Источник

И снова про CentOS Linux 7.2 и драйвер контроллера HP Smart Array P400i

Уже после того, как ранее был описан способ использования драйвера cciss для контроллера HP Smart Array P400i в процессе установки CentOS 7.2, мне удалось выяснить немного больше информации по поводу поддержки старых моделей контроллеров Smart Array в RHEL/CentOS v7. В заметках к выпуску 7.0 Release Notes компанией RedHat было объявлено о снятии с поддержки cciss-совместимых контроллеров. С этого момента поддержка контроллеров Smart Array обеспечивалась только драйвером hpsa.

Список снимаемых с поддержки контроллеров оказался таким:

  • Smart Array 5300
  • Smart Array 5i
  • Smart Array 532
  • Smart Array 5312
  • Smart Array 641
  • Smart Array 642
  • Smart Array 6400
  • Smart Array 6400 EM
  • Smart Array 6i
  • Smart Array P600
  • Smart Array P800
  • Smart Array P400
  • Smart Array P400i
  • Smart Array E200i
  • Smart Array E200
  • Smart Array E500
  • Smart Array P700M
Читайте также:  Узнать зависимости пакета linux

В этом же документе можно найти информацию о том, что в драйвере hpsa, который пришёл в RHEL/CentOS v7 на замену cciss имеется поддержка дополнительного параметра hpsa_allow_any=1, который позволяет драйверу выполнять обнаружение старых контроллеров Smart Array.

When the hpsa_allow_any option is used, the hpsa driver allows the use of PCI IDs that are not listed in the driver’s pci-id table. Thus, cards detected when this option is used, are not supported in Red Hat Enterprise Linux 7

image

Отталкиваясь от возможности использования этого параметра, приведу конкретный пример того, как не имея на руках драйвера cciss, но имея лишь поставляемый в составе CentOS 7 драйвер hpsa заставить увидеть в процессе установки ОС диски, подключенные к контроллеру HP Smart Array P400i.

В процессе начально загрузки инсталлятора ОС дождёмся появления загрузочного меню и нажмём любую клавишу, чтобы остановить автоматическую загрузку (например, можно нажать клавишу стрелок вправо/влево).

image

После того, как таймер внизу экрана остановится, выберем в меню пункт Install CentOS 7 и нажмём клавишу Tab. Внизу экрана появится строка параметров загрузки системы, в которую через пробел мы должны добавить текст: hpsa.hpsa_allow_any=1

image

После этого жмём Enter для продолжения загрузки системы, и когда программа установки CentOS 7 будет загружена, сможем убедиться в том, что теперь RAID-том с контроллера HP Smart Array P400i виден и на него можно установить ОС.

image

После того, как установка CentOS 7 будет выполнена нужно будет выполнить перезагрузку сервера. В процессе загрузки установленной системы нам снова потребуется передать требуемый параметр загружаемому драйверу hpsa, иначе установленная система попросту не загрузится. Для этого, во время загрузки, при появлении загрузочного меню, выберем основное загружаемое ядро и нажмём кнопку «e» для правки параметров загрузки

image

Откроется экран редактирования записи загрузчика, переместимся в самый низ, найдём строку начинающуюся с linux16 /vmlinuz…, переместимся курсором до конца этой строки, сделаем пробел и допишем параметр загрузки hpsa.hpsa_allow_any=1.

image

После этого нажмём сочетание клавиш Ctrl + x и система успешно загрузится благодаря добавленному параметру.

Для того, чтобы загрузчик системы использовал вышеописанный параметр драйвера при каждой загрузке, добавим его в конец файла /etc/modprobe.d/modprobe.conf с последующей пересборкой образа initramfs

# Support old HP Smart Array controllers options hpsa hpsa_allow_any=1

Пересобираем образ initramfs. Для этого сначала сделаем резервную копию текущего используемого образа, затем вызовем команду его сборки (с учётом добавленного нами файла modprobe.conf для текущей версии ядра):

# cp /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak # /sbin/dracut -v --force

После того, как последняя команда отработает, перезагружаем сервер и убеждаемся в том, что система успешно загружается с указанным нами параметром:

# cat /sys/module/hpsa/parameters/hpsa_allow_any 1

Теперь возникает резонный вопрос. Какой же драйвер правильней использовать? В интернете мне не удалось найти явных свидетельств за или против относительно использования cciss или hpsa для старых контроллеров Smart Array. Разве что только стоит упомянуть о короткой заметке Goodbye cciss, welcome hpsa! , где можно найти мнение о том, что в определённом сценарии новый драйвер hpsa работает стабильней. Правда в той заметке речь идёт о более новом контроллере P410, который нативно поддерживается hpsa, поэтому повышение стабильности в данном случае наверно показатель закономерный.

Читайте также:  Linux file random data

Стоит отметить то, что hpsa — это SCSI драйвер и создаваемые им в системе дисковые устройства именуются как /dev/sd[*] , в то время как cciss – это блочный драйвер и в системе он создаёт блочные устройства /dev/cciss/c[*]d[*] . Более подобную информацию о технических различиях между драйверами cciss и hpsa можно найти в документе ‘hpsa’ – A SCSI-based Linux device driver for HP Smart Array Controllers, 2nd edition (c02677069.pdf) .

В рамках одной системы могут сосуществовать оба драйвера (например когда в одном сервере используется и новый и старый контроллер Smart Array одновременно), но, возможно, при этом нужно будет учесть ряд нюансов, относительно правильной настройки параметров загрузки этих драйверов, о чём подробно расписано на страничке HP Smart Array CCISS driver .

На данный момент я пока остановился на той мысли, что для устаревших моделей контроллеров Smart Array, перечисленных в ранее обозначенном списке, всё же более правильным будет использование драйвера cciss, и переход на hpsa стоит выполнять только в том, случае если на это есть веские причины. Было бы интересно услышать аргументированные возражения по этому поводу.

Дополнительные источники информации:

Источник

HPSA — Hewlett Packard Smart Array driver¶

This file describes the hpsa SCSI driver for HP Smart Array controllers. The hpsa driver is intended to supplant the cciss driver for newer Smart Array controllers. The hpsa driver is a SCSI driver, while the cciss driver is a «block» driver. Actually cciss is both a block driver (for logical drives) AND a SCSI driver (for tape drives). This «split-brained» design of the cciss driver is a source of excess complexity and eliminating that complexity is one of the reasons for hpsa to exist.

Supported devices¶

  • Smart Array P212
  • Smart Array P410
  • Smart Array P410i
  • Smart Array P411
  • Smart Array P812
  • Smart Array P712m
  • Smart Array P711m
  • StorageWorks P1210m

Additionally, older Smart Arrays may work with the hpsa driver if the kernel boot parameter «hpsa_allow_any=1» is specified, however these are not tested nor supported by HP with this driver. For older Smart Arrays, the cciss driver should still be used.

The «hpsa_simple_mode=1» boot parameter may be used to prevent the driver from putting the controller into «performant» mode. The difference is that with simple mode, each command completion requires an interrupt, while with «performant mode» (the default, and ordinarily better performing) it is possible to have multiple command completions indicated by a single interrupt.

Читайте также:  Open network ports linux

HPSA specific entries in /sys¶

In addition to the generic SCSI attributes available in /sys, hpsa supports the following attributes:

HPSA specific host attributes¶

/sys/class/scsi_host/host*/rescan /sys/class/scsi_host/host*/firmware_revision /sys/class/scsi_host/host*/resettable /sys/class/scsi_host/host*/transport_mode

the host «rescan» attribute is a write only attribute. Writing to this attribute will cause the driver to scan for new, changed, or removed devices (e.g. hot-plugged tape drives, or newly configured or deleted logical drives, etc.) and notify the SCSI midlayer of any changes detected. Normally this is triggered automatically by HP’s Array Configuration Utility (either the GUI or command line variety) so for logical drive changes, the user should not normally have to use this. It may be useful when hot plugging devices like tape drives, or entire storage boxes containing pre-configured logical drives.

The «firmware_revision» attribute contains the firmware version of the Smart Array. For example:

root@host:/sys/class/scsi_host/host4# cat firmware_revision 7.14

The transport_mode indicates whether the controller is in «performant» or «simple» mode. This is controlled by the «hpsa_simple_mode» module parameter.

The «resettable» read-only attribute indicates whether a particular controller is able to honor the «reset_devices» kernel parameter. If the device is resettable, this file will contain a «1», otherwise, a «0». This parameter is used by kdump, for example, to reset the controller at driver load time to eliminate any outstanding commands on the controller and get the controller into a known state so that the kdump initiated i/o will work right and not be disrupted in any way by stale commands or other stale state remaining on the controller from the previous kernel. This attribute enables kexec tools to warn the user if they attempt to designate a device which is unable to honor the reset_devices kernel parameter as a dump device.

HPSA specific disk attributes¶

/sys/class/scsi_disk/c:b:t:l/device/unique_id /sys/class/scsi_disk/c:b:t:l/device/raid_level /sys/class/scsi_disk/c:b:t:l/device/lunid

(where c:b:t:l are the controller, bus, target and lun of the device)

For example:

root@host:/sys/class/scsi_disk/4:0:0:0/device# cat unique_id 600508B1001044395355323037570F77 root@host:/sys/class/scsi_disk/4:0:0:0/device# cat lunid 0x0000004000000000 root@host:/sys/class/scsi_disk/4:0:0:0/device# cat raid_level RAID 0

HPSA specific ioctls¶

For compatibility with applications written for the cciss driver, many, but not all of the ioctls supported by the cciss driver are also supported by the hpsa driver. The data structures used by these are described in include/linux/cciss_ioctl.h

CCISS_DEREGDISK, CCISS_REGNEWDISK, CCISS_REGNEWD

The above three ioctls all do exactly the same thing, which is to cause the driver to rescan for new devices. This does exactly the same thing as writing to the hpsa specific host «rescan» attribute.

CCISS_GETPCIINFO

Returns PCI domain, bus, device and function and «board ID» (PCI subsystem ID).

CCISS_GETDRIVVER

Returns driver version in three bytes encoded as:

Источник

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