Skip to content

Commit 0c9ad7a

Browse files
committed
LPAR day 2 procedure
1 parent 6649910 commit 0c9ad7a

File tree

2 files changed

+132
-1
lines changed

2 files changed

+132
-1
lines changed

installing/installing_with_agent_based_installer/prepare-pxe-assets-agent.adoc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,19 @@ include::modules/installing-ocp-agent-ibm-z-zvm.adoc[leveloffset=+2]
5252
// Adding {ibm-z-name} agents with {op-system-base} KVM
5353
include::modules/installing-ocp-agent-ibm-z-kvm.adoc[leveloffset=+2]
5454

55+
[role="_additional-resources"]
56+
.Additional resources
57+
58+
* xref:../../installing/installing_ibm_z/upi/installing-ibm-z-kvm.adoc#installing-ibm-z-kvm[Installing a cluster with {op-system-base} KVM on {ibm-z-title} and {ibm-linuxone-title}]
59+
5560
// Adding {ibm-z-title} Logical Partition (LPAR) as agents
5661
include::modules/adding-ibm-z-lpar-agent.adoc[leveloffset=+2]
5762

5863
[role="_additional-resources"]
5964
.Additional resources
6065

61-
* xref:../../installing/installing_ibm_z/upi/installing-ibm-z.adoc#installing-ibm-z[Installing a cluster with z/VM on {ibm-z-title} and {ibm-linuxone-title}]
66+
* xref:../../installing/installing_ibm_z/upi/installing-ibm-z-lpar.adoc#installing-ibm-z-lpar[Installing a cluster in an LPAR on {ibm-z-title} and {ibm-linuxone-title}]
6267

68+
// Adding {ibm-z-title} agents in a Logical Partition (LPAR) as a day 2 operation
69+
include::modules/adding-ibm-z-lpar-agent-day-2.adoc[leveloffset=+2]
6370

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * installing/installing_with_agent_based_installer/prepare-pxe-assets-agent.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="adding-ibm-z-lpar-agents-day-2_{context}"]
7+
= Adding {ibm-z-title} agents in a Logical Partition (LPAR) to an existing cluster
8+
9+
In {product-title} {product-version}, the `.ins` and `initrd.img.addrsize` files are not automatically generated as part of the boot-artifacts for an existing cluster. You must manually generate these files for {ibm-z-name} clusters running in an LPAR.
10+
11+
The `.ins` file is a special file that includes installation data and is present on the FTP server. You can access this file from the hardware management console (HMC) system. This file contains details such as mapping of the location of installation data on the disk or FTP server and the memory locations where the data is to be copied.
12+
13+
.Prerequisites
14+
15+
* A running file server with access to the LPAR.
16+
17+
.Procedure
18+
19+
. Generate the `.ins` and `initrd.img.addrsize` files:
20+
21+
.. Retrieve the size of the `kernel` and `initrd` by running the following commands:
22+
+
23+
[source,terminal]
24+
----
25+
$ KERNEL_IMG_PATH='./kernel.img'
26+
----
27+
+
28+
[source,terminal]
29+
----
30+
$ INITRD_IMG_PATH='./initrd.img'
31+
----
32+
+
33+
[source,terminal]
34+
----
35+
$ CMDLINE_PATH='./generic.prm'
36+
----
37+
+
38+
[source,terminal]
39+
----
40+
$ kernel_size=$(stat -c%s $KERNEL_IMG_PATH)
41+
----
42+
+
43+
[source,terminal]
44+
----
45+
$ initrd_size=$(stat -c%s $INITRD_IMG_PATH)
46+
----
47+
48+
.. Round up the `kernel` size to the next Mebibytes (MiB) boundary by running the following command:
49+
+
50+
[source,terminal]
51+
----
52+
$ BYTE_PER_MIB=$(( 1024 * 1024 )) offset=$(( (kernel_size + BYTE_PER_MIB - 1) / BYTE_PER_MIB * BYTE_PER_MIB ))
53+
----
54+
55+
.. Create the kernel binary patch file that contains the `initrd` address and size by running the following commands:
56+
+
57+
[source,terminal]
58+
----
59+
$ INITRD_IMG_NAME=$(echo $INITRD_IMG_PATH | rev | cut -d '/' -f 1 | rev)
60+
----
61+
+
62+
[source,terminal]
63+
----
64+
$ KERNEL_OFFSET=0x00000000
65+
----
66+
+
67+
[source,terminal]
68+
----
69+
$ KERNEL_CMDLINE_OFFSET=0x00010480
70+
----
71+
+
72+
[source,terminal]
73+
----
74+
$ INITRD_ADDR_SIZE_OFFSET=0x00010408
75+
----
76+
+
77+
[source,terminal]
78+
----
79+
$ OFFSET_HEX=(printf '0x%08x\n' offset)
80+
----
81+
82+
.. Convert the address and size to binary format by running the following command:
83+
+
84+
[source,terminal]
85+
----
86+
$ printf "$(printf '%016x\n' $initrd_size)" | xxd -r -p > temp_size.bin
87+
----
88+
89+
.. Merge the address and size binaries by running the following command:
90+
+
91+
[source,terminal]
92+
----
93+
$ cat temp_address.bin temp_size.bin > "$INITRD_IMG_NAME.addrsize"
94+
----
95+
96+
.. Clean up temporary files by running the following command:
97+
+
98+
[source,terminal]
99+
----
100+
$ rm -rf temp_address.bin temp_size.bin
101+
----
102+
103+
.. Create the `.ins` file by running the following command:
104+
+
105+
[source,terminal]
106+
----
107+
$ cat > generic.ins <<EOF
108+
$KERNEL_IMG_PATH $KERNEL_OFFSET
109+
$INITRD_IMG_PATH $OFFSET_HEX
110+
$INITRD_IMG_NAME.addrsize $INITRD_ADDR_SIZE_OFFSET
111+
$CMDLINE_PATH $KERNEL_CMDLINE_OFFSET
112+
EOF
113+
----
114+
+
115+
[NOTE]
116+
====
117+
The file is based on the paths of the `kernel.img`, `initrd.img`, `initrd.img.addrsize`, and `cmdline` files and the memory locations where the data is to be copied.
118+
====
119+
120+
. Transfer the `initrd`, `kernel`, `generic.ins`, and `initrd.img.addrsize` parameter files to the file server. For more information, see link:https://www.ibm.com/docs/en/linux-on-systems?topic=bl-booting-linux-in-lpar-mode[Booting Linux in LPAR mode] (IBM documentation).
121+
122+
. Start the machine.
123+
124+
. Repeat the procedure for all other machines in the cluster.

0 commit comments

Comments
 (0)