disk
Use this command to list and format hard disks installed in FortiGate units or individual partitions on these hard disks.
Syntax
execute disk format Format a partition.
execute disk list List disk devices and partitions.
execute disk scan Scan a partition and fix errors.
Variable | Description |
format | Format the referenced disk partitions or disks. Separate reference numbers with spaces. If you enter a partition reference number the disk partition is formatted. If you enter a disk reference number the entire disk and all of its partitions are formatted. |
list | List the disks and partitions and the reference number for each one. |
scan | Scan a disk or partition and repair errors. |
The execute disk format
command formats the specified partitions or disks and then reboots the system if a reboot is required. The execute disk scan
command scans and repairs a disk partition and then reboots the system.
In most cases you need to format the entire disk only if there is a problem with the partition. Formatting the partition removes all data from the partition. Formatting the disk removes all data from the entire disk and creates a single partition on the disk.
Examples
Use the following command to list the disks and partitions.
execute disk list
Disk Internal(boot) ref: 14.9GB type: SSD [ATA SanDisk SSD U100] dev: /dev/sda
partition ref: 3 14.4GB, 14.4GB free mounted: Y label: 7464A257123E07BB dev: /dev/sda3
In this example, there is only one partition and its reference number is 3.
Enter the following command to format the partition.
execute disk format 3
After a confirmation message the FortiGate unit formats the partition and restarts. This can take a few minutes.
Enter the following command to scan disk partition 3:
# execute disk scan 3
scan requested for: 3/Internal (device=/dev/sda3)
This action requires the unit to reboot.
Do you want to continue? (y/n)