Check Point Firewall VM Disk Resize

It is related to Check Point MGMT VM with R80.10 in my story, but you would as well want to resize Check Point gateway firewall hardware box or VM.

I was searching for a simple solution and found different ones that didn’t work for me, so here are the steps that you need to go through when you resize your CheckPoint VM disk in vCenter and then need to expand the partition inside Check Point VM in order to use the additional space.

Of course, you did choose too small HDD for your VM when you created it and now you cannot upload some hotfixes or vSEC gateway files to it because you don’t have enough space.

Get to vCenter and shut down the VM.

vCenter VM Shutdown

Get more GB to your VM and power it back up.

vCenter VM HDD Space Increase

Login to your CheckPoint VM with SSH and get to expert mode.
Check to see that partitions of the VM stayed the same as before. We need to expand partition in order to use added space on the disk.

List the partitions:
[Expert@CPMGMT:0]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_splat-lv_current     19G    11G    7.7G    57% /
/dev/hda1                          289M    24M    250M     9% /boot
tmpfs                              1.9G   4.0K    1.9G     1% /dev/shm
/dev/mapper/vg_splat-lv_log        6.8G   5.5G    998M    85% /var/log
See how many GB we have Free for use in the expansion:
[Expert@CPMGMT:0]# pvs
PV VG Fmt Attr PSize PFree
/dev/hda3   vg_splat   lvm2 a-   26.69G   10.69G

Use lvextend to define expansion size and of which partition.
You see, I needed more space on my /dev/mapper/vg_splat-lv_current partition. It was strange but the command for defining the extension of that partition with lvextend needed to be like in the example below.

So ditch the mapper part and add / between vg_splat and lv_current :

[Expert@CPMGMT:0]# lvextend -L +10G /dev/vg_splat/lv_current
Extending logical volume lv_current to 19.00 GB
Logical volume lv_current successfully resized

Start extending the partition with the resize2fs tool:

[Expert@CPMGMT:0]# resize2fs /dev/vg_splat/lv_current
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/vg_splat/lv_current is mounted on /; on-line resizing required
Performing an on-line resize of /dev/vg_splat/lv_current to 4980736 (4k) blocks.
The filesystem on /dev/vg_splat/lv_current is now 4980736 blocks long.

Rearrange Available Space Between Partitions

If your log partition is too big and lv_current is too small, there is no need to go to VMware admin and ask for more space on the VM.

So to skip buying beers to VMware guys you can use lvm_manager to shrink one partition and expand the other. It is simple enough, just go into expert mode and type: lvm_manager

The menu will appear and ask you what you want to do. In the example below I used option 1) to list available partitions and see how many space they use. With option 2) I can go further and shrink and expand one of those partitions.

[Expert@CPMGMT:0]# lvm_manager
Select action:

1) View LVM storage overview
2) Resize lv_current/lv_log Logical Volume
3) Quit
Select action: 1
LVM overview
                 Size(GB)    Used(GB)    Configurable    Description
lv_current            19           9         yes         Check Point OS and products
lv_log                 7           6         yes         Logs volume
upgrade                0         N/A         no
swap                   3         N/A         no          Swap volume size
free                   0         N/A         no          Unused space
-  -  -  -  -  -  -  - ---
total                 29         N/A         no          Total size

press ENTER to continue.


So, in short:

You see that you have 10.69 GB of free space on the disk (unpartitioned, vcenter added space):

[Expert@CPMGMT:0]# pvs
PV VG Fmt Attr PSize PFree
/dev/hda3   vg_splat   lvm2 a-   26.69G   10.69G

So you add that 10G space to lw_current partition:

[Expert@CPMGMT:0]# lvextend -L +10G /dev/vg_splat/lv_current

And apply the change:

[Expert@CPMGMT:0]# resize2fs /dev/vg_splat/lv_current

Leave a Reply