跳转到主内容

如何更正由于核心而导致的 StorageGRID 核心文件截断 文件大小限制

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

适用场景

StorageGRID

问题描述

本文介绍删除可能导致核心文件被截断的 StorageGRID 核心文件大小限制的过程。

在将任何 StorageGRID 核心文件上传到 NetApp 之前,请使用 GDB 回溯跟踪测试文件完整性。有关执行 GDB 回退跟踪的信息,请参见知识库文章 : How to Collect a GDB backtrace from a StorageGRID service

GDB 输出将指示核心文件是否在 GNU 许可证标题后面被截断。

示例:

gdb /usr/local/clb/clb clb.core.29051

GNU gdb (GDB) SUSE (6.8.50.20090302-1.5.18)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-suse-linux".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
BFD: Warning: /var/local/core/clb.core.29051 is truncated: expected core file size >= 1381822464, found: 1381818368. 

最后一行( GNU 标题后面的第一行)也可能类似于以下内容: 

"/var/local/core/clb.core.29051" is not a core dump: File truncated

核心文件被截断的原因有多种,如下所示:

  • 磁盘 / 文件系统 I/O 问题
  • RAM 问题
  • 操作系统对核心文件大小的限制

如果发现截断的文件,请首先确认对核心文件大小没有限制,然后删除找到的限制。要删除核心文件大小限制,可以先编辑相应的操作系统参数,然后重新启动服务器。

操作步骤

请执行以下步骤:

注意:在运行 GDB 回溯跟踪过程中,您应已登录到服务器。

  1. 运行以下命令,检查核心文件大小是否无限制:

ulimit -c

  1. 这将返回值 unlimited。如果返回的是数字值,请使用文本编辑器(vin诺 )编辑文件:

/etc/profile.local 

  1. 编辑ulimit -c 行,如下所示:

ulimit -c unlimited 

  1. 保存文件。
  2. 停止服务并重新启动服务器:
  • service servermanager stop
  • reboot 
  1. 验证现在是否正确返回值 unlimited :

ulimit -c 

此时,请暂停以重新出现原始问题,以便可以生成新的核心文件。

Sign in to view the entire content of this KB article.

New to NetApp?

Learn more about our award-winning Support

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.
Scan to view the article on your device