取消
显示结果 
搜索替代 
您的意思是: 
cancel
5177
查看次数
36
有帮助
2
评论
Luke Huang
Cisco Employee
Cisco Employee
本帖最后由 fushuang 于 2018-7-18 21:33 编辑
案例背景:
Cisco N3172-10G non-XL 设备,默认的 bootflash 大小为2G,可用空间在1.6G 左右。
如果需要从当前的 7.x 版本,向上升级,那么会遇到 bootflash size 的瓶颈:
每个7.x image 大小在500M - 960M 之间,bootflash 无法同时存放两个 image。
本文使用的 LAB 设备,初始版本为 7.0.3.I4.7(700M),需要升级到 7.0.3.I7.3(900M)。
700M + 900M 大约是1.56G。

Bootflash: 2 GB (3172PQ, 3172TQ, and 3172TQ-32T)
Bootflash: 16 GB (3172PQ-XL and 3172TQ-XL)**

升级前准备:
备份配置、license;
需要将nxos.7.0.3.I7.3.bin导入设备,比如bootflash,或者 USB。
本文是需要将 image 导入 bootflash;如果您可以直接导入 USB,那么不需要执行下文的 compact 步骤。

设备信息:
switch#
switch# show version

Software
BIOS: version 4.0.0
NXOS: version 7.0(3)I4(7)
BIOS compile time: 12/05/2016
NXOS image file is: bootflash:///nxos.7.0.3.I4.7.bin
NXOS compile time: 6/28/2017 14:00:00 [06/28/2017 21:53:29]

Hardware
cisco Nexus 3172 Chassis
Intel(R) Pentium(R) CPU @ 2.00GHz with 4031512 kB of memory.
Processor Board ID ZZZZZZZZZZZ

Device name: switch
bootflash: 1597824 kB
usb1: 0 kB (expansion flash)

Kernel uptime is 5 day(s), 7 hour(s), 45 minute(s), 21 second(s)

Last reset at 351748 usecs after Wed Jul 11 04:08:04 2018

Reason: Disruptive upgrade
System version: 6.0(2)U6(8)
Service:

plugin
Core Plugin, Ethernet Plugin

Active Package(s):
switch#
switch#
switch# show module
Mod Ports Module-Type Model Status
--- ----- ------------------------------------- --------------------- ---------
1 54 48x10GE + 6x40G Supervisor N3K-C3172PQ-10GE active *

Mod Sw Hw Slot
--- ---------------- ------ ----
1 7.0(3)I4(7) 1.2 NA

switch#
switch# dir
702663680 Apr 11 21:36:30 2018 nxos.7.0.3.I4.7.bin

Usage for bootflash://
802336768 bytes used
808067072 bytes free
1610403840 bytes total

从官网下载nxos.7.0.3.I7.3.bin image, 文件大小为 960M, bootflash 可用空间不足。

解决方法:
Cisco Nexus 3000 从 7.x 版本开始,提供了压缩image 的功能。具体操作方式如下:

switch# install all nxos nxos.7.0.3.I4.7.bin compact
Installer will perform compatibility check first. Please wait.
Compacting currently loaded image bootflash:/nxos.7.0.3.I4.7.bin
...................................................
Compact bootflash:/nxos.7.0.3.I4.7.bin done
switch#
switch# dir
415906816 Jul 16 11:59:07 2018 nxos.7.0.3.I4.7.bin

Usage for bootflash://
515297280 bytes used
1095106560 bytes free
1610403840 bytes total
switch#

压缩后, bootflash 剩余空间足够,可以将目标版本 copy 到设备。

switch# dir
415906816 Jul 16 11:59:07 2018 nxos.7.0.3.I4.7.bin
962771456 Jul 16 16:19:02 2018 nxos.7.0.3.I7.3.bin

Usage for bootflash://
1475674112 bytes used
134729728 bytes free
1610403840 bytes total
switch#
switch# show file bootflash:nxos.7.0.3.I7.3.bin md5sum 0b81e1dc6289c0dee218640626f40842
<<< 确认 MD5校验值正确,文件在 copy 过程中无损坏
switch#
switch#

升级过程:
switch# install all nxos bootflash:nxos.7.0.3.I7.3.bin
Installer will perform compatibility check first. Please wait.
Installer is forced disruptive

Verifying image bootflash:/nxos.7.0.3.I7.3.bin for boot variable "nxos".
[####################] 100% -- SUCCESS

Verifying image type.
[####################] 100% -- SUCCESS
[## ] 5% -- SUCCESS

Preparing "nxos" version info using image bootflash:/nxos.7.0.3.I7.3.bin.
[####################] 100% -- SUCCESS

Preparing "bios" version info using image bootflash:/nxos.7.0.3.I7.3.bin.
[####################] 100% -- SUCCESS

Collecting "running" plugin(s) information.
[####################] 100% -- SUCCESS

Collecting plugin(s) information from "new" image.
[####################] 100% -- SUCCESS
[####################] 100% -- SUCCESS

Performing module support checks.
[####################] 100% -- SUCCESS

Notifying services about system upgrade.
[####################] 100% -- SUCCESS

Compatibility check is done:
Module bootable Impact Install-type Reason
------ -------- -------------- ------------ ------
1 yes disruptive reset default upgrade is not hitless

Images will be upgraded according to following table:
Module Image Running-Version(pri:alt) New-Version Upg-Required
------ ---------- ---------------------------------------- -------------------- ------------
1 nxos 7.0(3)I4(7) 7.0(3)I7(3) yes
1 bios v4.0.0(12/05/2016) v4.4.0(11/06/2017) yes

Switch will be reloaded for disruptive upgrade.
Do you want to continue with the installation (y/n)? y

Install is in progress, please wait.

Performing runtime checks.
[####################] 100% -- SUCCESS

Setting boot variables.
[####################] 100% -- SUCCESS

Performing configuration copy.
[####################] 100% -- SUCCESS

Module 1: Refreshing compact flash and upgrading bios/loader/bootrom.
Warning: please do not remove or power off the module at this time.
[####################] 100% -- SUCCESS

Finishing the upgrade, switch will reboot in 10 seconds.
switch#
(c) Copyright 2015, Cisco Systems.

ht 2017, Cisco Systems.
N3172P BIOS v.4.4.0, Mon 11/06/2017

Press TAB in 1 seconds to list all boot options
Any other key to active boot...
Press ctrl L to go to loader prompt in 2 secs

Booting kickstart image: bootflash:/nxos.7.0.3.I7.3.bin
CardIndex = 11117
Image valid
Installing klm_card_index
done
INIT: version 2.88 booting
Skipping ata_piix install for n3k.
Unsquashing rootfs ...
Removing libcrdcfgdata and linking libcrdcfgdata3nk
Installing isan procfs ... done.
Installing SSE module with card index 11117 ... done.
Creating SSE device node 246 ... done.
Loading I2C driver ... done.
Installing CCTRL driver for card_type 31 without NEED_GEM ... done.
8.98: Interrupt throttling disabled. No cctrl irq detected.
Loading IGB driver ... done.
Checking for eUSB firmware upgrade..
eUSB firmware upgrade required
Updating the firmware in progress..
Firmware update successful..
Done with Firmware Update

Checking all filesystems.Current boot disk sda3..

Installing SPROM driver ... IS_N3K done.
Skipping installing default sprom values for N3k...
Installing pfmsvcs module with SPROM card index 11117 ... done.
Installing nvram module ... done.
Installing if_index module with port mode 6 ... done.
Installing fcfwd stub
Installing RNI lcnd ... done
Installing LC netdev ... done
Installing psdev module ... done.
Installing veobc module ... done.
Inserting OBFL module ... done.
Making OBFL character devices
Mounting OBFL pstore for mtd
invalid group file entry
delete line 'aaa-db-operator:508:'? No
grpck: no changes
exit code: 1
Starting OpenBSD Secure Shell server: sshd ... done.
Trim files after extracting TOR files ...
tune2fs 1.42.1 (17-Feb-2012)
Setting reserved blocks percentage to 0% (0 blocks)
Starting portmap daemon...
creating NFS state directory: done
starting 8 nfsd kernel threads: done
starting mountd: done
starting statd: done
Saving image for img-sync ...
Found /mnt/pss/rtdbctrl.log, migrating to /mnt/pss/xlog/
Loading system software
Installing local RPMS
Patch Repository Setup completed successfully
Creating /dev/mcelog
Starting mcelog daemon
Removing dme lib
Moving N3K specific syslog config file
INIT: Entering runlevel: 3
Running S93thirdparty-script...

Populating conf files for hybrid sysmgr ...
Removing bios-imgs and /lcimages
Starting hybrid sysmgr ...
inserting /isan/lib/modules/klm_cisco_nb.o ... done
Executing Prune clis.

User Access Verification
switch login: admin
Password:

升级完成:
switch#
switch# show version

Software
BIOS: version 4.4.0
NXOS: version 7.0(3)I7(3)
BIOS compile time: 11/06/2017
NXOS image file is: bootflash:///nxos.7.0.3.I7.3.bin
NXOS compile time: 2/12/2018 13:00:00 [02/12/2018 19:13:48]

Hardware
cisco Nexus 3172 Chassis
Intel(R) Pentium(R) CPU @ 2.00GHz with 4031108 kB of memory.
Processor Board ID FOC21416T26

Device name: switch
bootflash: 1597824 kB
usb1: 0 kB (expansion flash)

Kernel uptime is 0 day(s), 0 hour(s), 6 minute(s), 17 second(s)

Last reset at 709635 usecs after Tue Jul 17 01:42:48 2018
Reason: Reset due to upgrade
System version: 7.0(3)I4(7)
Service:

plugin
Core Plugin, Ethernet Plugin

Active Package(s):

switch#
switch# show system reset-reason
----- reset reason for module 1 (from Supervisor in slot 1) ---
1) At 709635 usecs after Tue Jul 17 01:42:48 2018
Reason: Reset due to upgrade
Service:
Version: 7.0(3)I4(7)

switch#
switch# dir
415906816 Jul 16 11:59:07 2018 nxos.7.0.3.I4.7.bin
962771456 Jul 16 16:19:02 2018 nxos.7.0.3.I7.3.bin

Usage for bootflash://
1476182016 bytes used
134221824 bytes free
1610403840 bytes total
switch#

可以 delete nxos.7.0.3.I4.7.bin 来清理 bootflash 空间


评论
zhengwei272
Spotlight
Spotlight
不错的经验,感谢分享
cuilingfeng
Level 1
Level 1
压缩大法好~:lol install all nxos nxos.7.0.3.I4.7.bin compact
入门指南

使用上面的搜索栏输入关键字、短语或问题,搜索问题的答案。

我们希望您在这里的旅程尽可能顺利,因此这里有一些链接可以帮助您快速熟悉思科社区:









快捷链接