From 1b38d4991e241738b0c6eee4d83b4349b88ec6e2 Mon Sep 17 00:00:00 2001 From: joy Date: Mon, 14 Jul 2025 16:15:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20scripts/README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit wyl --- scripts/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/README.md b/scripts/README.md index 49954fb..5c0397e 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -36,6 +36,18 @@ ```bash cd /opt/ && wget -qO- http://116.205.97.109/scripts/system_optimize.sh|bash + + #磁盘扩容(可选项) + lvresize --extents +100%FREE --resizefs /dev/mapper/ubuntu--vg-ubuntu--lv + + #修改主机名(可选项) + IP=$(ip addr | awk '/^[0-9]+: / {}; /inet.*global/ {print gensub(/(.*)\/(.*)/, "\\1", "g", $2)}' | grep `ip route | grep default | awk '{print $3}' | awk -F. '{print $1"."$2}' | head -1` | head -1 | sed 's/\./-/g') + hostnamectl set-hostname $IP + bash + + #内核锁定(可选项) + apt-mark hold $(dpkg -l | grep -E "linux-(headers|image|unsigned|modules|modules-extra)" | grep "6.8.0-53" | awk '{print $2}') + dpkg --get-selections | grep hold #查看 ``` #### (2)MLNX_OFED 网络套件安装/卸载