17.2.2. ostree stateroot 間の共有コンテナーパーティションの設定
重要
この手順はインストール時に完了する必要があります。
シードクラスターに MachineConfig を適用して別のパーティションを作成し、プリインストールプロセス中に使用する 2 つの ostree stateroot 間で /var/lib/containers パーティションを共有します。
手順
MachineConfigを適用して個別のパーティションを作成します。apiVersion: machineconfiguration.openshift.io/v1 kind: MachineConfig metadata: labels: machineconfiguration.openshift.io/role: master name: 98-var-lib-containers-partitioned spec: config: ignition: version: 3.2.0 storage: disks: - device: /dev/disk/by-path/pci-<root_disk> partitions: - label: var-lib-containers startMiB: <start_of_partition> sizeMiB: <partition_size> filesystems: - device: /dev/disk/by-partlabel/var-lib-containers format: xfs mountOptions: - defaults - prjquota path: /var/lib/containers wipeFilesystem: true systemd: units: - contents: |- # Generated by Butane [Unit] Before=local-fs.target Requires=systemd-fsck@dev-disk-by\x2dpartlabel-var\x2dlib\x2dcontainers.service After=systemd-fsck@dev-disk-by\x2dpartlabel-var\x2dlib\x2dcontainers.service [Mount] Where=/var/lib/containers What=/dev/disk/by-partlabel/var-lib-containers Type=xfs Options=defaults,prjquota [Install] RequiredBy=local-fs.target enabled: true name: var-lib-containers.mountここでは、以下のようになります。
< ルートディスク >- ルートディスクを指定します。
<start_of_partition>- パーティションの開始位置を MiB 単位で指定します。値が小さすぎるとインストールは失敗します。
< パーティションサイズ >- プリキャッシュされたイメージに十分なディスク容量を確保するため、パーティションの最小サイズを 500GB に指定します。値が小さすぎると、インストール後のデプロイメントが失敗します。