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
新增可對 VxFlex OS GW 進行 REST 呼叫的新虛擬機器 (VM)。
根目錄/檔案系統已填滿。執行下列命令時,根目錄顯示 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.