Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

HC110111012 File System Navigation and Management

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 19

File System Navigation and

Management

HUAWEI TECHNOLOGIES CO., LTD.


Foreword

The file system represents the underlying platform on which VRP


operates, and where system files are stored within the physical storage
devices of the product. The capability to navigate and manage this file
system is necessary to ensure effective management of the configuration
files, VRP software upgrades and ensure that the physical devices
contained within each product are well maintained.

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 2
Objectives

Upon completion of this section, trainees will be able to:


 Successfully navigate the device file system
 Manipulate the file system files and folders.
 Manage Huawei router and switch storage devices.

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 3
Viewing the File System

Function Command
Change directory cd
View current directory pwd
View content of directory dir
View file content more

<Quidway>dir
<Quidway>dir
Directory
Directory of
of flash:/
flash:/
Idx
Idx Attr
Attr Size(Byte)
Size(Byte) Date
Date Time
Time FileName
FileName
00 drw-
drw- -
- Apr
Apr 10
10 2013
2013 09:30:35
09:30:35 src
src
11 -rw-
-rw- 28
28 Apr 10
Apr 10 2013
2013 09:31:38
09:31:38 private-data.txt
private-data.txt
22 -rw-
-rw- 120
120 Apr
Apr 10
10 2013
2013 09:32:38
09:32:38 wzbk1.cfg
wzbk1.cfg
32,004 KB total (31,995 KB free)
32,004 KB total (31,995 KB free)

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 4
Manipulating the File System

Function Command
Make directory mkdir
Remove directory rmdir

<Quidway>mkdir
<Quidway>mkdir test
test
Info:
Info: Create
Create directory
directory flash:/test......Done.
flash:/test......Done.
<Quidway>dir
<Quidway>dir
Directory
Directory of
of flash:
flash:
Idx
Idx Attr
Attr Size(Byte)
Size(Byte) Date
Date Time
Time FileName
FileName
00 drw-
drw- -
- Apr 10 2013 09:30:35
Apr 10 2013 09:30:35 src
src
11 -rw-
-rw- 28
28 Apr
Apr 10
10 2013
2013 09:31:38
09:31:38 private-data.txt
private-data.txt
22 -rw-
-rw- 120
120 Apr 10 2013 09:32:38
Apr 10 2013 09:32:38 wzbk1.cfg
wzbk1.cfg
33 drw-
drw- -
- Apr
Apr 10
10 2013
2013 09:53:11
09:53:11 test
test
32,004 KB total (31,995 KB free)
32,004 KB total (31,995 KB free)

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 5
Manipulating the File System

Function Command
Copy file copy
Move file move
Rename file rename

<Quidway>rename
<Quidway>rename test
test huawei
huawei
Rename
Rename flash:/test to flash:/huawei
flash:/test to flash:/huawei ?[Y/N]:y
?[Y/N]:y
Info:
Info: Rename
Rename file
file flash:/test
flash:/test toto flash:/huawei
flash:/huawei ......Done.
......Done.
<Quidway>dir
<Quidway>dir
Directory
Directory of
of flash:/
flash:/
Idx
Idx Attr
Attr Size(Byte)
Size(Byte) Date
Date Time
Time FileName
FileName
00 drw-
drw- -
- Apr 10 2013 09:30:35
Apr 10 2013 09:30:35 src
src
11 -rw-
-rw- 28
28 Apr
Apr 10
10 2013
2013 09:31:38
09:31:38 private-data.txt
private-data.txt
22 -rw-
-rw- 120
120 Apr 10 2013 09:32:38
Apr 10 2013 09:32:38 wzbk1.cfg
wzbk1.cfg
33 drw-
drw- -
- Apr 10 2013 09:53:11
Apr 10 2013 09:53:11 huawei
huawei

32,004
32,004 KB
KB total
total (31,995
(31,995 KB
KB free)
free)

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 6
Manipulating the File System

Function Command
Delete or permanently delete file delete /unreserved
Recover file undelete
Permanently clear the recycle bin reset recycle-bin

<Quidway>delete
<Quidway>delete /unreserved
/unreserved flash:/wzbk1.cfg
flash:/wzbk1.cfg
<Quidway>dir
<Quidway>dir
Directory
Directory of
of flash:/
flash:/
Idx
Idx Attr
Attr Size(Byte)
Size(Byte) Date
Date Time
Time FileName
FileName
00 drw-
drw- -- Apr
Apr 10
10 2013
2013 09:30:35
09:30:35 src
src
11 -rw-
-rw- 28
28 Apr 10
Apr 10 2013
2013 09:31:38
09:31:38 private-data.txt
private-data.txt
22 drw-
drw- -- Apr
Apr 10
10 2013
2013 09:53:11
09:53:11 huawei
huawei

32,004
32,004 KB
KB total
total (30,995
(30,995 KB
KB free)
free)

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 7
Configuration File Management System

Current- Saved-
Configuration File Save Configuration File

Load
RAM Flash

 Current configuration loaded from saved configuration in system


flash memory at system startup.
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 8
Viewing Configuration Files

Command Function

display current-configuration View the current configuration

display saved-configuration View the saved configuration

<Huawei>display
<Huawei>display current-configuration
current-configuration
##
sysname
sysname Huawei
Huawei
……
……
##
Return
Return
<Huawei>display
<Huawei>display saved-configuration
saved-configuration
##
sysname
sysname Huawei
Huawei
……
……
##
Return
Return

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 9
Saving the Configuration File

Command Function

Save Save the current configuration

<Huawei>save
<Huawei>save
The
The current
current configuration
configuration will
will be
be written
written to
to the
the device.
device.
Are
Are you
you sure
sure to
to continue?[Y/N]y
continue?[Y/N]y
Info:
Info: Please input the
Please input the file
file name
name (( *.cfg,
*.cfg, *.zip
*.zip )) [vrpcfg.zip]:
[vrpcfg.zip]:
Apr
Apr 10 2013 14:26:08-08:00 Huawei %%01CFM/4/SAVE(l)[0]:The user
10 2013 14:26:08-08:00 Huawei %%01CFM/4/SAVE(l)[0]:The user
chose Y when deciding whether to save the configuration
chose Y when deciding whether to save the configuration to the to the
device.
device.
Now
Now saving
saving the
the current
current configuration
configuration to
to the
the slot
slot 17..
17..
Save the configuration successfully.
Save the configuration successfully.

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 10
Viewing the Startup Parameters

Command Function

Display startup View the current startup parameters

<Huawei>display
<Huawei>display startup
startup
MainBoard:
MainBoard:
Configured
Configured startup
startup system
system software:
software: sd1:/ar2220.cc
sd1:/ar2220.cc
Startup system software:
Startup system software: sd1:/ar2220.cc
sd1:/ar2220.cc
Next
Next startup
startup system
system software:
software: NULL
NULL
Startup
Startup saved-configuration file:
saved-configuration file: sd1:/vrpcfg.zip
sd1:/vrpcfg.zip
Next
Next startup
startup saved-configuration
saved-configuration file:
file: sd1:/vrpcfg.zip
sd1:/vrpcfg.zip
Startup paf file:
Startup paf file: NULL
NULL
Next
Next startup
startup paf
paf file:
file: NULL
NULL
Startup license file:
Startup license file: NULL
NULL
Next
Next startup
startup license
license file:
file: NULL
NULL
Startup patch package:
Startup patch package: NULL
NULL
Next
Next startup
startup patch
patch package:
package: NULL
NULL

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 11
Changing the Startup Parameters

Command Function

startup saved-configuration Specify saved configuration file to load at startup

<Huawei>startup
<Huawei>startup saved-configuration
saved-configuration flash:/huawei.zip
flash:/huawei.zip
Info:
Info: Succeeded in setting the configuration for
Succeeded in setting the configuration for booting
booting system.
system.
<Huawei>display startup
<Huawei>display startup
MainBoard:
MainBoard:
Configured
Configured startup
startup system
system software:
software: sd1:/ar2220.cc
sd1:/ar2220.cc
Startup
Startup system
system software:
software: sd1:/ar2220.cc
sd1:/ar2220.cc
Next startup system software:
Next startup system software: NULL
NULL
Startup saved-configuration file:
Startup saved-configuration file: sd1:/vrpcfg.zip
sd1:/vrpcfg.zip
Next startup saved-configuration file: flash:/huawei.zip
Next startup saved-configuration file: flash:/huawei.zip
Startup
Startup paf
paf file:
file: NULL
NULL
Next
Next startup
startup paf
paf file:
file: NULL
NULL
Startup license file:
Startup license file: NULL
NULL
Next startup license file:
Next startup license file: NULL
NULL
Startup patch package:
Startup patch package: NULL
NULL
Next startup patch package:
Next startup patch package: NULL
NULL

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 12
Comparing Configuration Files

