FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
Jonathan_Body_FTNT
Article Id 195795
Description

This article gives technical tips on disk management following the release of FortiOS 4.0 MR2.


Scope

FortiOS 4.0 MR2 and above.


Solution
Data Storage on the FortiGate
 
Data stored on a FortiGate disk includes:
  • Firmware images
  • Configuration files
  • AntiVirus Databases
  • IPS Databases
  • Logs
The new disk management feature allows a user to obtain detailed information on how much disk space is available and on quota usage.
 
The following features also all use FortiGate disk resources:
  • Disk Logging
  • DLP Archive
  • Historic Reports
  • IPS Packet Archive
  • Quarantine
  • SQL Database
  • WAN Optimization and Web Cache
Removable Disks
 
Removable disk models are given below:
  • AMC (S08): FortiGate 310B, FortiGate 620B, FortiGate 3016B, FortiGate 3600A, FortiGate 3810A, FortiGate 5001A
  • External SSD : FortiGate 200B, FortiGate 1240B, FortiGate 3040B, FortiGate 3950B
  • External SD : FortiGate 60C
On a FortiGate with multiple disks it is recommended that one disk is used to store log and system data and that the other disks are used per data type. For example:
  • Disk 1 : Log and system data storage
  • Disk 2 : Firmware image storage
  • Disk 3 : Database
  • Disk 4 : Quaratined files
When WAN optimization and web cache storage are activated, automatic load balancing storage is performed on the following platforms: FortiGate 82C, FortiGate 1240B, FortiGate 3950B, FortiGate 310B, FortiGate 620B, FortiGate 3016B, FortiGate 3600A, FortiGate 3810A,  and FortiGate 5001A.  For these models the administrator has the option to assign dedicated disks for WAN optimization and web cache.
 
CLI Commands for disk management
 
The following CLI command can be used to list all disk devices/partitions (both SCSI and IDE):
# exec disk list
 
For example:
FG311B3909600004 # execute disk list

Device M0 120.3 GB ref: 0 RAID Level 0 [HDD1-HDD2]
partition 1 120.3 GB ref: 1 label: 72E3790B379913C6

Device S* 60.2 GB ref: n/a ATA STT_FTM64GL25T (SSD)

Device S* 60.2 GB ref: n/a ATA STT_FTM64GL25D (SSD)

Device S* 74.5 GB ref: n/a ATA ST980817SM (ASM-S08)
partition 1 19.5 GB ref: n/a label: 4EA390A42B7FD768
partition 2 19.5 GB ref: n/a label: 00954B8E172CE266
partition 3 9.8 GB ref: n/a label: 5F037BD87FAF6BA7
partition 4 25.7 GB ref: n/a label: 6E816AAB61A3B511

Device S* 956.0 MB ref: n/a FLASH Drive SM_USB20 (USB)
partition 1 956.0 MB ref: n/a <non-EXT>

Total available disks: 1
The vendor and/or name of each device is printed, followed by the device type in brackets.
 
When a device is available for disk management tasks, the front-panel slot label is printed in square brackets.
 
For software-raid virtual disks, no device type is printed
 
Setting RAID levels
 
The following CLI commands can be used on RAID enabled models.

FG311B3909600004 # execute disk ?
list list disk devices and partitions
partition partition
raid Make RAID disk with the specified level

FG311B3909600004 # execute disk raid
<integer> RAID level (0 or 1)

FG311B3909600004 # execute disk raid 1
(Re)building RAID-1 requires system reboot!
Do you want to continue? (y/n)

Partition Formatting
 
The following CLI command can be used to format partitions.

execute disk format <part_ref>

For example:
FGXX1B3909600004 # execute disk list
 
Device S0          60.2 GB      ref: 0          ATA STT_FTM64GL25T (SSD) [HDD1]
  partition 1      32.0 GB      ref: 1          label: 7F4653DB6CAB57EC
  partition 2      28.2 GB      ref: 2          label: 3914446010E0D1CC
 
Device S1          60.2 GB      ref: 16         ATA STT_FTM64GL25D (SSD) [HDD2]
  partition 1      60.2 GB      ref: 17         label: 06B985F8388DFBF9
 
Total available disks: 2
If the partition is not in use it will be formatted without the need for a system reboot.
FGXX1B3909600004 # execute dis format 17
Creating file system on /dev/sdb1 ... done.
If the partition is in use then a system reboot will be required.
FGXX1B3909600004 # execute disk format 1
The partition is in use by log system.
To enforce formatting, a system reboot is required. Do you want to continue? (y/n)y
 
The system begins to format the disk...
- unmounting /data :  ok
- unmounting /data2 :  ok
- unmounting /var/log :  ok
Creating file system ... done.
The system is rebooted after execution of the above command.
 
How to make storage on the disk
 
Storage defines a mapping between a user defined name and a disk partition.  It also includes properties such as the type of underlying disk device.  The following CLI commands can be used to create, edit, or delete storage.
config system storage
  delete <st_name>
  edit <st_name>
    set partition <part_ref>
  next
end
For example:
FGXX1B3909600004 # config system storage
FGXX1B3909600004 (storage) # edit LogStorage
new entry 'LogStorage' added
FGXX1B3909600004 (LogStorage) # set partition ?
Device S0          60.2 GB      ref: 0          ATA STT_FTM64GL25T (SSD) [HDD1]
partition 1      32.0 GB      ref: 1          label: 7F4653DB6CAB57EC
Device S1          60.2 GB      ref: 16         ATA STT_FTM64GL25D(SSD)[HDD2]
partition 1      60.2 GB      ref: 17         label: 06B985F8388DFBF9
Choose a partition by its reference number.
FGXX1B3909600004 (LogStorage) # set partition 1
FGXX1B3909600004 (LogStorage) # end
FGXX1B3909600004 # get system storage
== [ LogStorage
Designating storage per storage client
 
The following CLI can be used for storage designation for each storage client (for example WAN optimization or a log subsystem).
 
For WAN optimization
config wanopt storage
edit <st_name>
set size <size_MB>
next
end
For example:

FGXX1B3909600004 # config system storage

 

FGXX1B3909600004 (storage) # edit WanOptStorage1

new entry 'WanOptStorage1' added

FGXX1B3909600004 (WanOptStorage1) # set partition 1

FGXX1B3909600004 (WanOptStorage1) # next

FGXX1B3909600004 (storage) # edit WanOptStorage2

new entry 'WanOptStorage2' added

FGXX1B3909600004 (WanOptStorage2) # set partition 17

FGXX1B3909600004 (WanOptStorage2) # next

FGXX1B3909600004 (storage) # end

 

FGXX1B3909600004 # config wanopt storage

 

FGXX1B3909600004 (storage) # edit WanOptStorage1

new entry 'WanOptStorage1' added

FGXX1B3909600004 (WanOptStorage1) # set size 10000

FGXX1B3909600004 (WanOptStorage1) # next

FGXX1B3909600004 (storage) # edit WanOptStorage2

new entry 'WanOptStorage2' added

 

FGXX1B3909600004 (WanOptStorage2) # set size 20000

FGXX1B3909600004 (WanOptStorage2) # next

FGXX1B3909600004 (storage) # end

For Log subsystem
config log disk setting
set storage <st_name>
set max-log-file-size <size_MB>
end
 

Contributors