You can increase the size of the data LVM volume without rebooting. A service called lvmresizer.service runs at boot and scans disks and partitions. It automatically adds new empty disks and any unpartitioned space at the end of used disks to the data volume.
To add the space without rebooting, restart the service:
systemctl restart lvmresizer.service
On some platforms, such as VMWare ESXi, you must first notify the kernel of the changed disk size:
echo 1 > /sys/class/block/sda/device/rescan
Replace sda with your device name.
Advanced disk resizing
To extend the data LVM volume by resizing the disk used by the czvg LVM group, first identify the partition in use:
pvdisplay
Example output:
--- Physical volume ---
PV Name /dev/nvme0n1p2
VG Name czvg
In this example, partition nvme0n1p2 is the one used by the czvg LVM group.
After you extend the disk size in your cloud provider console (AWS or GCP, for example), extend the data LVM volume using one of the following methods:
Reboot the appliance. The new space is available in the data LVM volume when the appliance comes back online.
rRun
`systemctl start lvmresizer`. The new space is available in the data LVM volume when the command completes.
Example: Extending an AWS appliance disk from 20GB to 40GB
The following example shows the disk extension process on an AppGate ZTNA appliance in AWS. The disk was increased from 20 GB to 40 GB using the AWS console.
Check the current data volume and volume group size:
root@host:/home/cz# df -h|grep data
/dev/czvg/data 9.5G 98M 8.9G 2% /mnt/data
root@host:/home/cz# vgdisplay |grep "VG Size"
VG Size <19.75 GiBConfirm the new disk size is visible to the OS:
root@host:/home/cz# fdisk -l /dev/nvme0n1|head -1
Disk /dev/nvme0n1: 40 GiB, 42949672960 bytes, 83886080 sectorsRun the resizer service:
root@host:/home/cz# systemctl start lvmresizer.service Confirm the volume group and data volume now reflect the new size:
root@host:/home/cz# vgdisplay |grep "VG Size"
VG Size <39.75 GiB
root@host:/home/cz# df -h|grep data
/dev/czvg/data 30G 103M 28G 1% /mnt/data