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

VxFlex 作業系統:根目錄因檔案過大而填滿 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

新增可對 VxFlex OS GW 進行 REST 呼叫的新虛擬機器 (VM)。

根目錄/檔案系統已填滿。執行下列命令時,根目錄顯示 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

建立 LogRotation 組態

  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.