Project

General

Profile

The ungleich hardware maintenance guide » History » Version 15

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