Technical Tip: Increasing Linux disk space for FortiClient EMS running on Linux
| Description | This article explains how to increase free disk space on a Linux system running FortiClient EMS on Ubuntu 22.04 LTS. One scenario where this guide is useful is when the error message 'Failed to create Deployment Package: Not enough disk space' appears in the FortiClient EMS WebUI during the creation of an installer.
This error is often due to the system not having sufficient resources allocated (system requirements) during the initial creation and installation of the virtual machine. |
| Scope | FortiClient EMS on Linux. |
| Solution | As a general rule, it is crucial to have a healthy, recoverable backup (either as a full disk or as VM snapshots) of the server before proceeding with these changes.
To increase the root disk size of the original OVF VM image (EMS v7.4+), start directly from step 4. If the virtual disk space is increased (changing the VM settings, for example, to a 200 GB disk), start from step 1. Step 1 forces the Linux kernel to rescan and read the updated disk size, which makes it possible to increase the disk size without a reboot.
echo 1>/sys/class/block/sda/device/rescan
sudo cfdisk
Or:
sudo growpart /dev/sda 3 <----- There should be a space between sda and 3.
When the tool opens, select sda3, then use the Resize function, and do not forget to write before quitting.
sudo lsblk
sudo pvresize /dev/sda3
sudo lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
sudo resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
df -Th
The following commands can be used for confirmation and deletion of old log files if the FortiClient EMS logs directory is consuming most of the disk space: 1. To check disk usage of directories under / (root directory): 'sudo du -h -d 1 /'. 2. To check disk usage of directories under /var/log: 'sudo du -h -d 1 /var/log'. 3. To print AND delete any log file older than 10 days under /var/log/forticlientems/: 'sudo find /var/log/forticlientems/ -type f -name "*.log*" -mtime +10 -exec rm -v {} \;'.
References for more information on Logical Volume Management (LVM):
FortiClient EMS v7.4 (Linux-based) system requirements:
Increasing Disk Space on FortiClient EMS 7.4.5 VM. Starting with version 7.4.5, FortiClient EMS has added support for OVA template VM deployment, which also brought an ability to provision more disk space during or after installation via the EMS CLI utility. For detailed instructions on how to do this, refer to Technical Tip: Resizing disk space on FortiClient EMS v7.4.5 installed on VMWare ESX article.
In addition, see FortiClient EMS 7.4.5 Adding and expanding disks on EMS VMs official documentation. |
