Project

General

Profile

The ungleich hardware maintenance guide » History » Version 14

Nico Schottelius, 02/12/2022 11:29 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
Show all drives/controller overview:
70
71
<pre>
72
hpacucli ctrl slot=0 pd all show
73
</pre>
74
75 11 Nico Schottelius
Add a disk as raid0:
76
77
<pre>
78
hpacucli ctrl slot=0 create type=ld drives=1I:1:1 raid=0
79
</pre>
80
81 10 Nico Schottelius
h2. Dell servers disk management
82 9 Nico Schottelius
83 10 Nico Schottelius
Listing all disks:
84 1 Nico Schottelius
85 10 Nico Schottelius
<pre>
86
megacli -PDList -aALL
87
</pre>
88 8 Nico Schottelius
89
Adding disks:
90
91
<pre>
92
megacli -CfgLdAdd -r0 [Enclosure Device ID:slot] -aX (X : host is 0. md-array is 1)
93
94
# Sample call, if enclosure and slot are KNOWN (aka not N/A)
95
megacli -CfgLdAdd -r0 [32:0] -a0
96
97
# Sample call, if enclosure is N/A
98
megacli -CfgLdAdd -r0 [:0] -a0
99
</pre>
100
101
Remove cache of disks that are not in the server anymore:
102
103
<pre>
104
megacli -DiscardPreservedCache -Lall -aAll
105
</pre>
106
107
Remove foreign configurations on foreign disks
108
109
<pre>
110
megacli -CfgForeign -Clear -aAll
111
</pre>
112
113
Do both in many cases:
114
115
<pre>
116
megacli -DiscardPreservedCache -Lall -aAll
117
megacli -CfgForeign -Clear -aAll
118
</pre>
119
120 1 Nico Schottelius
h2. SEE ALSO
121
122
* [[Managing OpenWRT]]
123 7 Nico Schottelius
* [[The_ungleich_ceph_handbook]]