From bd3df256b1d754dd0c032d86d709e29c7df46914 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 4 Mar 2021 17:17:06 -0500 Subject: initial commit --- .gitignore | 1 + Makefile | 4 ++++ hpssacli-2.40-13.0_amd64.sh | 22 ++++++++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 hpssacli-2.40-13.0_amd64.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c00df13 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.deb diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3e848b7 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +.PHONY: fix +sudo = $(shell [ $$(id -u) = 0 ] || echo sudo) +fix: + $(sudo) sh hpssacli-2.40-13.0_amd64.sh diff --git a/hpssacli-2.40-13.0_amd64.sh b/hpssacli-2.40-13.0_amd64.sh new file mode 100644 index 0000000..9255684 --- /dev/null +++ b/hpssacli-2.40-13.0_amd64.sh @@ -0,0 +1,22 @@ +#!/bin/sh +# Thanks to rmp5s on unraid.net for the solution. +# Thanks to Daggr for confirming the solution. +# https://forums.unraid.net/topic/82007-solved-unraid-with-hp-p420i-raid-card-in-hp-proliant-dl380p-g8/ + +#deb=hpssacli-2.40-13.0_amd64.deb +deb=${0%.sh}.deb +url=https://downloads.linux.hpe.com/SDR/repo/mcp/pool/non-free/$deb +set -ex + +if ! dpkg-query -W hpssacli +then + [ -e "$deb" ] || wget "$url" || curl -O "$url" + dpkg -i "$deb" +fi + +PATH=/opt/hp/hpssacli/bld:$PATH + +hpssacli controller slot=0 show | + grep 'HBA Mode Enabled: True' || + hpssacli controller slot=0 modify hbamode=on +hpssacli rescan -- cgit v1.2.3