< Home

format

Function

The format command formats a storage device.

In V200R013C00SPC500 and later versions, this command can be run only if you log in to the device through the serial port.

Format

format drive

Parameters

Parameter Description Value

drive

Specifies the name of the storage device to format.

-

Views

User view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

The following describes the storage device name.
  • drive is the storage device and is named as flash:.
  • In a stack system, devicename can be set as follows:

    • flash: root directory of the flash memory of the master switch in the stack.
    • chassis ID#flash: root directory of the flash memory on a device in the stack.

    For example, slot2#flash: indicates the flash memory in slot 2.

When the file system fault cannot be rectified or the data on the storage device is unnecessary, the storage device can be formatted. When you run the format command, all files and directories are cleared from the storage device.

Configuration Impact

When the storage device has the configuration file and system software package required for the next start, do not format the storage device because data on it will be deleted after the format. If the configuration file required for the next start is deleted, the configuration is lost after the switch restarts. If the system software package is deleted, the switch will fail to start.

After the storage is formatted, you can upload the system software through the Enter ethernet submenu option in the BootROM/Bootload menu. The Modify startup configuration option modifies the startup configuration information and restarts the device.

Precautions

After the format command is run, files and directories are cleared from the specified storage device and cannot be restored. Therefore, this command should be used with caution.

If the storage device is still unavailable after the format command is run, a physical exception may have occurred.

Example

# Format the storage device.

<HUAWEI> format flash:
All data(include configuration and system startup file) on flash: will be lost, proceed with format ? [Y/N]:y
%Format flash: completed.
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >