FWSM write mem Results in a File or directory Contents Introduction

advertisement
FWSM write mem Results in a File or directory
already in use Error
Document ID: 117815
Contributed by Dinkar Sharma and Magnus Mortensen, Cisco TAC
Engineers.
Jun 30, 2014
Contents
Introduction
Background Information
Problem
Solution
Introduction
This document describes how to troubleshoot a Cisco Firewall Services Module (FWSM) that displays the
File or directory already in use error when you attempt to save a configuration with the write memory
command in multiple−context mode.
Background Information
The FWSM has a 128−MB Compact Flash memory card that stores the operating system, configurations, and
other data. This Flash memory is partitioned into six different partitions. Each is used for a different purpose
as outlined here:
1. Maintenance image − This is similar to ROM Monitor Mode (ROMMON) in Cisco IOS®. It allows
for password recovery as well as image recovery if partitions 4 or 5 become corrupt.
2. Network configuration for maintenance image
3. Crash dump
4. flash:/ Images (Operating System (OS), Adaptive Security Device Manager (ASDM), system startup
configuration)
5. Alternate boot image
6. disk:/ Security context configurations, Rivest−Shamir−Addleman (RSA) keys, arbitrary files
In Step 3 of the Solution section, you format partition number 6, so the FWSM IOS image is not affected.
Regardless, you should resave all configurations after a format.
Problem
This error is observed when you save the configuration in a specific FWSM context.
FWSM/context−A# write mem
Building configuration...
Cryptochecksum: bb42c926 0c8918b1 61146122 c71e3091
%Error opening disk:/context−A.cfg (File or directory already in use)
%Error writing to disk:/context−A.cfg (File or directory already in use)
Error executing command
[FAILED]
Solution
In this case, the configuration file for the context in might be corrupted. Complete these steps in order to
troubleshoot the issue:
1. Enter the fsck command in order to check the consistency of the file system. The term fsck is an
acronym for filesystem check. This utility usually runs automatically at device startup and checks for
anomalies within the filesystem in case of abnormal events. It fixes the problem within the filesystem
and saves it as a recovery file. Enter the fsck disk: command in order to execute the fsck utility. After
you enter the fsck command, try to save the configuration again. If this fails, proceed to Step 2.
2. Change the URL for the context to another name and then execute the write mem command in that
context.
FWSM(config−context)#config−url disk:/context−A−new.cfg
Note: This is a temporarily solution.
You must be in the system context under the context configuration section in order to change the
configuration URL for a context. If this step does not resolve the issue, proceed to Step 3.
3. Format the Flash from the system context.
FWSM# format disk:
Format operation may take a while. Continue? [confirm]
Format operation will destroy all data in "disk:". Continue? [confirm]
Format: All system sectors written. OK...
Format: Total sectors in formatted partition: 116704
Format: Total bytes in formatted partition: 59752448
Format: Operation completed successfully.
Format of disk complete
FWSM#
Caution: This action removes all configurations from the flash. You must then execute the write
memory all command in order to resave all FWSM context configurations.
Updated: Jun 30, 2014
Document ID: 117815
Download