PowerFlex:根目录因Localhost_access.log文件而填满 — 日志轮换
Summary: 由于 /opt/emc/scaleio/gateway/logs/ 目录中保存有大量localhost_access日志,根目录已填满,从而导致问题。
This article applies to
This article does not apply to
This article is not tied to any specific product.
Not all product versions are identified in this article.
Symptoms
添加一个新的虚拟机 (VM),用于对 VxFlex OS GW 进行 REST 调用。
根目录/文件系统已填满。运行以下命令时,根目录显示 100% 已满:
根目录/文件系统已填满。运行以下命令时,根目录显示 100% 已满:
df -h或者,使用以下命令查看特定目录正在使用的存储量:
du -hs [subdirectory name]在本例中,它将是:
du -hs /opt/emc/scaleio/gateway/logs/
Cause
VxFlex OS GW 的外部产品和程序正在对此虚拟机进行多个 REST 调用,从而导致创建大型localhost_access.log文件。
Resolution
设置 FlexOS 网关 Catalina localhost_access LogRotation
- 修改位于此处的 server.xml 文件:
/opt/emc/scaleio/gateway/conf/server.xml- 从以下位置修改文件末尾的 localhost_access 记录器:
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log" suffix=".log" pattern="%h %l %u %t "%r" %s %b" />
- 收件人:
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access" suffix=".log" rotatable="false" pattern="%h %l %u %t "%r" %s %b" />
- 从以下位置修改文件末尾的 localhost_access 记录器:
- 保存文件。
- 使用以下命令停止和重新启动网关服务:
systemctl stop scaleio-gateway
systemctl start scaleio-gateway
创建 LogRotate 配置。
- 请转至
vi /etc/logrotate.d/scaleio-gateway - 将以下内容添加到文件中:
/opt/emc/scaleio/gateway/logs/localhost_access.log {
copytruncate
daily
rotate 7
compress
missingok
}
清理旧日志。
-
rm -rf /opt/emc/scaleio/gateway/logs/localhost_access_log.*.txt
- 新日志写入到
/opt/emc/scaleio/gateway/logs/localhost_access.log - 新日志每天轮换,持续 7 天
localhost_access.log.1.gz to 7.gz
Affected Products
PowerFlex rack, VxFlex Product FamilyProducts
PowerFlex Software, VxFlex Product FamilyArticle Properties
Article Number: 000058582
Article Type: Solution
Last Modified: 24 Nov 2025
Version: 10
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.