Need Advice on how to expand space for AMP

I only resized the partition and didn’t resize the LVM. So I had to do the following to increase the space. After this, the space was now available to AMP.

# Increase the Physical Volume (pv) to max size
pvresize /dev/sda3

# Expand the Logical Volume (LV) to max size to match
lvresize -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv

# Expand the filesystem itself
resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv