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.
herzogk
Staff
Staff
Article Id 337414
Description This article describes how to add a local disk for logging with Proxmox Hypervisor.
Scope FortiOS v. 7.2, 7.4.
Solution

After the installation of a FortiGate VM in Proxmox Hypervisor, it is possible to add an additional virtual disk for logging locally.

 

After a fresh or old installation, by default there should only be one available disk for system information:

 

No additional disk.No additional disk.

 

This is also reflected in Proxmox hardware settings for the host:

 

Proxmox Hardware Settings without Additional DiskProxmox Hardware Settings without Additional Disk

 

To add a new disk, select 'Add -> Hard Disk' under the host's hardware tab.

In the new prompt, select the desired storage location as well as the size of the disk:

 

Add Hard DiskAdd Hard Disk

 

After selecting 'Add', the new disk will be detectable on the FortiGate VM:

 

Added disk before reboot and format.Added disk before reboot and format.

 

The disk is now visible, but the VM will need to be rebooted in order for the disk to be correctly formatted and utilized.

During the reboot, the disk will be formatted and its usage will be be modified for logging:

 

Console Output During RebootConsole Output During Reboot

 

After boot completion, the new disk should be seen: in this case, /dev/vdb. Its partition should also be mounted for logging:

 

FR-LAB1_HUB # config global
FR-LAB1_HUB (global) # diagnose hardware deviceinfo disk

Disk SYSTEM(boot) 2.0GiB type: IDE [Virtio Disk] dev: /dev/vda
partition 231.0MiB, 120.0MiB free mounted: Y label: dev: /dev/vda1(boot) start: 2048
partition 1.7GiB, 1.4GiB free mounted: Y label: dev: /dev/vda2(boot) start: 526336

Disk Virtual-Disk ref: 16 80.0GiB type: IDE [Virtio Disk] dev: /dev/vdb
partition ref: 17 78.2GiB, 78.2GiB free mounted: Y label: LOGUSEDXEC4D5F90 dev: /dev/vdb1 start: 2048

Total available disks: 2
Max SSD disks: 8 Available storage disks: 1

 

FR-LAB1_HUB (global) # fnsysctl df -h
Filesystem Size Used Available Use% Mounted on
none 1.4G 103.0M 1.3G 7% /tmp
none 1.4G 2.4M 1.3G 0% /dev/shm
none 1.4G 60.5M 1.3G 4% /dev/cmdb
/dev/vda1 231.9M 111.7M 107.4M 51% /data
/dev/vda2 1.6G 255.7M 1.3G 16% /data2
/dev/vdb1 78.2G 58.8M 74.1G 0% /var/log
none 1.4G 60.5M 1.3G 4% /new_root/eap_proxy/dev/cmdb
/dev/vda1 231.9M 111.7M 107.4M 51% /new_root/eap_proxy/etc/cert/ca
/dev/vda1 231.9M 111.7M 107.4M 51% /new_root/eap_proxy_worker/etc/cert/ca

 

FR-LAB1_HUB (global) # diag sys logdisk usage
Total HD usage: 61MB(59MiB)/84012MB(80121MiB)
Total HD logging space: 63008MB(60090MiB)
HD logging space usage for vdom "MGMT": 0MB(0MiB)/21002MB(20030MiB)
HD logging space usage for vdom "SSLVPN": 0MB(0MiB)/21002MB(20030MiB)
HD logging space usage for vdom "root": 0MB(0MiB)/21002MB(20030MiB)

 

Note that only approximately 75% of disk space is available for log storage .
This can be seen in the above command 'diag sys logdisk usage' under 'Total HD logging space'.

(In the above example, the FortiGate VM has 3 VDOMs, so the disk is separated equally for all VDOMs).

Contributors