Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Unix知識 >> Unix資訊

AIX device busy 怎麼解:先把網路介面 down 再 detach

想對網卡或網路做操作,卻被 device busy 擋下來,是 AIX 上很常見的挫折。典型畫面像這樣:

rmdev -l ent1
Method error (/etc/methods/ucfgdevice):
0514-062 Cannot perform the requested function because the
specified device is busy.

步驟一:把介面 down 掉並 detach

用一段小腳本一次處理所有 TCP/IP 介面(lo0 除外):

interfaces=`lsdev -Cc if -F name | grep -v lo0`
for interface in $interfaces
do
  ifconfig $interface down
  ifconfig $interface detach
done

步驟二:檢查是哪個服務還抓著

SNA:

lssrc -g sna                  # 是否運行
stopsrc -g sna                # 中斷
stopsrc -f -s sna             # 強制中斷
/usr/bin/sna -stop sna -t forced
/usr/bin/sna -stop sna -t cancel

IPX:

ps -ef | grep npsd
ps -ef | grep sapd
/usr/lpp/netware/bin/stopnps

NetBIOS:

ps -ef | grep netbios
mcs0 unload

絕大多數 device busy 到這一步就能排除。若仍卡著,代表還有其他程式持有該設備,得再用 lsof 之類的手段逐一縮小範圍。

Copyright © Linux教程網 All Rights Reserved