Centos6

如果它阻止升級,可以在生產系統上刪除 kernel-debug* 嗎?KVM 模板:/boot 沒有足夠的空間

  • July 15, 2016

因此,在一個非常好的主機上存在遺留的 CentOS 6.x VPS 模板,這些模板“卡”在 100mb /boot 分區上。不幸的是,自從它在 4 年前誕生以來,我們的其中一台伺服器就屬於這一類。如果沒有更改區域以獲取具有更多空間的新包/模板,則無法增加 /boot 的大小。切換區域將是一項艱鉅的任務,因為需要重新執行新的 IP 和其他模式,因此我們正在尋找替代方案。

我們在那台伺服器上使用 CloudLinux,所以核心可能比正常的要大一些。無論哪種方式,我們都被迫將活動核心縮減為 1,這讓我很困擾,但這就是 /boot 中的全部內容。問題是沒有足夠的空間來安裝新版本的核心。

Kernel-debug* 包似乎比標準核心大。刪除這些安全嗎?如果有舊版本的標準核心,調試核心在生產中是否有用$$ potentially $$可用於啟動?

這是一個執行 LAMP 的多租戶生產 VPS (KVM)。我們並沒有在它上面做太多的伺服器端 CLI,它主要是 ecom+webapps。如果可以提供某種解決方法,它具有核心護理。

使用 kernel-debug* 意味著 kernel-debug 和 kernel-debuginfo 因為這兩個包之間存在差異

Kernel-debuginfo: Provides a executable image of the kernel with all the debug symbols

Kernel-debug: Enables some debugging code but not have same debug symbols on it 

### Excerpt from RedHat Doc ###


The kernel-debug enables the following options on the kernel that are disabled on the default kernel:

CONFIG_DEBUG_SLAB

Makes kernel do limited verification on memory allocation as well as    poisoning memory on free to catch use of freed memory. (performance impact mainly on kmalloc / mfree calls).
CONFIG_DEBUG_MUTEXES

Allows mutexes semantics violations to be detected and reported.
CONFIG_DEBUG_RT_MUTEXES

Allows rt mutex semantics violations and rt mutex related deadlocks  (lockups) to be detected and reported automatically.
CONFIG_DEBUG_RWSEMS

Allows read-write semaphore semantics violations to be detected and reported.
CONFIG_DEBUG_LOCK_ALLOC

This feature will check whether any held lock (spinlock, rwlock, mutex or rwsem) is incorrectly freed by the kernel, via any of the memory-freeing routines (kfree(), kmem_cache_free(), free_pages(), vfree(), etc), whether a live lock is incorrectly reinitialized via spin_lock_init(),mutex_init(),etc, or  whether there is any lock held during task exit.

CONFIG_PROVE_LOCKING

This feature enables the kernel to prove that all locking that occurs in the kernel runtime is mathematically correct: that under no circumstance could an arbitrary (and not yet triggered) combination of observed locking sequences (on an arbitrary number of CPUs, running an arbitrary number of tasks and interrupt contexts) cause a deadlock.

CONFIG_DEBUG_VM

Turn on extended checks in the virtual memory system (performance impact).
CONFIG_DEBUG_SPINLOCK

Built SMP to catch missing spinlock initialization and certain other kinds  of spinlock errors commonly made. This is best used in conjunction with the NMI watchdog so that spinlock deadlocks are also debuggable.
CONFIG_DEBUG_SPINLOCK_SLEEP

Various routines which may sleep will become very noisy if they are called with a spinlock held.
CONFIG_LOCK_STAT

Enables tracking lock contention points ( see /usr/share/doc/kernel-doc/Documentation/lockstat.txt ).
CONFIG_XFS_DEBUG

Enable XFS debugging features, including ASSERT checks, function wrappers around macros, and extra sanity-checking functions in various code paths (make a huge and slow code).

現在回到你的問題,刪除這些安全嗎?

這些軟體包僅用於調試目的,它們可能會導致性能下降。所以是的,它們可以安全地刪除,並且只需要在調試期間安裝。

引用自:https://serverfault.com/questions/790067