Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
jonito_villa
Participant
Jump to solution

Resizing Disk After Increasing Disk Size in VMware on Gaia

I had a VM working as Manager on production enviroment.

According to sk94671, we can increase the log storage but we have to add a new virtual disk.

 

In this case, we increased the current Disk assigned to the VM (we make the test first on my lab, increase the hdd from 100 GB to 200GB in Gaia R80.20).

I did the following procedure:

*****1.- Create partition with "parted"*****

[Expert@crdsmc001:0]# parted
GNU Parted 3.1
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit b
(parted) print free
Model: VMware Virtual disk (scsi)
Disk /dev/sda: 214748364800B
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 17408B 314590207B 314572800B ext3 boot
2 314590208B 8901783039B 8587192832B linux-swap(v1)
3 8901783040B 107374165503B 98472382464B lvm
107374165504B 214748347903B 107374182400B Free Space

(parted) mkpart
Partition name? []?
File system type? [ext2]?
Start? 107374165504B --> Set inicial "Free Space"
End? 214748347903B --> Se final "Free Space""
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel? Ignore
(parted) p
Model: VMware Virtual disk (scsi)
Disk /dev/sda: 214748364800B
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 17408B 314590207B 314572800B ext3 boot
2 314590208B 8901783039B 8587192832B linux-swap(v1)
3 8901783040B 107374165503B 98472382464B lvm
4 107374165504B 214748347903B 107374182400B

(parted) t
Partition number? 4
Flag to Invert? lvm
(parted) p
Model: VMware Virtual disk (scsi)
Disk /dev/sda: 214748364800B
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 17408B 314590207B 314572800B ext3 boot
2 314590208B 8901783039B 8587192832B linux-swap(v1)
3 8901783040B 107374165503B 98472382464B lvm
4 107374165504B 214748347903B 107374182400B lvm

(parted) q
Information: You may need to update /etc/fstab.

[Expert@crdsmc001:0]# reboot

Are you sure? (y/n) y

 


****2.- Extend patition vg_splat*****

We have now a new partition markes as lvm

[Expert@crdsmc001:0]#
[Expert@crdsmc001:0]# pvcreate /dev/sda4
Physical volume "/dev/sda4" successfully created.
[Expert@crdsmc001:0]#
[Expert@crdsmc001:0]#
[Expert@crdsmc001:0]# pvdisplay /dev/sda4
"/dev/sda4" is a new physical volume of "100.00 GiB"
--- NEW Physical volume ---
PV Name /dev/sda4
VG Name
PV Size 100.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID gYyKX0-kV9W-e41V-UQRH-qVCw-JHLc-fDjA64

[Expert@crdsmc001:0]#
[Expert@crdsmc001:0]#
[Expert@crdsmc001:0]# vgscan --mknodes
Reading volume groups from cache.
Found volume group "vg_splat" using metadata type lvm2
[Expert@crdsmc001:0]#
[Expert@crdsmc001:0]#
[Expert@crdsmc001:0]# pvdisplay /dev/sda4
"/dev/sda4" is a new physical volume of "100.00 GiB"
--- NEW Physical volume ---
PV Name /dev/sda4
VG Name
PV Size 100.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID AsDVvU-XSVh-32dQ-W6Wd-cDiL-KvYJ-qw2EbC
[Expert@crdsmc001:0]#
[Expert@crdsmc001:0]#
[Expert@crdsmc001:0]#
[Expert@crdsmc001:0]# vgextend vg_splat /dev/sda4
Volume group "vg_splat" successfully extended
[Expert@crdsmc001:0]#
[Expert@crdsmc001:0]#
[Expert@crdsmc001:0]#
[Expert@crdsmc001:0]# vgdisplay
--- Volume group ---
VG Name vg_splat
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 2
Act PV 2
VG Size 191.66 GiB
PE Size 32.00 MiB
Total PE 6133
Alloc PE / Size 1760 / 55.00 GiB
Free PE / Size 4373 / 136.66 GiB
VG UUID Tse907-Fb0t-1pGk-SpN8-PcD9-MCme-rZzmfF

[Expert@crdsmc001:0]#

 

 

****3.- Extend log volume with lvm_manager in maintenance mode****

Reboot the VM and stop the boot.

Choose maintenance mode --> expert password will be required

 

