Expand the F5 Insight virtual disk¶
On this page
Overview¶
F5 Insight can use additional storage capacity after you expand the virtual machine (VM) disk at the hypervisor or cloud-provider level. The packaged disk expansion script detects unallocated space and extends the partition and F5 Insight storage volumes.
This procedure applies to F5 Insight VM deployments that include the packaged f5insight-disk-expand.service systemd unit.
Before you start¶
Important
The expansion workflow changes disk partitions, Logical Volume Manager (LVM) metadata, and the filesystem. Back up your VM or confirm that a recovery procedure is available before you proceed.
- Confirm that the VM disk has already been expanded in the hypervisor or cloud-provider console.
- Log in to the F5 Insight host as
adminor another account withsudoaccess. - Use a single-disk configuration. Split-disk configurations are not supported by the F5 Insight disk expansion workflow.
- Make sure the expanded disk is visible to the operating system before you run the script.
The script requires the disk utilities installed in the F5 Insight appliance image, including growpart, partprobe, and the LVM utilities when the root storage uses LVM.
Automatic expansion on first boot¶
Note
On systems that use NVMe drives, the disk expansion tool can’t detect unallocated space and skips automatic expansion. This will be fixed in a future release.
When an image contains less space than the disk allocated to the VM, F5 Insight checks for additional capacity during first boot. The systemd unit runs before the F5 Insight first-boot setup and, when enough space is available, expands the partition and storage volumes before services start.
The first-boot unit is guarded by the following marker:
/opt/f5insight/.first-boot-complete
After first-boot setup completes, the automatic expansion unit does not run on subsequent boots. To expand the disk after first boot, follow the steps in Expand a disk after deployment.
Expand a disk after deployment¶
Use this procedure when the VM disk is increased after first-boot setup.
Resize the disk in the infrastructure layer¶
Use the hypervisor or cloud-provider controls to increase the size of the existing VM disk. Do not add a second disk for this procedure.
Reboot the VM¶
Reboot the VM from the operating system after the hypervisor resize is complete. This step makes sure that the Linux kernel rescans the disk and reports the new size correctly.
sudo reboot
Wait for the VM to come back online before you continue.
Confirm that Linux sees the new disk size¶
Run the following commands on the F5 Insight host:
lsblk
df -h /opt
The disk shown by lsblk must reflect the new total size. The /opt filesystem reported by df still shows the old size at this point — the script expands it in the next step.
Run the expansion script¶
sudo /opt/f5insight/scripts/f5insight-disk-expand.sh
The script performs the following actions:
- Identifies the root filesystem and underlying disk partition.
- Checks for at least 10 GB of unallocated space.
- Uses
growpartto extend the partition. - Notifies the Linux kernel of the partition change with
partprobe, when available. - For LVM storage: runs
pvresize, extends the/optlogical volume with all free space, and grows the filesystem. - For non-LVM storage: attempts to grow the filesystem directly.
- Reports the resulting filesystem size and free space.
The script does not accept command-line options. It is safe to run when no significant unallocated space is available. In that case, it logs that no expansion is required and exits without making a change.
Verify the result¶
Check the /opt filesystem size after the script completes:
df -h /opt
Example output (disk resized from 240 GB to 1000 GB at the hypervisor):
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg0-opt 944G 160M 943G 1% /opt
For an LVM-based installation, also verify the partition table, physical volume, and logical volume:
lsblk
sudo pvs
sudo vgs
sudo lvs
The /opt logical volume should reflect the full available capacity. F5 Insight data directories under /opt/f5insight use this storage.
Example log output¶
The script logs all steps to:
/opt/f5insight/logs/f5insight-disk-expand.log
First boot - image provisioned at 80 GB, VM disk at 240 GB¶
[2026-07-25 09:38:18] ==========================================
[2026-07-25 09:38:18] F5 Insight Disk Expansion Check
[2026-07-25 09:38:18] ==========================================
[2026-07-25 09:38:18] Checking for unallocated disk space...
[2026-07-25 09:38:18] Disk device: /dev/vda (240 GB)
[2026-07-25 09:38:18] Root partition: /dev/vda3 (79 GB)
[2026-07-25 09:38:18] Found 161 GB unallocated space - expanding partition and LVM
[2026-07-25 09:38:18] Expanding partition using growpart...
[2026-07-25 09:38:19] Partition expanded successfully
[2026-07-25 09:38:21] Detected LVM partition, extending physical/logical volumes...
Physical volume "/dev/vda3" changed
1 physical volume(s) resized or updated / 0 physical volume(s) not resized
[2026-07-25 09:38:21] Physical volume resized
Size of logical volume vg0/opt changed from 38.89 GiB (9957 extents) to 198.89 GiB (50917 extents).
Logical volume vg0/opt successfully resized.
[2026-07-25 09:38:21] Logical volume extended
Filesystem at /dev/vg0/opt is mounted on /opt; on-line resizing required
The filesystem on /dev/vg0/opt is now 52139008 (4k) blocks long.
[2026-07-25 09:38:23] Filesystem expanded
[2026-07-25 09:38:23] LVM expansion complete
[2026-07-25 09:38:23] Disk expansion complete: Total=196GB, Free=195GB
[2026-07-25 09:38:23] ==========================================
[2026-07-25 09:38:23] F5 Insight Disk Expansion Check Complete
[2026-07-25 09:38:23] ==========================================
On-demand run - disk later resized to 1000 GB at the hypervisor¶
[2026-07-25 10:01:57] ==========================================
[2026-07-25 10:01:57] F5 Insight Disk Expansion Check
[2026-07-25 10:01:57] ==========================================
[2026-07-25 10:01:57] Checking for unallocated disk space...
[2026-07-25 10:01:57] Disk device: /dev/vda (1000 GB)
[2026-07-25 10:01:57] Root partition: /dev/vda3 (239 GB)
[2026-07-25 10:01:57] Found 761 GB unallocated space - expanding partition and LVM
[2026-07-25 10:01:57] Expanding partition using growpart...
[2026-07-25 10:01:58] Partition expanded successfully
[2026-07-25 10:02:00] Detected LVM partition, extending physical/logical volumes...
Physical volume "/dev/vda3" changed
1 physical volume(s) resized or updated / 0 physical volume(s) not resized
[2026-07-25 10:02:00] Physical volume resized
Size of logical volume vg0/opt changed from 198.89 GiB (50917 extents) to 958.89 GiB (245477 extents).
Logical volume vg0/opt successfully resized.
[2026-07-25 10:02:00] Logical volume extended
Filesystem at /dev/vg0/opt is mounted on /opt; on-line resizing required
The filesystem on /dev/vg0/opt is now 251368448 (4k) blocks long.
[2026-07-25 10:02:10] Filesystem expanded
[2026-07-25 10:02:10] LVM expansion complete
[2026-07-25 10:02:10] Disk expansion complete: Total=944GB, Free=943GB
[2026-07-25 10:02:10] ==========================================
[2026-07-25 10:02:10] F5 Insight Disk Expansion Check Complete
[2026-07-25 10:02:10] ==========================================
Final filesystem state after the on-demand run:
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg0-opt 944G 160M 943G 1% /opt
Review logs¶
The script appends its output to:
/opt/f5insight/logs/f5insight-disk-expand.log
When the expansion runs automatically through systemd, review the service status and journal:
sudo systemctl status f5insight-disk-expand.service
sudo journalctl -u f5insight-disk-expand.service --no-pager
The service is a one-shot unit and is expected to show as completed after a successful first-boot check.
Troubleshooting¶
| Issue | Cause | Solution |
|---|---|---|
| The script reports that no significant unallocated space was found | The script only expands when it detects at least 10 GB between the physical disk and the root partition. | Confirm the new disk size in the hypervisor and with lsblk. If the difference is less than 10 GB, no expansion is performed. |
| The disk was expanded, but Linux still shows the old size | The guest operating system might not have rescanned the disk yet. | Check lsblk and the hypervisor configuration. Restart the VM during a planned maintenance window, then verify the disk size again before you run the script. |
The script reports that growpart is unavailable |
The partition can’t be expanded without growpart. |
Contact F5 support to restore the required appliance package. Don’t manually resize the partition unless directed by F5 support. |
| The partition expands, but the filesystem size doesn’t change | The LVM logical volume might not have been extended, or pvresize didn’t detect the new partition size. |
Review the expansion log and the output of pvs, vgs, lvs, and df -h /. For LVM installations, confirm that the /opt logical volume exists and that the volume group contains free space after pvresize. |
| Automatic expansion didn’t run after a later disk resize | This is expected. The systemd unit is intentionally limited to first boot. | Run the script manually. See Expand a disk after deployment. |
Additional information¶
- The script uses all free space in the volume group when it extends the
/optlogical volume. - A disk resize performed in the infrastructure layer doesn’t automatically resize the guest partition or filesystem. The F5 Insight script performs those guest-side operations.
- If the layout differs from the standard F5 Insight appliance layout, stop and contact F5 support before you make manual storage changes.