The following are some of the operations that you can perform on the SATA:
Command
|
Description
|
dir
filesystem
|
Displays the directories on the specified file system.
|
copy
source-file destination-url
|
Copies files from specified source to a specified destination.
|
delete
|
Deletes a specified file
|
format
|
Formats the filesystem on the disk.
|
show disk0:
|
Displays the content and details of disk0:
|
show file information
file-url
|
Displays information about a specific file.
|
show file systems
|
Displays the available file system on your device.
|
show inventory raw
|
Displays the details of the existing modules on the switch.
|
Following are sample outputs of the operations:
Switch# dir disk0:
Directory of disk0:/
11 drwx 16384 May 11 2018 16:06:14 +00:00 lost+found
10747905 drwx 4096 May 25 2018 13:03:43 +00:00 test
236154740736 bytes total (224072925184 bytes free)
View the status of RP on a particular chassis:
Switch# dir disk0-1-1:
Directory of disk0-1-1:/
11 drwx 16384 Feb 1 2018 12:43:40 -08:00 lost+found
944994516992 bytes total (896892141568 bytes free)
Copy a file from the disk0: to USB
Switch# copy disk0:test.txt usbflash0:
Destination filename [test.txt]?
Copy in progress...C
17866 bytes copied in 0.096 secs (186104 bytes/sec)
Switch# dir usbflash0:
Directory of usbflash0:/
12 -rw- 33554432 Jul 28 2017 10:12:58 +00:00 nvram_config
11 drwx 16384 Jul 28 2017 10:09:46 +00:00 lost+found
13 -rw- 17866 Aug 11 2017 09:52:16 +00:00 test.txt
189628416 bytes total (145387520 bytes free)
Delete the file test.txt from disk0:
Switch# delete disk0:test.txt
Delete filename [test.txt]?
Delete disk0:/test.txt? [confirm]
Switch# dir disk0:
Directory of disk0:/
No files in directory
118148280320 bytes total (112084135936 bytes free)
Copy file test.txt from USB to disk0:
Switch# copy usbflash0:test.txt disk0:
Destination filename [test.txt]?
Copy in progress...C
17866 bytes copied in 0.058 secs (308034 bytes/sec)
Switch# dir disk0:
Directory of disk0:/
11 -rw- 17866 Aug 11 2017 09:53:03 +00:00 test.txt
118148280320 bytes total (112084115456 bytes free)
Format the disk
To format the ext4 filesystem, use the following command:
Switch#format disk0:ext4
Show commands
Switch# show disk0:
-#- --length-- ---------date/time--------- path
2 17866 Aug 11 2017 09:54:06.0000000000 +00:00 test.txt
112084115456 bytes available (62513152 bytes used)
Switch# show file information disk0:test.txt
disk0:test.txt:
type is image (elf64) []
file size is 448 bytes, run size is 448 bytes
Foreign image, entry point 0x400610
Switch# show file systems
File Systems:
Size(b) Free(b) Type Flags Prefixes
-
-
* 11250098176 9694093312 disk rw bootflash: flash:
1651314688 1232220160 disk rw crashinfo:
118148280320 112084115456 disk rw disk0:
189628416 145387520 disk rw usbflash0:
7763918848 7696850944 disk ro webui:
- - opaque rw null:
- - opaque ro tar:
- - network rw tftp:
33554432 33532852 nvram rw nvram:
- - opaque wo syslog:
- - network rw rcp:
- - network rw http:
- - network rw ftp:
- - network rw scp:
- - network rw https:
- - opaque ro cns:
Switch#show disk0: filesys
Filesystem: disk0
Filesystem Path: /vol/disk0
Filesystem Type: ext4
Mounted: Read/Write
Switch#show inventory raw
NAME: "Slot 5 SATA Container", DESCR: "SATA Container”
PID: , VID: , SN: