Core Issue
With certain Cisco IOS Software versions, when copying a file to Flash using TFTP, the command line will not prompt for the erase of the Flash device. In these cases, if insufficient space is avalable on the Flash device, the transfer will fail as shown in this example:
Router#copy tftp flash:
Address or name of remote host [10.137.17.100]?
Source filename [c2600-i-mz.121.T.bin]? c2600-i-mz.121-1.T.bin
Destination filename [c2600-i-mz.121-1.T.bin]?
Loading c2600-i-mz.121-1.T.bin from 10.137.17.100 (via Serial0/0): !
%Error copying tftp://10.137.17.100/c2600-i-mz.121-1.T.bin (Not enough space
on device)
Router#
Resolution
If, after issuing the copy tftp command, which does not prompt for the erase of the Flash device, the Not enough space on devicemessage appears, perform these steps:
- Check to see how much space is available on the Flash device by issuing the dir filesystem: command. This is an example of the command issued on a Cisco 2600 series router:
2600#dir flash:
System flash directory:
File Length Name/status
1 5247856 c2600-i-mz.122-5.bin [deleted]
5247920 bytes used, 3140688 available, 8388608 total]
8192K bytes of processor board System flash (Read/Write)
In the above example, 3,140,688 bytes are available. Therefore, if the file being copied to Flash is larger than that, the TFTP transfer will fail.
- If insufficient space is available, free up space by issuing either the erase filesystem: command or the deletefilesystem:filename command, followed by the squeeze filesystem: command. The command used depends on the Flash file system used on the router. For example, on a Cisco 2600 series router, the command would be erase flash:as shown in this example:
Router#erase flash:
Erasing the flash: filesystem will remove all files! Continue?[confirm]
Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ...erased
Erase of flash: complete
- Once the Flash device is erased, issue the copy tftp filesystem: command.