This chapter describes the file system management.
The 7210 SAS file system is used to store files used and generated by the system, for example, image files, configuration files, logging files, and accounting files.
The file commands allow you to copy, create, move, and delete files and directories, navigate to a different directory, display file or directory contents and the image version.
The file system is based on a DOS file system. The 7210 SAS devices provide several storage options, including internal flash and USB.
The following compact flash devices are supported:
The device names are relative device names in that they refer to the devices local to the control processor running the current console session. As in the DOS file system, the colon (“:”) at the end of the name indicates it is a device.
The following table lists the storage locations available on specific 7210 SAS platforms.
7210 SAS platforms | Storage locations | ||
cf1:\ | cf2:\ | uf1:\ | |
7210 SAS-Mxp | ✓ | ✓ 1 | ✓ |
7210 SAS-R6 | ✓ | ✓ 1 | ✓ |
7210 SAS-R12 | ✓ | ✓ 1 | ✓ |
7210 SAS-S 1/10GE | ✓ | ✓ 2 | |
7210 SAS-Sx 1/10GE | ✓ | ✓ 2 | ✓ |
7210 SAS-Sx 10/100GE | ✓ | ✓ 2 | ✓ |
7210 SAS-T | ✓ | ✓ 1 | ✓ |
Notes:
In addition to user-added files and directories, the number of files in the root directory can also increment when the admin save or bof save commands are issued. The system enforces a threshold limit of 80 entries (files and directories) for contents of the root directory on cf1:\; there is no restriction on the number of files and directories that you can add in the subdirectories. A trap (tmnxRootDirFull) is generated if the threshold limit is exceeded, and a warning is generated for each new file or directory created in the root directory on cf1:\ after the threshold limit is exceeded.
Note: User intervention is required when the system displays the threshold exceeded event (tmnxRootDirFull). You are required to clean the root directory on cf1:\ and ensure that the number of entries (files or directories) is below the enforced threshold limit of 80 entries. Remove unnecessary files and directories from the root directory or move them to a subdirectory that you have created under the root directory. The system does not generate a warning when the number of files and directories is reduced below the threshold limit. |
Use the file dir cf1:\ command to determine the number of entries (files or directories) in the root directory. For example, in the following listing, the total number of entries in the root directory (file and directories) is 14 files + 2 directories = 16.
The 7210 SAS platform supports the use of the USB interface as an alternate storage location that provides a larger storage capacity than the internal flash. You can use a USB storage device to store TiMOS images, configuration files, accounting records, and log files. The BOF can point to images on the USB and you can use the USB to load TiMOS images and configuration files.
The following guidelines and caveats apply to the use of USB storage devices:
The default location for accounting records, logs, and others is set to point to cf1:\.
Note: Nokia recommends you should not store frequently written objects such as accounting records, system logs, and others on the internal flash (cf1:\), as it is non-replaceable. to store only systems images, configuration files, persistence database, nvsys.info, and QoS SAP resource map (the sdx file). Use the external flash (cf2:\) or use uf1:\ to store frequently written objects (as applicable). |
The following applies to storage locations on 7210 SAS-T, 7210 SAS-Mxp, 7210 SAS-Sx/S 1/10GE, 7210 SAS-Sx 10/100GE, 7210 SAS-R6, and 7210 SAS-R12 platforms:
For more information about the use of storage locations on 7210 SAS-R6 and 7210 SAS-R12 when using redundant CPM configuration, see Configuration guidelines for synchronization of active and standby CPM on 7210 SAS-R6 and 7210 SAS-R12.
The following are configuration guidelines for storing files:
The arguments for the 7210 SAS file commands are modeled after standard universal resource locator (URL). A URL refers to a file (a file-url) or a directory (a directory-url).
7210 SAS OS supports operations on both the local file system and on remote files. For the purposes of categorizing the applicability of commands to local and remote file operations, URLs are divided into three types: local, ftp and tftp. The syntax for each of the URL types is listed in the following table.
URL type | Syntax | Notes |
local-url | [cflash-id:\]path [usb-flash-id:\]path | cflash-id is the compact flash device name Values: cf1:\ and cf2:\ (only on 7210 SAS-T and 7210 SAS-Mxp) usb-flash-id is the USB device name Values: uf1:\ |
ftp-url | ftp://[username[:password]@]host/path | An absolute ftp path from the root of the remote file system username is the ftp username password is the ftp user password host is the remote host path is the path to the directory or file |
ftp://[username[:password]@]host/./path | A relative ftp path from the user’s home directory Note the period and slash (“./”) in this syntax compared to the absolute path | |
tftp-url | tftp://host[/path]/filename | tftp is only supported for operations on file-urls |
All the commands can operate on the local file system. The following table describes which commands also support remote file operations.
Command | local-url | ftp-url | tftp-url |
attrib | ✓ | ||
cd | ✓ | ✓ | |
copy | ✓ | ✓ | ✓ |
delete | ✓ | ✓ | |
dir | ✓ | ✓ | |
md | ✓ | ||
move | ✓ | ✓ | |
rd | ✓ | ||
scp | source only | ||
type | ✓ | ✓ | ✓ |
version | ✓ | ✓ | ✓ |
The system accepts either forward slash (“/”) or backslash (“\”) characters to delimit directories and filenames in URLs. Similarly, the SCP client application on the 7210 SAS can use either slash or backslash characters, but not all SCP clients treat backslash characters as equivalent to slash characters. In particular, UNIX systems will often times interpret the backslash character as an “escape” character. This can cause problems when using an external SCP client application to send files to the SCP server. If the external system treats the backslash like an escape character, the backslash delimiter will get stripped by the parser and will not be transmitted to the SCP server.
For example, a destination directory specified as “cf1:\dir1\file1” will be transmitted to the SCP server as “cf1:dir1file1” where the backslash escape characters are stripped by the SCP client system before transmission. On systems where the client treats the backslash like an “escape” character, a double backslash “\\” or the forward slash “/” can typically be used to correctly delimit directories and the filename.
7210 SAS supports the standard DOS wildcard characters. The asterisk (*) can represent zero or more characters in a string of characters, and the question mark (?) can represent any one character.
This section describes system file management tasks including copying, moving, displaying and deleting files; modifying file attributes; and creating, displaying, and deleting directories.
Note: When a file system operation is performed with a command that can potentially delete or overwrite a file system entry (such as the copy, delete, move, rd, or scp command), a prompt appears to confirm the action. The force keyword performs these file management operations without displaying the confirmation prompt. |
The system administrator can change the read-only attribute in the local file. Enter the attrib command with no options to display the contents of the directory and the file attributes.
Use the following CLI syntax to modify file attributes:
The following example shows command syntax usage:
Note: In the preceding example, instead of cf1:\ user can specify uf1:\ to manage the file attributes of the file located on the USB drive.
The following displays the file configuration:
Use the md command to create a new directory in the local file system, one level at a time.
Enter the cd command to navigate to different directories.
Use the following CLI syntax to create a new directory:
The following example shows command syntax usage:
Use the copy command to upload or download an image file, configuration file, or other file types to or from a flash card or a TFTP server.
The scp command copies files between hosts on a network. It uses SSH for data transfer, and uses the same authentication and provides the same security as SSH.
The source file for the scp command must be local. The file must reside on the router. The destination file has to be of the format: user@host:file-name. The destination does not need to be local.
Use the following CLI syntax to copy files:
The following example shows command syntax usage:
Use the move command to move a file or directory from one location to another.
Use the following CLI syntax to move files:
The following example shows command syntax usage:
Use the delete and rd commands to delete files and remove directories. Directories must be empty before they can be removed. When file or directories are deleted they cannot be recovered.
Use the following CLI syntax to delete files and remove directories:
The following example shows command syntax usage:
Use the dir command to display a list of files on a file system. Use the type command to display the contents of a file. Use the version command to display the version of a cpm.tim or iom.tim file.
Use the following CLI syntax to display directory and file information:
The following displays an example of the command syntax: