summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@cletus>2021-03-04 17:17:06 -0500
committerroot <root@cletus>2021-03-04 17:19:32 -0500
commitbd3df256b1d754dd0c032d86d709e29c7df46914 (patch)
tree2b31f0da16a79b11fbfba40d4b43bf2506512d59
initial commit
-rw-r--r--.gitignore1
-rw-r--r--Makefile4
-rw-r--r--hpssacli-2.40-13.0_amd64.sh22
3 files changed, 27 insertions, 0 deletions
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 @@
1.PHONY: fix
2sudo = $(shell [ $$(id -u) = 0 ] || echo sudo)
3fix:
4 $(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 @@
1#!/bin/sh
2# Thanks to rmp5s on unraid.net for the solution.
3# Thanks to Daggr for confirming the solution.
4# https://forums.unraid.net/topic/82007-solved-unraid-with-hp-p420i-raid-card-in-hp-proliant-dl380p-g8/
5
6#deb=hpssacli-2.40-13.0_amd64.deb
7deb=${0%.sh}.deb
8url=https://downloads.linux.hpe.com/SDR/repo/mcp/pool/non-free/$deb
9set -ex
10
11if ! dpkg-query -W hpssacli
12then
13 [ -e "$deb" ] || wget "$url" || curl -O "$url"
14 dpkg -i "$deb"
15fi
16
17PATH=/opt/hp/hpssacli/bld:$PATH
18
19hpssacli controller slot=0 show |
20 grep 'HBA Mode Enabled: True' ||
21 hpssacli controller slot=0 modify hbamode=on
22hpssacli rescan