Q & A

ARP Cache 不會更新

問題說明:兩部相同規格的 Linux 主機,平時互作備援,網路設定各有一個固定 IP 與共用一個 VIP,VIP 使用 Alias IP 方式。每次移動 VIP 至另一部主機時,都會遇到其他鄰近的不同 vLAN 的主機無法 ping 這 VIP,原因是它們的 Switch 設備與 Core Switch 不會立即更新 ARP Cache,直到 Switch 上設定的 ARP 更新間隔時間到達。

解決方案:要讓 Core Switch 立即更新 ARP Cache,可以再切換 VIP 後,從目的端 Linux 主機上執行

arping -I eth1 your.vip.address
NFS 遠端目錄無法卸載

當遭遇某些異常情況時,原先的 NFS 目錄可能無法用指令 umount 正常卸載,且主機因為還在營運生產中,不能執行重開機時,下述的指令可能會有幫助。

# 檢查那些程序及用戶使用該目錄
fuser -m -v <mount_point>
lsof | grep <mount_point>
lsof +f -- <path-to-dir>

# 刪除無效的程序
fuser -i -k <mount_point>

# 以上都無效,可重啟 NFS Client daemon,但其他 NFS 目錄也會被迫中斷。
service netfs stop
service netfs start

# 網友提供的另一個方法
umount -l <mount_point>
檢查線上 NFS 掛載參數, nfs 版本
cat /proc/mounts | grep nfs 
Can't mount remotely Linux host on AIX

Try to run the following commands on your AIX.

nfso -o nfs_use_reserved_ports=1
nfso -o portcheck=1
Remove Shared Memory
# see all shared memory segments
# status: dest -> destroyed
# nattach: how many application being attached to the shared memory. 
ipcs -m
ipcs -m -i <shmid>

# remove the shared memory segment
ipcrm shm <shmid>
ipcrm -m <shmid>
CentOS Upgrade Kernel: linux-firmware package files conflicts

說明:要升級 CentOS 7.6 Kernel to CentOS 7.7,遇到 linux-firmware 套件衝突問題。

rpm -ivh kernel-3.10.0-1062.el7.x86_64.rpm

warning: kernel-3.10.0-1062.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
error: Failed dependencies:
        linux-firmware >= 20190429-72 is needed by kernel-3.10.0-1062.el7.x86_64
        

rpm -ivh linux-firmware-20190429-72.gitddde598.el7.noarch.rpm kernel-3.10.0-1062.el7.x86_64.rpm

warning: linux-firmware-20190429-72.gitddde598.el7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
warning: kernel-3.10.0-1062.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing...                          ################################# [100%]
        file /usr/lib/firmware/amd-ucode/microcode_amd_fam17h.bin from install of linux-firmware-20190429-72.gitddde598.el7.noarch conflicts with file from package linux-firmware-20180911-69.git85c5d90.el7.noarch
        file /usr/lib/firmware/amd-ucode/microcode_amd_fam17h.bin.asc from install of linux-firmware-20190429-72.gitddde598.el7.noarch conflicts with file from package linux-firmware-20180911-69.git85c5d90.el7.noarch
        
# Solution:
rpm -Uvh linux-firmware-20190429-72.gitddde598.el7.noarch.rpm
rpm -ivh kernel-3.10.0-1062.el7.x86_64.rpm