1. 程式人生 > >博科SAN交換機學習筆記之二:配置檔案備份與韌體升級 作者 LiaoJL | 轉載時請務必以超連結形式標明文章原文連結和作者資訊及本版權宣告。 原文連結:http://www.liaojl.co

博科SAN交換機學習筆記之二:配置檔案備份與韌體升級 作者 LiaoJL | 轉載時請務必以超連結形式標明文章原文連結和作者資訊及本版權宣告。 原文連結:http://www.liaojl.co

配置檔案恢復

當需要備份中恢復交換機配置時,可以通過configdownload命令將博科交換機的配置從遠端伺服器恢復到交換機。博科交換機支援將舊版本的配置檔案匯入新版本韌體的交換機,例如將v6.2.0的配置檔案匯入v6.3.0韌體版本的交換機,或者將v6.4.1 配置檔案匯入 v7.0.0 版本的交換機。

如果將配置檔案匯入到不相容的韌體版本交換機,可能導致交換機故障。建議經常儲存配置檔案,確保備份的配置檔案與交換機韌體版本相同。

韌體v6.1.0及以後的版本,恢復配置檔案時不需要disableswitch。某些特殊情況下,恢復配置檔案以後會提示你重啟交換機。

FCSwitch:root> configdownload
Protocol (scp, ftp, local) [ftp]:
Server Name or IP Address [host]: ftp.liaojl.com
User Name [user]: liaojl
Path/Filename [<home dir>/config.txt]: FCSwitch/FCSwitch-all.txt
Section (all|chassis|FID# [all]): all
*** CAUTION ***
This command is used to download a backed-up configuration
for a specific switch. If using a file from a different
switch, this file's configuration settings will override
any current switch settings. Downloading a configuration
file, which was uploaded from a different type of switch,
may cause this switch to fail. A switch reboot might be
required for some parameter changes to take effect.
configDownload operation may take several minutes
to complete for large files.
Do you want to continue [y/n]: y
Password: <hidden>
configDownload complete.

韌體升級

升級韌體前,檢視一下根分割槽的磁碟容量,如果使用率超過60%,建議聯絡Brodecade技術支援處理。

FCSwitch:root> df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/root               495016    165432    304032  35% /
/dev/hda1               494984    165712    303724  35% /mnt

檢視交換機當前韌體版本:

FCSwitch:root> version
Kernel:     2.6.14.2
Fabric OS:  v6.4.1a
Made on:    Tue Dec 14 03:02:28 2010
Flash:      Mon Sep 12 11:03:46 2011
BootProm:   1.0.9

FCSwitch:root> firmwareShow
Appl     Primary/Secondary Versions
-----------------------------------------
FOS      v6.4.1a
         v6.4.1a

使用firmwareDownload工具從FTP伺服器下載韌體並升級。

FCSwitch:root> firmwareDownload
Server Name or IP Address: ftp.liaojl.com
User Name: liaojl
File Name: v6.4.2b
Network Protocol(1-auto-select, 2-FTP, 3-SCP) [1]: 2
Password:
Do you want to continue (Y/N) [Y]: y

All packages have been downloaded successfully.
Firmware has been downloaded to the secondary partition of the switch
HA Rebooting ...

升級過程一般需要10到30分鐘,你可以使用firmwareDownloadStatus 命令來檢視升級狀態。

FCSwitch:root> firmwareDownloadStatus
[1]: Tue Feb 14 06:29:33 2012
Firmware is being downloaded to the switch. This step may take up to 30 minutes.

[2]: Tue Feb 14 06:33:27 2012
Firmware has been downloaded to the secondary partition of the switch.

[3]: Tue Feb 14 06:35:49 2012
The firmware commit operation has started. This may take up to 10 minutes.

[4]: Tue Feb 14 06:38:44 2012
The commit operation has completed successfully.

[5]: Tue Feb 14 06:38:44 2012
Firmwaredownload command has completed successfully. Use firmwareshow to verify
the firmware versions.

交換機重啟以後,重新登入交換機,檢視當前的Kernel和韌體資訊。

FCSwitch:root> version
Kernel:     2.6.14.2
Fabric OS:  v6.4.2b
Made on:    Tue Sep 20 17:57:39 2011
Flash:      Tue Feb 14 06:18:51 2012
BootProm:   1.0.9

FCSwitch:root> firmwareShow
Appl     Primary/Secondary Versions
------------------------------------------
FOS      v6.4.2b
         v6.4.2b