Project

General

Profile

The ungleich hardware maintenance guide » History » Version 16

Nico Schottelius, 02/12/2022 11:31 AM

1 2 Nico Schottelius
{{toc}}
2
3 1 Nico Schottelius
h1. The ungleich hardware maintenance guide
4
5
This guide describes common operations on hardware we use.
6
7 13 Nico Schottelius
h2. Using the ungleich-hardware container in kubernetes and docker
8 12 Nico Schottelius
9 13 Nico Schottelius
To manage hardware on server1 in kubernetes, you can use:
10 12 Nico Schottelius
11
<pre>
12
apiVersion: v1
13
kind: Pod
14
metadata:
15
  name: ungleich-hardware
16
spec:
17
  containers:
18
  - name: ungleich-hardware
19
    image: harbor.ungleich.svc.p10.k8s.ooo/ungleich-public/ungleich-hardware:0.0.3
20
    args:
21
    - sleep
22
    - "1000000"
23
    volumeMounts:
24
      - mountPath: /dev
25
        name: dev
26
    securityContext:
27
      privileged: true
28
  nodeSelector:
29
    kubernetes.io/hostname: "server1"
30
31
  volumes:
32
    - name: dev
33
      hostPath:
34 1 Nico Schottelius
        path: /dev
35
36 13 Nico Schottelius
</pre>
37
38
To use it wit docker:
39
40
<pre>
41 14 Nico Schottelius
docker run -v /dev:/dev --privileged -ti harbor.ungleich.svc.p10.k8s.ooo/ungleich-public/ungleich-hardware:0.0.3
42 12 Nico Schottelius
</pre>
43
44 1 Nico Schottelius
h2. APU Bios Update
45
46
* Download the correct bios from https://pcengines.github.io/
47
** Check whether it's apu1/2/3/4 before downloading
48
* Install flashrom
49
* "Flash bios using flashrom":https://github.com/pcengines/apu2-documentation/blob/master/docs/firmware_flashing.md
50
** @flashrom -w THEROMFILE -p internal@
51
52 4 Nico Schottelius
h2. APU Serial and bootloader configuration
53 3 Nico Schottelius
54
* Ensure that the bootloader has "console=ttyS0,115200" configured
55
* Ensure that there is a getty running on serial
56
* Use grub-bios as the bootloader
57
** Install using @grub-install /dev/sda@
58 1 Nico Schottelius
59 5 Nico Schottelius
h2. Updating the Perc H800 SAS controller
60
61 6 Nico Schottelius
* @wget 'https://dl.dell.com/FOLDER03292738M/3/SAS-RAID_Firmware_XKF5X_LN_12.10.7-0001_A13.BIN?uid=4b8a2506-f4d4-46a9-ab19-3c2a5008a782&fn=SAS-RAID_Firmware_XKF5X_LN_12.10.7-0001_A13.BIN' -O  SAS-RAID_Firmware_XKF5X_LN_12.10.7-0001_A13.BIN@
62 5 Nico Schottelius
* chmod u+x SAS-RAID_Firmware_XKF5X_LN_12.10.7-0001_A13.BIN
63
* ./SAS-RAID_Firmware_XKF5X_LN_12.10.7-0001_A13.BIN
64
65 8 Nico Schottelius
h2. HP servers disk management
66
67 9 Nico Schottelius
* See also http://www.datadisk.co.uk/html_docs/redhat/hpacucli.htm
68
69 16 Nico Schottelius
Required kernel modules:
70
71
<pre>
72
sg
73
cciss
74
</pre>
75
76 9 Nico Schottelius
Show all drives/controller overview:
77
78
<pre>
79 15 Nico Schottelius
hpacucli ctrl all show config
80
81 9 Nico Schottelius
hpacucli ctrl slot=0 pd all show
82
</pre>
83
84 11 Nico Schottelius
Add a disk as raid0:
85
86
<pre>
87
hpacucli ctrl slot=0 create type=ld drives=1I:1:1 raid=0
88
</pre>
89
90 10 Nico Schottelius
h2. Dell servers disk management
91 9 Nico Schottelius
92 10 Nico Schottelius
Listing all disks:
93 1 Nico Schottelius
94 10 Nico Schottelius
<pre>
95
megacli -PDList -aALL
96
</pre>
97 8 Nico Schottelius
98
Adding disks:
99
100
<pre>
101
megacli -CfgLdAdd -r0 [Enclosure Device ID:slot] -aX (X : host is 0. md-array is 1)
102
103
# Sample call, if enclosure and slot are KNOWN (aka not N/A)
104
megacli -CfgLdAdd -r0 [32:0] -a0
105
106
# Sample call, if enclosure is N/A
107
megacli -CfgLdAdd -r0 [:0] -a0
108
</pre>
109
110
Remove cache of disks that are not in the server anymore:
111
112
<pre>
113
megacli -DiscardPreservedCache -Lall -aAll
114
</pre>
115
116
Remove foreign configurations on foreign disks
117
118
<pre>
119
megacli -CfgForeign -Clear -aAll
120
</pre>
121
122
Do both in many cases:
123
124
<pre>
125
megacli -DiscardPreservedCache -Lall -aAll
126
megacli -CfgForeign -Clear -aAll
127
</pre>
128
129 1 Nico Schottelius
h2. SEE ALSO
130
131
* [[Managing OpenWRT]]
132 7 Nico Schottelius
* [[The_ungleich_ceph_handbook]]