UiPath Documentation
automation-suite
2.2510
true
Linux 版 Automation Suite 安装指南
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

由于 RHEL 8.x 节点上的 XFS 卷装载失败,Pod 卡在 Init 状态

解决由于 Automation Suite 中的 TopoLVM XFS 格式与 RHEL 8.x 不兼容而卡在 Init 状态的 Pod。

描述​

当需要新持久卷的 Pod(例如,AI Center 训练管道)在 RHEL 8.x 节点上启动时,Pod 保持 Init 状态,并显示以下错误:

Warning  FailedMount  36s (x11 over 8m50s)  kubelet  MountVolume.SetUp failed for volume "pvc-82575d2d-2269-4cef-ace8-fa1602f3dd44" : rpc error: code = Internal desc = mount failed: volume=6d81061d-79c4-46b3-9471-478c6c739b25, error=mount failed: exit status 32

Mounting command: mount
Mounting arguments: -t xfs -o nouuid /dev/uipathstorevg/6d81061d-79c4-46b3-9471-478c6c739b25 /var/lib/kubelet/pods/547bdf64-173b-4df1-ad7a-449f6796ca09/volumes/kubernetes.io~csi/pvc-82575d2d-2269-4cef-ace8-fa1602f3dd44/mount

Output: mount: /var/lib/kubelet/pods/547bdf64-173b-4df1-ad7a-449f6796ca09/volumes/kubernetes.io~csi/pvc-82575d2d-2269-4cef-ace8-fa1602f3dd44/mount: wrong fs type, bad option, bad superblock on /dev/mapper/uipathstorevg-6d81061d--79c4--46b3--9471--478c6c739b25, missing codepage or helper program, or other error.
Warning  FailedMount  36s (x11 over 8m50s)  kubelet  MountVolume.SetUp failed for volume "pvc-82575d2d-2269-4cef-ace8-fa1602f3dd44" : rpc error: code = Internal desc = mount failed: volume=6d81061d-79c4-46b3-9471-478c6c739b25, error=mount failed: exit status 32

Mounting command: mount
Mounting arguments: -t xfs -o nouuid /dev/uipathstorevg/6d81061d-79c4-46b3-9471-478c6c739b25 /var/lib/kubelet/pods/547bdf64-173b-4df1-ad7a-449f6796ca09/volumes/kubernetes.io~csi/pvc-82575d2d-2269-4cef-ace8-fa1602f3dd44/mount

Output: mount: /var/lib/kubelet/pods/547bdf64-173b-4df1-ad7a-449f6796ca09/volumes/kubernetes.io~csi/pvc-82575d2d-2269-4cef-ace8-fa1602f3dd44/mount: wrong fs type, bad option, bad superblock on /dev/mapper/uipathstorevg-6d81061d--79c4--46b3--9471--478c6c739b25, missing codepage or helper program, or other error.

PVC 为 Bound,PV 看起来运行正常,并且基础块储存设备可在节点上通过 lsblk 看到。

原因: TopoLVM 使用较新的xfsprogs /kernel 版本中引入的磁盘功能( bigtime 、 inobtcount 、 nrext64 )通过mkfs.xfs格式化新卷。RHEL 8.x 附带的内核和 xfsprogs 无法装载使用这些功能创建的 XFS 卷,因此装载会失败,并且会显示 wrong fs type, bad option, bad superblock。

此问题仅影响在 RHEL 8.x 节点上运行的 Automation Suite on Linux (RKE2); RHEL 9.x 和 10.x 不受影响。

解决方案​

要解决此问题,请修补 topolvm-node 守护程序集,以使用禁用不兼容功能的 mkfs.xfs 包装器格式化新卷:

  1. 备份当前 TopoLVM 配置:
    kubectl -n topolvm-system get ds topolvm-node -o yaml > /opt/UiPathAutomationSuite/topolvm-node-ds.yaml
    kubectl -n topolvm-system get all -o yaml > /opt/UiPathAutomationSuite/topolvm-system-all.yaml
    kubectl get storageclass local-volume-provisioner -o yaml > /opt/UiPathAutomationSuite/local-volume-provisioner-sc.yaml
    kubectl -n topolvm-system get configmap -o yaml > /opt/UiPathAutomationSuite/topolvm-system-configmaps.yaml
    kubectl -n topolvm-system get ds topolvm-node -o yaml > /opt/UiPathAutomationSuite/topolvm-node-ds.yaml
    kubectl -n topolvm-system get all -o yaml > /opt/UiPathAutomationSuite/topolvm-system-all.yaml
    kubectl get storageclass local-volume-provisioner -o yaml > /opt/UiPathAutomationSuite/local-volume-provisioner-sc.yaml
    kubectl -n topolvm-system get configmap -o yaml > /opt/UiPathAutomationSuite/topolvm-system-configmaps.yaml
    
  2. 创建一个包装器配置映射,以调用带有 RHEL 8.x 兼容选项的 mkfs.xfs:
    cat <<'EOF' | kubectl apply -f -
    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: mkfs-xfs-wrapper
      namespace: topolvm-system
    data:
      mkfs.xfs: |
        #!/bin/sh
        exec /usr/sbin/mkfs.xfs -m crc=1,rmapbt=0,bigtime=0,inobtcount=0 -i nrext64=0 "$@"
    EOF
    cat <<'EOF' | kubectl apply -f -
    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: mkfs-xfs-wrapper
      namespace: topolvm-system
    data:
      mkfs.xfs: |
        #!/bin/sh
        exec /usr/sbin/mkfs.xfs -m crc=1,rmapbt=0,bigtime=0,inobtcount=0 -i nrext64=0 "$@"
    EOF
    
  3. 验证 ConfigMap 是否已创建:
    kubectl -n topolvm-system get configmap mkfs-xfs-wrapper
    kubectl -n topolvm-system get configmap mkfs-xfs-wrapper
    
  4. 修补 topolvm-node DamonSet,以在默认的 mkfs.xfs 二进制路径上装载包装器:
    kubectl -n topolvm-system patch ds topolvm-node --type=strategic -p '
    spec:
      template:
        spec:
          containers:
          - name: topolvm-node
            volumeMounts:
            - mountPath: /usr/local/sbin/mkfs.xfs
              name: mkfs-xfs-wrapper
              readOnly: true
              subPath: mkfs.xfs
          volumes:
          - name: mkfs-xfs-wrapper
            configMap:
              name: mkfs-xfs-wrapper
              defaultMode: 493
              items:
              - key: mkfs.xfs
                mode: 493
                path: mkfs.xfs
    '
    kubectl -n topolvm-system patch ds topolvm-node --type=strategic -p '
    spec:
      template:
        spec:
          containers:
          - name: topolvm-node
            volumeMounts:
            - mountPath: /usr/local/sbin/mkfs.xfs
              name: mkfs-xfs-wrapper
              readOnly: true
              subPath: mkfs.xfs
          volumes:
          - name: mkfs-xfs-wrapper
            configMap:
              name: mkfs-xfs-wrapper
              defaultMode: 493
              items:
              - key: mkfs.xfs
                mode: 493
                path: mkfs.xfs
    '
    
  5. 推出守护程序集并确认推出完成:
    kubectl -n topolvm-system rollout status ds/topolvm-node
    kubectl -n topolvm-system rollout status ds/topolvm-node
    
  • 描述​
  • 解决方案​

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新