- Table of Contents
-
- H3C S7500 Series Operation Manual(Release 3100 Series)-(V1.04)
- 00-1Cover
- 00-2Overview
- 01-CLI Configuration
- 02-Login Configuration
- 03-Configuration File Management Configuration
- 04-VLAN Configuration
- 05-Extended VLAN Application Configuration
- 06-IP Address-IP Performance-IPX Configuration
- 07-GVRP Configuration
- 08-QinQ Configuration
- 09-Port Basic Configuration
- 10-Link Aggregation Configuration
- 11-Port Isolation Configuration
- 12-Port Binding Configuration
- 13-DLDP Configuration
- 14-MAC Address Table Configuration
- 15-MSTP Configuration
- 16-Routing Protocol Configuration
- 17-Multicast Configuration
- 18-802.1x Configuration
- 19-AAA-RADIUS-HWTACACS-EAD Configuration
- 20-Traffic Accounting Configuration
- 21-VRRP-HA Configuration
- 22-ARP Configuration
- 23-DHCP Configuration
- 24-ACL Configuration
- 25-QoS Configuration
- 26-Mirroring Configuration
- 27-Cluster Configuration
- 28-PoE Configuration
- 29-UDP-Helper Configuration
- 30-SNMP-RMON Configuration
- 31-NTP Configuration
- 32-SSH Terminal Service Configuration
- 33-File System Management Configuration
- 34-FTP and TFTP Configuration
- 35-Information Center Configuration
- 36-DNS Configuration
- 37-System Maintenance and Debugging Configuration
- 38-HWPing Configuration
- 39-RRPP Configuration
- 40-NAT-Netstream-Policy Routing Configuration
- 41-Telnet Protection Configuration
- 42-Hardware-Dependent Software Configuration
- Related Documents
-
Title | Size | Download |
---|---|---|
33-File System Management Configuration | 86 KB |
Table of Contents
Chapter 1 File System Management
1.1.1 Introduction to File System
1.1.3 File System Configuration Tasks
1.1.4 Directory-Related Operations
1.1.6 Storage Device-Related Operations
1.1.7 Prompt Mode Configuration
1.1.8 File System Configuration Example
Chapter 1 File System Management
You can provide the directory argument in the following two ways in this chapter.
l In the form of [drive] [path]. In this case, the argument can be a string containing 1 to 64 characters.
l By specifying the name of a storage device, such as flash:/ and cf:/.
You can provide the file-url argument in the following two ways in this chapter.
l In the form of [drive] [path] [file name]. In this case, the argument can be a string containing 1 to 64 characters.
l By specifying the name of a storage device, such as flash:/ and cf:/.
1.1 File System Configuration
1.1.1 Introduction to File System
To facilitate the management of storage devices such as the Flash of a switch, an Ethernet switch has the file system module built in. The file system enables you to access and manage files and directories by performing the operations of creating, deleting, modifying, renaming a file or a directory and displaying the content of a file.
By default, a switch prompts for confirmation before executing the commands which have potential risks (for example, deleting and overwriting files).
& Note:
S7500 series switches support SRPU switchover. Both the primary and the secondary SRPU have file system built in for you to manipulate the files on the both SRPUs. Note that the URL of a file on the secondary SRPU must begin with slot[No.]#flash:/, where No. is the number of the slot where the secondary SRPU is seated. Assume that the secondary SRPU is seated in slot 1, then you need to use slot1#flash:/text.txt to identify the file named text.txt and residing in the root directory of the secondary SRPU.
1.1.2 CF Card Configuration
By installing a CF (compact flash) card in the compact flash slot of a SRPU of an S7500 switch, you can extend the memory space of the switch.
l With a CF card seated in the compact flash slot, you can access the root directory of the CF card by executing the cd cf: command.
l The commands used to manipulate files, such as dir, copy, delete, and move, apply to the files on a CF card.
l You can disable a CF card by using the umount cf: command. To use a disabled CF card again, you need to remove it and install it again.
Perform the following operations to configure a CF card:
To do... |
Use the command... |
Remarks |
Enter the root directory of a CF card |
cd cf: |
Required |
Disable a CF card |
umount cf: |
Optional |
& Note:
Currently, only Salience III SRPU supports CF card.
The following table lists the operations that can be performed after you enter a directory on a CF card.
1.1.3 File System Configuration Tasks
Complete the following tasks to perform file system configuration:
Task |
Remarks |
Optional |
|
Optional |
|
Optional |
|
Optional |
1.1.4 Directory-Related Operations
The file system provides directory-related operations, such as:
l Creating/deleting a directory
l Displaying the current directory
l Displaying the information about the files or the directories in the current directory or a specified directory
l Entering a directory or switching to another storage device
Perform the following operations to perform directory-related configuration:
To do... |
Use the command... |
Remarks |
Create a directory |
mkdir directory |
Optional |
Delete a directory |
rmdir directory |
Optional Only empty directories can be deleted. |
Display the current directory |
pwd |
Optional |
Display the information about specific directories and files |
dir [ /all ] [ file-url ] |
Optional |
Enter a directory or switch to another storage device |
cd directory |
Optional |
& Note:
In the output information of the dir /all command, deleted files (that is, those in the recycle bin) are embraced in brackets.
1.1.5 File-Related Operations
The file system provides the following file-related operations.
l Deleting a file
l Restoring a deleted file
l Deleting a file completely
l Managing a configuration file
l Renaming a file
l Copying a file
l Moving a file
l Displaying the content of a file
l Displaying the information about a file
l Checking file system
l Executing a batch file
Perform the following operations to perform file-related configuration:
To do... |
Use the command... |
Remarks |
Delete a file |
delete [ /unreserved ] file-url |
Optional A deleted file can be restored if you delete it by executing the delete command with the /unreserved keyword not specified. You can use the undelete command to restore deleted files of this kind. |
Restore a deleted file |
undelete file-url |
Optional This operation can only restore the files deleted with the /unreserved keyword not specified. |
Delete a file in the recycle bin |
reset recycle-bin [ file-url ] [ /force ] |
Optional |
Rename a file |
rename fileurl-source fileurl-dest |
Optional |
Copy a file |
copy fileurl-source fileurl-dest |
Optional |
Move a file |
move fileurl-source fileurl-dest |
Optional |
Display the content of a file |
more file-url |
Optional Currently, the file system only supports displaying the content of a file in texts. |
Display the information about a directory or a file |
dir [ /all ] [ file-url ] |
Optional |
Enter system view |
system-view |
— |
Execute a batch file |
execute file-url |
Optional |
Caution:
l For files deleted with the /unreserved keyword not specified and with the same names, only the latest deleted file can be restored.
l The files which are deleted using the delete command with the /unreserved keyword not specified are actually moved to the recycle bin and thus still take storage space. You can clear the recycle bin to make room for other files by using the reset recycle-bin command.
l In the output information of the dir /all command, deleted files (that is, those in the recycle bin) are embraced in brackets.
l If the configuration files are deleted, the switch adopts the default configuration when it starts the next time.
l The execute command cannot be executed recursively.
1.1.6 Storage Device-Related Operations
With the file system, you can format a storage device, such as the Flash or a CF card. Note that the format operation leads to the loss of all the data on the storage device and is irretrievable. For memory spaces that are unavailable due to unexpected errors, you can use the fixdisk command to restore them.
Perform the following operations to perform storage device-related configuration:
To do... |
Use the command... |
Remarks |
Format a storage device |
format device |
Optional |
Restore a storage device |
fixdisk device |
Optional |
1.1.7 Prompt Mode Configuration
You can set the file system prompt mode to be alert or quiet. When in the alert mode, the file system prompts for confirmation when you perform irreversible operations (such as deleting a file completely or overwriting a file). If you are in the quiet mode, you are not prompted when you execute the operations.
Follow these steps to perform configuration on prompt mode of file system:
To do... |
Use the command... |
Remarks |
Enter system view |
system-view |
— |
Set the file system prompt mode |
file prompt { alert | quiet } |
Required By default, the file system prompt mode is alert. |
1.1.8 File System Configuration Example
# Display all the files in the root directory of the file system on the local unit.
<H3C> dir /all
Directory of flash:/
0 -rw- 4 Mar 09 2006 13:59:19 snmpboots
1 -rw- 16215134 Apr 04 2006 16:36:20 S7500-VRP310-E3128.app
2 -rw- 483 Apr 20 2006 14:50:54 diaginfo.txt
3 -rw- 3980 Apr 21 2006 15:08:29 config.cfg
4 drw- - Apr 16 2006 11:18:17 hj
5 drw- - Apr 10 2005 19:07:59 dd
6 -rw- 11779 Apr 05 2006 10:23:03 test.bak
7 -rw- 19307 Apr 16 2006 11:15:55 1.txt
8 -rw- 66 Apr 05 2006 11:32:28 temp1
31877 KB total (15876 KB free)
# Create a directory named “test”.
<H3C> mkdir test
.
%Created dir flash:/test.
# Copy flash:/config.cfg as flash:/test/1.cfg.
<H3C> copy flash:/config.cfg flash:/test/1.cfg
......
%Copy file flash:/config.cfg to flash:/test/1.cfg...Done.
# Display the file information.
<H3C> dir /all
Directory of flash:/
0 -rw- 4 Mar 09 2006 13:59:19 snmpboots
1 -rw- 16215134 Apr 04 2006 16:36:20 S7500-VRP310-E3128.app
2 -rw- 483 Apr 20 2006 14:50:54 diaginfo.txt
3 -rw- 3980 Apr 21 2006 15:08:29 config.cfg
4 drw- - Apr 16 2006 11:18:17 hj
5 drw- - Apr 10 2005 19:07:59 dd
6 -rw- 11779 Apr 05 2006 10:23:03 test.bak
7 -rw- 19307 Apr 16 2006 11:15:55 1.txt
8 -rw- 66 Apr 05 2006 11:32:28 temp1
9 drw- - Apr 25 2006 16:27:46 test
31877 KB total (15876 KB free)
<H3C> dir flash:/test/
Directory of flash:/test/
0 -rw- 3980 Apr 25 2006 16:33:21 1.cfg
31877 KB total (15869 KB free)
# Enter the directory named “test”.
<H3C> cd test
# Rename 1.cfg as c.cfg.
<H3C> rename 1.cfg c.cfg
.
%Renamed file flash:/1.cfg to flash:/c.cfg.
# Delete the file c.cfg
<H3C> delete c.cfg.
%Deleted file flash:/test/c.cfg.
# Restore the file c.cfg.
<H3C> undelete c.cfg
....
%Undeleted file flash:/test/c.cfg.
# Display the content of the file c.cfg.
<H3C>more c.cfg
#
sysname H3C S6503
#
local-server nas-ip 127.0.0.1 key H3C
#
domain default enable system
#
temperature-limit 0 10 70
temperature-limit 2 10 80
temperature-limit 3 10 70
……(Omitted)