This article explains the procedure to expand disk space in a Policy Enforcer (PE) that is deployed on a Virtual Machine (VM).
Sometimes due to high incoming data and inflow to the PE node, the default disk space may get completely filled.
You can perform the steps in KB34205 - [Junos] Policy Enforcer (PE) Disk Cleanup [juniper.net] to clean up the disk in the PE but if it does not help, you may need to expand the disk partition.
To expand the VM disk partition in a Policy Enforcer, perform the following steps:
On the VMWare/vSphere Client:
Take a VM Snapshot of the PE node deployment
Power off the VM module/node
Edit the settings of the VM node and click ADD NEW DEVICE. Select Hard Disk and specify the required value for expansion of the Hard Disk in MB/GB/TB
Power on the VM node and log in to the PE Debug Shell
In the PE Debug Shell:
For PE version lower to 22.x Download the PE Disk Expansion zip file(22.x & Below) and transfer the file to your PE server CLI
Unzip the file to get the script file: # unzip resizeFS_PE.zip
unzip resizeFS_PE.zip
Search for the disk partition that you added on the VM client by using the command # fdisk -l
fdisk -l
Execute the script by running the command # sh resizeFS_PE.sh
# sh resizeFS_PE.sh
You will be prompted for the disk partition that needs to be used to expand the Logical Volume.
Disk /dev/sdc: 107.4 GB, 107374182400 bytes 255 heads, 63 sectors/track, 13054 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000
Enter the partition name from the above output, in this case /dev/sdc . (Note that this can be any value in your server such as /dev/sdb or /dev/sda3 .)
/dev/sdc
/dev/sdb
/dev/sda3
This will help you to expand the disk partition for your Policy Enforcer.
Modified script for the 23.1