Command Function

compare configuration Compare configuration files

<Huawei>compare
<Huawei>compare configuration
configuration
======
====== Current configuration line
Current configuration line 36
36 ======
======
ip
ip address
address 10.1.1.1
10.1.1.1 255.255.255.0
255.255.255.0
##
interface
interface GigabitEthernet0/0/2
GigabitEthernet0/0/2
##
interface
interface GigabitEthernet0/0/3
GigabitEthernet0/0/3
##
interface
interface NULL0
NULL0
======
====== Configuration file
Configuration file line
line 37
37 ======
======
interface GigabitEthernet0/0/2
interface GigabitEthernet0/0/2
##
interface
interface GigabitEthernet0/0/3
GigabitEthernet0/0/3
##
interface
interface NULL0
NULL0

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 13
Clearing the Configuration File

Command Function

reset saved-configuration Erase saved configuration file

<Huawei>reset
<Huawei>reset saved-configuration
saved-configuration
Warning:
Warning: The
The action
action will
will delete
delete the
the saved
saved configuration
configuration in
in the
the
device.
device.
The
The configuration
configuration will
will be
be erased
erased to
to reconfigure.
reconfigure. Continue?
Continue? [Y/N]:y
[Y/N]:y
Warning: Now clearing the configuration in the device.
Warning: Now clearing the configuration in the device.
Apr
Apr 10
10 2013
2013 14:43:13-08:00
14:43:13-08:00 Huawei
Huawei %%01CFM/4/RST_CFG(l)[2]:The
%%01CFM/4/RST_CFG(l)[2]:The user
user
chose
chose YY when
when
deciding
deciding whether
whether to
to reset
reset the
the saved
saved configuration.
configuration.
Info:
Info: Succeeded in clearing the configuration in
Succeeded in clearing the configuration in the
the device.
device.

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 14
Storage Device Types

 SDRAM <Huawei>display
<Huawei>display version
version
……
 Flash ……
SDRAM
SDRAM Memory
Memory Size
Size :: 2048
2048 MM bytes
bytes
 NVRAM Flash
Flash Memory
Memory Size
Size :: 16
16 MM bytes
bytes
NVRAM
NVRAM Memory
Memory Size
Size :: 512
512 KK bytes
bytes
 SD Card SD
SD Card1
Card1 Memory
Memory Size
Size :: 1882
1882 MM bytes
bytes
……
 USB ……

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 15
Erasing Storage Devices

<Huawei>format
<Huawei>format flash:
flash:
All
All data(include
data(include configuration
configuration and
and system
system startup
startup file)
file) on
on flash:
flash:
will
will be
be lost,
lost, proceed
proceed with
with format?
format? (y/n)[n]:
(y/n)[n]:

<Huawei>format
<Huawei>format sd1:
sd1:
All
All data(include
data(include configuration
configuration and
and system
system startup
startup file)
file) on
on sd1:
sd1: will
will
be
be lost,
lost, proceed
proceed with
with format?
format? (y/n)[n]:
(y/n)[n]:

 Care should be taken when using the format commands, as


data will be lost.
Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 16
Repairing the Storage Device

<Huawei>fixdisk
<Huawei>fixdisk flash:
flash:
Fixdisk
Fixdisk flash:
flash: will
will take
take long
long time
time if
if needed
needed
%Fixdisk
%Fixdisk flash:
flash: completed.
completed.
<Huawei>fixdisk
<Huawei>fixdisk sd1:
sd1:
sd1:/
sd1:/ -- disk
disk check
check in
in progress.............sd1:/
progress.............sd1:/ -- Volume
Volume is
is OK
OK
total
total ## of
of clusters:
clusters: 481,869
481,869
## of
of free
free clusters:
clusters: 455,777
455,777
## of
of bad
bad clusters:
clusters:
total
total free
free space:
space: 1,780
1,780 Mb
Mb
..............
.............. max
max contiguous
contiguous free
free space:
space: 1,789,952,000
1,789,952,000 bytes
bytes
## of
of files:
files: 22
22
......
......
%Fixdisk
%Fixdisk sd1:
sd1: completed.
completed.

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 17
Summary

 What does the d in the drwx attribute of the file system represent?
 How can a configuration file stored within the file system of a device
be implemented for use by the device?

Copyright © 2014 Huawei Technologies Co., Ltd. All rights reserved. Page 18
Thank you
www.huawei.com

You might also like