Troubleshooting USB Viewing Problems

After you insert a USB device in the USB slot, the Linux system automatically detects and mounts the device. If you cannot view files on the device, perform this procedure.

Note

Note

Not all hardware platforms can use the USB device for additional file storage. Some platforms use the USB as part of the system operation and must never be removed. For more information, see your hardware documentation.

Procedure

  1. Enter Privileged EXEC mode:

    enable

  2. Check the file system:

    ls /usb/

  3. Remove a USB device:
    1. Unmount the USB device:

      usb-stop

    2. Wait for the response that indicates it is safe to remove the device.
    3. Physically remove the device.
  4. Remove and then reinsert the device.
  5. Check the device for errors:

    dos-chkdsk /usb

    Run the dos-chkdsk /usb repair command, if at the end of the dos-chkdsk /usb command output you see:

    1) Correct

    2) Don‘t correct

  6. If errors are detected, then you can reformat the device:

    dos-format /usb

    Caution

    Caution

    If you format the device, you erase all data on the device.

Example

Check the file system:

Switch:1>enable
Switch:1#ls /usb/
Listing Directory /usb/: 
drwxr-xr-x 4 0 0 4096 Jan 1 1970 ./ 
drwxrwxr-x
22 0 0 0 Sep 9 20:22 ../ 
drwxr-xr-x 2 0 0 4096 Mar 17 16:03 Photos-of-Flash-
drwxr-xr-x 2 0 0 4096 Jun 13 20:56 intflash/

Check the device for errors:

Switch:1#usb-stop
It is now safe to remove the USB device.
Switch:1#dos-chkdsk /usb
/usr/sbin/fsck.vfat /dev/usb1 -v >& /dev/console dosfsck 2.11a
(05 Mar 2010) 
dosfsck 2.11a, 05 Mar 2010, FAT32, LFN 
Checking we can access the last sector of the filesystem 
Boot sector contents: 
System ID "mkdosfs" 
Media byte 0xf8 (hard disk) 
512 bytes per logical sector
4096 bytes per cluster 
32 reserved sectors 
First FAT starts at byte 16384 (sector 32) 
2 FATs, 32 bit entries 
3897344 bytes per FAT (= 7612 sectors) 
Root directory start at cluster 2 (arbitrary size) 
Data area starts at byte 7811072 (sector 15256) 
974240 data clusters (3990487040 bytes) 
62 sectors/track, 124 heads 
0 hidden sectors 
7809178 sectors total 
Checking for unused clusters. 
Checking free cluster summary.
/dev/usb1: 17 files, 174804/974240 clusters

If errors are detected, reformat the disk:

Switch:1#dos-format /usb