cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
745
Views
0
Helpful
1
Replies

9200 Cleanup flash of hidden files (app. 500MB) to update the switch

FredericMJMoreno
Community Member

Hello there,

A while ago, we wanted to update all our switches to a more recent firmware version (17.9.5) with Catalyst Center.

While doing that, we encountered an issue, on a few stacks, where a switch of those stacks wouldn't have enough space on its flash to perform the activation, or even distribution sometimes, getting one of the following errors :

- Failure (NCSW32001: Distribution failed using protocol: HTTPS. Found not enough space on flash post flash clean-up. Please re-trigger the distribution post manual clean-up)

- Failure (NCSW40000: Error occured while executing the command 'install add file flash:cat9k_lite_iosxe.17.09.05.SPA.bin activate commit'. Command Output : FAILED: There is not enough free disk available to perform this operation on switch 4. At least 462728 KB of free disk is required <3>%INSTALL-3-OPERATION_ERROR_MESSAGE: R0/0: install_engine: Failed to install_add_activate_commit package flash:cat9k_lite_iosxe.17.09.05.SPA.bin, Error: There is not enough free disk available to perform this operation on switch 4.)

 

When using dir flash-X: and show flash-X: commands, it was impossible to identify where the used space was coming from.

After a few time of research, I identified it was coming from a bug. When a switch of a stack get the Active role once, and then go back to a member role, the flash cleanup of some processes run on the active switch of the stack won't perform correctly.


To clean up the impacted flash, I use the following CLI commands :

1. Make the problematic switch active in the stack, in this example, we got a 4 × 9200 stack with the switch 4 impacted :

Switch#dir flash-4:

1956839424 bytes total (270094336 bytes free)

Switch#switch 1 priority 1
Switch#switch 4 priority 15
Switch#reload reason Switch4FlashCleanup

2. Once the reboot is over and the switch 4 is Active, we can start the cleanup :

We check that Switch 4 has the correct role :

Switch#show switch 
Switch/Stack Mac Address : aaaa.0000.6666 - Local Mac Address
Mac persistency wait time: Indefinite
H/W Current
Switch# Role Mac Address Priority Version State
-------------------------------------------------------------------------------------
1 Member 1111.2222.3333 10 V02 Ready
2 Member 4444.5555.6666 11 V02 Ready
3 Standby 7777.8888.9999 12 V01 Ready
*4 Active 0000.aaaa.bbbb 15 V01 Ready

 

We execute the following commands to clean up the flash :

Switch#conf t 
Switch(config)#iox
Switch(config)#end
Switch#guestshell enable
!!! Often have to use it two time, as the first won't work properly, go figure !!!
Switch#guestshell enable
Switch#guestshell destroy
Switch#conf t
Switch(config)#no iox
Switch(config)#end

3. The switch should get the space back on its flash :

Switch#dir flash-4:

1957167104 bytes total (694157312 bytes free)

Hoping this will help people who encounter the same issue I had and save you some time

1 Reply 1

test-switch#request platform software package clean switch all

Check this command' please read about it before apply.

https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst3850/software/release/16-6/command_reference/b_166_3850_cr/b_166_3850_new_chapter_01101.html

MHM