I came across something interesting (well, at least mildly interesting) a couple of weeks ago when I was rebuilding my home lab. My plan was to set up an archive directory on each device so that I can archive configurations and easily rollback or reset the lab to a specific configuration. All was well until I tried to use the mkdir command on one of the 2800 ISRs I inherited from a colleague.
I was a little surprised to see that the command was not found. I used the ol' context sensitive help method (i.e. I typed in "?") and sure enough, no sign of "mkdir" in the list of commands. This sparked a memory on the different file systems that IOS supports on PCMCIA flash drives. Since I "purged" the specifics a while ago, I had to RTFM. After a quick read, the problem is solved and I figured this would be something to throw in the blog-blender.
In IOS, there are three different classes of PCMCIA flash filesystems: Class A, Class B, and Class C. The class of filesystem used is based on the platform and how the filesystem is created. This isn't necessarily a 1:1 relationship. There is a somewhat dated Cisco document that discusses the three filesystems and the platform relationship. The document is useful even if one has to make some inferences on "newer" platforms. Bottom line in my case? -- I needed the Class C filesystem to use commands like mkdir, rmdir, and rename.
What defines the Class of the filesystem?
Apparently, you define the filesystem you want to use with the command
you use to "format" or create the file system the flash device. With the
Class A and Class C filesystems you use the format command and with Class B you use the erase command.
In my case, I was using a 2811 ISR that I inherited from one of my teammates and he must have used erase on the PCMCIA flash card. I resolved the issue by using format command and then I had the filesystem management commands I needed.
I guess the lesson learned (if there needs to be one) is that in life, when you get "hand me downs" you have to deal with faded colors, patches, and loose fitting clothes. In Cisco IOS-land, you have to deal with Class B file systems (...and unknown passwords, missing DSPs, etc.).
Thanks for reading. If you have time, post a comment!