diff options
author | root <root@cletus> | 2021-03-04 17:17:06 -0500 |
---|---|---|
committer | root <root@cletus> | 2021-03-04 17:19:32 -0500 |
commit | bd3df256b1d754dd0c032d86d709e29c7df46914 (patch) | |
tree | 2b31f0da16a79b11fbfba40d4b43bf2506512d59 |
initial commit
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | hpssacli-2.40-13.0_amd64.sh | 22 |
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 | ||
2 | sudo = $(shell [ $$(id -u) = 0 ] || echo sudo) | ||
3 | fix: | ||
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 | ||
7 | deb=${0%.sh}.deb | ||
8 | url=https://downloads.linux.hpe.com/SDR/repo/mcp/pool/non-free/$deb | ||
9 | set -ex | ||
10 | |||
11 | if ! dpkg-query -W hpssacli | ||
12 | then | ||
13 | [ -e "$deb" ] || wget "$url" || curl -O "$url" | ||
14 | dpkg -i "$deb" | ||
15 | fi | ||
16 | |||
17 | PATH=/opt/hp/hpssacli/bld:$PATH | ||
18 | |||
19 | hpssacli controller slot=0 show | | ||
20 | grep 'HBA Mode Enabled: True' || | ||
21 | hpssacli controller slot=0 modify hbamode=on | ||
22 | hpssacli rescan | ||