Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Enjoy members-only rewards and discounts
  • Create and access a list of your products
Some article numbers may have changed. If this isn't what you're looking for, try searching all articles. Search articles

VxFlex OS:由于大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% 已满:
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

  1. 修改位于此处的 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" />
  2. 保存文件。
  3. 使用以下命令停止和重新启动网关服务:
systemctl stop scaleio-gateway
systemctl start scaleio-gateway

创建 LogRotate 配置

  1. 请转至 vi /etc/logrotate.d/scaleio-gateway
  2. 将以下内容添加到文件中:
/opt/emc/scaleio/gateway/logs/localhost_access.log {
  copytruncate
  daily
  rotate 7
  compress
  missingok
}

清理旧日志

  1. 请转至 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 Software

Products

PowerFlex Software, VxFlex Product Family
Article Properties
Article Number: 000058582
Article Type: Solution
Last Modified: 02 Aug 2024
Version:  8
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.