<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>华为CSI服务相关问题 on Huawei</title><link>https://huawei.github.io/css-docs/v4.11.0/troubleshooting/huawei-csi-service-issues/</link><description>Recent content in 华为CSI服务相关问题 on Huawei</description><generator>Hugo</generator><language>zh-cn</language><copyright>版权所有 © 华为技术有限公司 2025。保留一切权利。</copyright><atom:link href="https://huawei.github.io/css-docs/v4.11.0/troubleshooting/huawei-csi-service-issues/index.xml" rel="self" type="application/rss+xml"/><item><title>启动huawei-csi-node失败，提示错误为：“/var/lib/iscsi is not a directory”</title><link>https://huawei.github.io/css-docs/v4.11.0/troubleshooting/huawei-csi-service-issues/failed-to-start-the-huawei-csi-node-service-with-error-message-var-lib-iscsi-is-not-a-directory-repo/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://huawei.github.io/css-docs/v4.11.0/troubleshooting/huawei-csi-service-issues/failed-to-start-the-huawei-csi-node-service-with-error-message-var-lib-iscsi-is-not-a-directory-repo/</guid><description>&lt;h2 id="zh-cn_topic_0000001086137838_section1566717121452">现象描述&lt;/h2>
&lt;p>启动huawei-csi-node时，无法启动huawei-csi-node服务， 使用&lt;strong>kubectl describe daemonset huawei-csi-node -n huawei-csi&lt;/strong>命令查看，提示错误为：“/var/lib/iscsi is not a directory”。&lt;/p>
&lt;h2 id="zh-cn_topic_0000001086137838_section1425013451056">根因分析&lt;/h2>
&lt;p>huawei-csi-node中容器内部无/var/lib/iscsi目录。&lt;/p>
&lt;h2 id="zh-cn_topic_0000001086137838_section350653016492">解决措施或规避方法&lt;/h2>
&lt;ol>
&lt;li>
&lt;p>使用远程访问工具（以PuTTY为例），通过管理IP地址，登录Kubernetes集群的任意master节点。&lt;/p>
&lt;/li>
&lt;li>
&lt;p>进入Helm工程的目录下，如果无法找到之前的Helm工程，则将组件包中的helm目录拷贝到master节点的任意目录下，组件包路径请参考
&lt;a href="https://huawei.github.io/css-docs/css-docs/docs/installation-and-deployment/csi/installation-preparations/downloading-the-huawei-csi-software-package/#zh-cn_topic_0150885197_table17200162435412">表1&lt;/a>
。&lt;/p>
&lt;/li>
&lt;li>
&lt;p>进入下一级目录templates,找到huawei-csi-node.yaml文件。&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#4c4f69;background-color:#eff1f5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>cd /templates
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>执行以下命令，将huawei-csi-node.yaml &amp;gt; volumes &amp;gt; iscsi-dir &amp;gt; hostPath中“path“设置为“/var/lib/iscsi“ ，然后保存并退出文件。&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#4c4f69;background-color:#eff1f5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>vi huawei-csi-node.yaml
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>执行以下命令升级Helm chart。升级命令将更新Deployment、DaemonSet和RBAC资源。其中，helm-huawei-csi为自定义的chart名称，huawei-csi为自定义的命名空间。&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#4c4f69;background-color:#eff1f5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>helm upgrade helm-huawei-csi ./ -n huawei-csi -f values.yaml
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>命令结果示例如下：&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#4c4f69;background-color:#eff1f5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>Release &amp;#34;helm-huawei-csi&amp;#34; has been upgraded. Happy Helming!
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>NAME: helm-huawei-csi
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>LAST DEPLOYED: Thu Jun 9 07:58:15 2022
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>NAMESPACE: huawei-csi
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>STATUS: deployed
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>REVISION: 2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>TEST SUITE: None
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;/ol></description></item><item><title>启动华为CSI服务失败，提示错误：“/etc/localtime is not a file”</title><link>https://huawei.github.io/css-docs/v4.11.0/troubleshooting/huawei-csi-service-issues/huawei-csi-services-fail-to-be-started-and-error-message-etc-localtime-is-not-a-file-is-displayed/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://huawei.github.io/css-docs/v4.11.0/troubleshooting/huawei-csi-service-issues/huawei-csi-services-fail-to-be-started-and-error-message-etc-localtime-is-not-a-file-is-displayed/</guid><description>&lt;h2 id="zh-cn_topic_0000001086137838_section1566717121452">现象描述&lt;/h2>
&lt;p>安装部署CSI时，Pod运行不起来，处于ContainerCreating状态，查看Pod中有打印告警事件：/etc/localtime is not a file。&lt;/p>
&lt;h2 id="zh-cn_topic_0000001086137838_section1425013451056">根因分析&lt;/h2>
&lt;p>容器挂载主机/etc/localtime文件时，识别类型有误，容器挂载不上主机侧/etc/localtime文件，导致Pod运行不起来。&lt;/p>
&lt;h2 id="section158611659145513">操作步骤&lt;/h2>
&lt;ol>
&lt;li>
&lt;p>使用远程访问工具（以PuTTY为例），通过管理IP地址，登录Kubernetes集群的任意master节点。&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;a name="li131611149192013">&lt;/a>执行命令，查看CSI服务Pod运行状态。&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#4c4f69;background-color:#eff1f5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>kubectl get pod -n huawei-csi
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>命令结果示例如下，其中huawei-csi为CSI服务部署的命名空间。&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#4c4f69;background-color:#eff1f5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>NAME READY STATUS RESTARTS AGE
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>huawei-csi-controller-6dfcc4b79f-9vjtq 9/9 ContainerCreating 0 24m
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>huawei-csi-controller-6dfcc4b79f-csphc 9/9 ContainerCreating 0 24m
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>huawei-csi-node-g6f4k 3/3 ContainerCreating 0 20m
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>huawei-csi-node-tqs87 3/3 ContainerCreating 0 20m
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>执行命令，通过查看容器的“Events”参数。&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#4c4f69;background-color:#eff1f5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>kubectl describe pod huawei-csi-controller-6dfcc4b79f-9vjtq -n huawei-csi
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>命令结果示例如下。其中，&lt;em>huawei-csi-controller-6dfcc4b79f-9vjtq&lt;/em> 为
&lt;a href="#li131611149192013">2&lt;/a>
中查找到的状态显示为“ContainerCreating”的Pod名称，huawei-csi为该Pod所在的命名空间。&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#4c4f69;background-color:#eff1f5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>...
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Events:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Type Reason Age From Message
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ---- ------ ---- ---- -------
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Normal Scheduled 96s default-scheduler Successfully assigned huawei-csi/huawei-csi-controller-6dfcc4b79f-9vjtq to node1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Warning FailedMount 33s (x8 over 96s) kubelet MountVolume.SetUp failed for volume &amp;#34;host-time&amp;#34; : hostPath type check failed: /etc/localtime is not a file
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>执行命令&lt;strong>cd /helm/esdk/templates&lt;/strong>，进入到CSI的安装包路径下。路径请参见
&lt;a href="https://huawei.github.io/css-docs/css-docs/docs/installation-and-deployment/csi/installation-preparations/downloading-the-huawei-csi-software-package/#zh-cn_topic_0150885197_table17200162435412">表1&lt;/a>
。&lt;/p></description></item><item><title>启动huawei-csi服务时，服务启动异常， 状态显示InvalidImageName</title><link>https://huawei.github.io/css-docs/v4.11.0/troubleshooting/huawei-csi-service-issues/failed-to-start-huawei-csi-services-with-the-status-displayed-as-invalidimagename/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://huawei.github.io/css-docs/v4.11.0/troubleshooting/huawei-csi-service-issues/failed-to-start-huawei-csi-services-with-the-status-displayed-as-invalidimagename/</guid><description>&lt;h2 id="zh-cn_topic_0000001205368783_section1566717121452">现象描述&lt;/h2>
&lt;p>启动huawei-csi时，无法启动huawei-csi服务（huawei-csi-controller服务或者huawei-csi-node服务），使用kubectl get pod -A | grep huawei命令查看，显示状态为InvalidImageName&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#4c4f69;background-color:#eff1f5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>kubectl get pod -A | grep huawei
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>命令结果示例如下：&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#4c4f69;background-color:#eff1f5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>huawei-csi huawei-csi-controller-fd5f97768-qlldc 6/9 InvalidImageName 0 16s
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>huawei-csi huawei-csi-node-25txd 2/3 InvalidImageName 0 15s
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="zh-cn_topic_0000001205368783_section1425013451056">根因分析&lt;/h2>
&lt;p>controller和node的yaml配置文件中，配置Huawei CSI的镜像版本号错误。例如：&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#4c4f69;background-color:#eff1f5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span> ...
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - name: huawei-csi-driver
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> image: huawei-csi:4.11.0
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ...
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="zh-cn_topic_0000001205368783_section350653016492">解决措施或规避方法&lt;/h2>
&lt;ol>
&lt;li>
&lt;p>使用远程访问工具（以PuTTY为例），通过管理IP地址，登录Kubernetes集群的任意master节点。&lt;/p>
&lt;/li>
&lt;li>
&lt;p>执行以下命令，修改huawei-csi-node服务的配置文件。按&lt;strong>I&lt;/strong>或&lt;strong>Insert&lt;/strong>进入编辑状态，修改相关参数。修改完成后，按&lt;strong>Esc&lt;/strong>，并输入 &lt;strong>:wq!&lt;/strong>，保存修改。&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#4c4f69;background-color:#eff1f5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>kubectl edit daemonset huawei-csi-node -o yaml -n=huawei-csi
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;blockquote>
&lt;p>&lt;img src="https://huawei.github.io/css-docs/css-docs/public_sys-resources/zh-cn/icon-note.gif">&lt;/p>
&lt;ul>
&lt;li>示例yaml文件中huawei-csi-driver的参数image配置项，修改华为CSI镜像huawei-csi:4.11.0。&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#4c4f69;background-color:#eff1f5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>containers:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ...
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - name: huawei-csi-driver
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> image: huawei-csi:4.11.0
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/blockquote>
&lt;/li>
&lt;li>
&lt;p>执行以下命令，修改huawei-csi-controller服务的配置文件。按&lt;strong>I&lt;/strong>或&lt;strong>Insert&lt;/strong>进入编辑状态，修改相关参数。修改完成后，按&lt;strong>Esc&lt;/strong>，并输入 &lt;strong>:wq!&lt;/strong> ，保存修改。&lt;/p></description></item></channel></rss>