跳转到主内容

如何在StorageGRID中手动轮换日志

Views:
35
Visibility:
Public
Votes:
0
Category:
storagegrid
Specialty:
sgrid
Last Updated:

适用场景

  • StorageGRID 7.5
  • StorageGRID 8.1
  • StorageGRID 8.5
  • StorageGRID 9.0

问题描述

StorageGRID服务器调试日志的通用位置是 /var/local/log/directory。

最新的日志消息会放置在 bycast.log 文件中、而较早的日志消息会定期轮换到bycast.log.n文件中。

注意:此日志格式涵盖所有网格软件,但以下软件除外:

  • 服务器管理器和Gridstat
  • 内容管理系统(CMS)
  • 网络管理系统- Web服务器和后端

示例:

在一个实例中、发现 /var/local 目录空间不足、导致某些服务崩溃。

  • bycast错误日志中报告了以下错误:

Jun 14 13:40:53 vch-vgh-mt1 ADE: |20671179 19221 000010 ARNI ETEL 2011-06-14T13:40:53.530316| CRITICAL 0667 ARNI: Assertion Failed [libs/cxd/CXD_DiskQueue.cc:667 UINT32 CXD_DiskQueue_Enqueue(CXD_DiskQueue*, CXD_Memory*)] ASSERT FAILED ("CXD_DiskQueue library unable to write (ERR_SYS_NOSPC)" == false) is false

  • 内核日志中报告了以下消息: 

Sep 15 20:10:30 servername syslog-ng[2596]: io.c: do_write: write() failed (errno 28), No space left on device

  • df-h 命令输出显示以下内容: 

Filesystem                        Size   Used   Avail   Use%   Mounted on
/dev/cciss/c0d0p1                  5.0G   2.5G   2.3G     52%   /
udev                              1014M  128K   1014M     1%   /dev
/dev/cciss/c0d0p3                  60G    60G    0       100%   /var/local
/dev/cciss/c0d1p1                 71G    69G    1.9G     98%   /var/local/mysql_ibdata
/dev/mapper/fsgvg-fsglv            64G    724K   64G       1%   /fsg
/dev/cciss/c0d3p1                  139G   29G    110G     21%   /var/local/rangedb/0

在检查 du -hx --max-depth=1 命令的输出时、日志已停止正确轮换。bycast.log的大小为52 GB、而的 ha.log 大小为6.2 GB。已手动删除这两个文件以清除空间。

该 ls -ltr 目录包含以下内容: 

-rw-r----- 1 root     root    108572147 Apr  8  2012 bycast.log.11.gz
-rw-r----- 1 root     root    108704513 Apr 29 11:00 bycast.log.10.gz
-rw-r----- 1 root     root    108611113 May 20 04:00 bycast.log.9.gz
-rw-r----- 1 root     root    108418726 Jun  9 18:00 bycast.log.8.gz
-rw-r----- 1 root     root    107182703 Jun 29 16:00 bycast.log.7.gz
-rw-r----- 1 root     root    104442374 Jul 20 16:00 bycast.log.6.gz
-rw-r----- 1 root     root    105747418 Aug 10 15:00 bycast.log.5.gz
-rw-r----- 1 root     root    105832058 Aug 31 18:00 bycast.log.4.gz
-rw-r----- 1 root     root    105523073 Sep 21 20:00 bycast.log.3.gz
-rw-r----- 1 root     root    105568607 Sep 28 22:00 bycast.log.2.gz
-rw-r----- 1 root     root     67548330 Oct  02 12:59 bycast-err.log.1
-rw-r----- 1 root     root     231233800 Oct 12 15:33 bycast-err.log
-rw-r----- 1 root     root   1075737021 Oct 02 22:00 bycast.log.1
-rw-r----- 1 root     root      52335833898 Oct 12 23:13 bycast.log

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.