[Expert@crdsmc001: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 25 11 yes Check Point OS and products
lv_log 30 6 yes Logs volume
upgrade 28 N/A no Reserved for version upgrade
swap 8 N/A no Swap volume size
free 108 N/A no Unused space
------- ----
total 199 N/A no Total size

press ENTER to continue.

Select action:

1) View LVM storage overview
2) Resize lv_current/lv_log Logical Volume
3) Quit
Select action: 2


Select Logical Volume for size modification:
1) lv_current
2) lv_log
3) Cancel
Select Logical Volume: 2

LVM overview
============
Size(GB) Used(GB) Configurable Description
lv_current 25 11 yes Check Point OS and products
lv_log 30 6 yes Logs volume
upgrade 28 N/A no Reserved for version upgrade
swap 8 N/A no Swap volume size
free 108 N/A no Unused space
------- ----
total 199 N/A no Total size

Resizing lv_log Logical Volume
==============================
lv_log size can be between 31G to 139G.
Enter the new size(GB) or leave blank to cancel: 139

Note that all Check Point products will be shutdown during the resizing operation and the machine will be rebooted automatically at the end of the process.
This may take several minutes.
Are you sure you want to continue?(Y/N)[N]Y

Stopping Check Point products. This may take several minutes ...


*********************************************************************************************************************************************************

Operation ended succesfully


Logical Volume size changed from 31G to 139G

Press ENTER to reboot.

 

 

*****************

Finally.

After the reboot, you can see that the log volume has increased and you are using the whole disk assigned to the VM.

 

(2)
1 Solution

Accepted Solutions
jonito_villa
Participant

Yes... the procedure works...

The most important is the new partition created via parted.

The others steps was taken from the sk94671.

View solution in original post

0 Kudos
15 Replies
PhoneBoy
Admin
Admin
So I take it this worked for you?
Looks that way from the output.
0 Kudos
jonito_villa
Participant

Yes... the procedure works...

The most important is the new partition created via parted.

The others steps was taken from the sk94671.

0 Kudos
PhoneBoy
Admin
Admin
Just wanted to make sure I didn't miss anything 🙂
genisis__
Leader Leader
Leader

Is this relevant for XFS file system ?

0 Kudos
jonito_villa
Participant
well... we only expand the logical volumen with a new partition...
the unique difference with the sk94671 is that the new partition is created with "parted"
the existing partition in fstab are not modified.
0 Kudos
Oliver_Fink
Advisor
Advisor

Worked for me. Thanks.

0 Kudos
Miguel_SantaCru
Explorer
Explorer

Thanks Jonathan 

This procedur  is working 100 % 

0 Kudos
rener
Employee
Employee

Worked for me with R81.10 on VMware Workstation 16.

Perfect! 👍

0 Kudos
spaceForceOne
Participant

Thanks!!! Worked on R81.10 on a Azure VM.

0 Kudos
allangac
Explorer

worked on R81.10 Azure.

how about increasing lv_current?

0 Kudos
playfan5
Explorer

Worked wonderfully on Azure with 80.40 and 81.20!

You can save a reboot by doing the second part in maintenance mode.

0 Kudos
Amir_Senn
Employee
Employee

There's also a special sk: How to increase the disk size of a CloudGuard VM for Azure, AWS, GCP, and OCI

https://support.checkpoint.com/results/sk/sk156552

Kind regards, Amir Senn
0 Kudos
Maarten_Sjouw
Champion
Champion

One of the most important issues that is pointed out in that SK is that you should NOT increase the disk but add a disc.

When you do increase the disc you will not be able to upgrade to R81.20 the option  will not show in CPUSE.

Another problem we ran into is that when you do a clean install of a VM with 2 discs connected during installation, it will install the boot partition on disc 1 and the swap partition (also a boot type) on disc 2. The update of grub will not allow you to upgrade to R81.20 when this is true.

Parted -l output of this  type of installation:

[Expert@KSO-NLAMS1VP-CPMS-002:0]# parted -l
Model: VMware Virtual disk (scsi)
Disk /dev/sda: 1100GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 17.4kB 315MB 315MB ext3 boot
2 315MB 1100GB 1099GB lvm


Model: VMware Virtual disk (scsi)
Disk /dev/sdb: 5498GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 17.4kB 68.7GB 68.7GB linux-swap(v1) boot
2 68.7GB 5498GB 5429GB lvm

Regards, Maarten
zenity
Explorer

Can't stress this enough - if you increase the disk instead of adding a disk, you will not be able to upgrade to R81.20.

Hogni_av_Reyni
Explorer

This also worked for us. We are running R81.20 on vmware.

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events