本文討論同時存取路由器的非易失性RAM(NVRAM)時遇到的問題以及如何解決這些問題。
本文件沒有特定需求。
本文件所述內容不限於特定軟體和硬體版本。
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路正在作用,請確保您已瞭解任何指令可能造成的影響。
如需文件慣例的詳細資訊,請參閱思科技術提示慣例。
同時存取路由器的NVRAM時,您可能會遇到以下兩個錯誤:
使用show startup-config指令顯示NVRAM的內容時:
Router#show startup-config Using 5524 out of 129016 bytes %Error opening nvram:/startup-config (Device or resource busy)
使用copy running-config startup-config指令將組態儲存到NVRAM時:
Router#copy running-config startup-config Destination filename [startup-config]? startup-config file open failed (Device or resource busy)
以下是幫助您解決本文檔中所示問題的逐步方法:
輸入show users命令以確定連線到路由器的使用者數。
Router#show users Line User Host(s) Idle Location 0 con 0 user1 idle 00:00:14 * 2 vty 0 user2 idle 00:00:00 64.104.207.114
如輸出所示,有另一個使用者通過控制檯連線到路由器。
第2行vty 0旁邊的「*」表示此會話中使用的行。如果存在兩個以上的使用者,請清除所有使用者(帶有「*」的行除外)。 該使用者此時已訪問NVRAM並已將其鎖定。
若要清除其他使用者所連線的線路並釋放NVRAM,請發出clear line指令。
Router#clear line 0
[confirm]
[OK]
再次發出show users命令以進行驗證。
Router#show users Line User Host(s) Idle Location * 2 vty 0 user2 idle 00:00:00 64.104.207.114
如圖所示,在此會話期間,只有一個使用者連線到路由器。
NVRAM現在可訪問,您可以發出show startup-config和copy running-config startup-config命令,而不會遇到任何其他問題。
Router#show startup-config Using 5524 out of 129016 bytes ! version 12.1 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption Router#copy running-config startup-config Destination filename [startup-config]? Building configuration... [OK] Router#
%SYS-4-NV_BLOCK_INITFAIL:當NVRAM中的可用空間小於2K時,出現「無法初始化nvram的幾何」錯誤消息。
臨時解決方案是使用write erase命令(格式為NVRAM),然後發出write memory命令。另一個選項是發出service compress-config命令。